Name: owfs Version: 2.9p1 Release: 4%{?dist} Summary: 1-Wire Virtual File System # some parts licensed differently, see http://owfs.org/index.php?page=license License: GPLv2 URL: http://www.owfs.org/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: owserver.service Source2: owfs.service Source3: owhttpd.service Source4: owftpd.service Source5: owfs.tmpfiles # install into 'vendor' perl directories; not suitable for upstream Patch0: owfs-0001-install-into-vendor-perl-directories.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd BuildRequires: systemd %description OWFS is a user-space virtual file-system providing access to 1-Wire networks. %package libs Summary: Core library providing base functions to other OWFS modules Requires: libusb >= 0.1.6 BuildRequires: automake autoconf libtool BuildRequires: libusb-devel %description libs %{name}-libs is a core library providing base functions to other OWFS modules. %package capi Summary: C-API to develop third-part applications which access 1-Wire networks Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description capi %{name}-capi library on top of libow providing an easy API to develop third-party applications to access to 1-Wire networks. %package devel Summary: Files for development of OWFS applications Requires: %{name}-libs%{?_isa} = %{version} %description devel This package contains the libraries and header files that are needed for developing OWFS applications. %package ownet Summary: C-API to develop third-part applications which access 1-Wire networks Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description ownet %{name}-ownet library provides an easy API to develop third-party applications to access to 1-Wire networks. It doesn't depend on owlib, and only supports remote-server connections. This library doesn't include any 1-wire adapter support, except server connections. %package fs Summary: Virtual file-system on top of %{name}-libs providing access to 1-Wire networks Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: fuse >= 1.0 Requires: %{name}-server BuildRequires: fuse-devel >= 1.0 %description fs %{name}-fs is a virtual file-system on top of %{name}-libs providing access to 1-Wire networks. %package httpd Summary: HTTP daemon providing access to 1-Wire networks Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-server %description httpd %{name}-httpd is a HTTP daemon on top of %{name} providing access to 1-Wire networks. %package ftpd Summary: FTP daemon providing access to 1-Wire networks Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-server %description ftpd %{name}-ftpd is a FTP daemon on top of %{name} providing access to 1-Wire networks. %package server Summary: Back-end server (daemon) for 1-wire control Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires(pre): shadow-utils %description server %{name}-server is the back-end component of the OWFS 1-wire bus control system. owserver arbitrates access to the bus from multiple client processes. The physical bus is usually connected to a serial or USB port, and other processes connect to owserver over network sockets (TCP port). Communication can be local or over a network. %package tap Summary: Packet sniffer for the owserver protocol Requires: tcl >= 8.1 Requires: %{name}-tcl%{?_isa} = %{version}-%{release} %description tap %{name}-tap is a packet sniffer for the owserver protocol %package mon Summary: Statistics and settings monitor for owserver Requires: tcl >= 8.1 Requires: %{name}-tcl%{?_isa} = %{version}-%{release} %description mon %{name}-mon is a graphical monitor of owserver’s status %package python Summary: Python interface for the 1-wire file-system Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python >= 2.0 BuildRequires: swig BuildRequires: python2-devel %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup } %description python %{name}-python is a Python interface for the 1-wire file-system %package php Summary: PHP interface for the 1-wire file-system Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: php >= 4.3.0 Requires: php-cli >= 4.3.0 BuildRequires: swig BuildRequires: php-devel >= 4.3.0 %description php %{name}-php is a php interface for the 1-wire file-system %package tcl Summary: Tcl interface for the 1-wire file-system Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: tcl >= 8.1 BuildRequires: tcl-devel >= 8.1 %description tcl %{name}-tcl is a Tcl interface for the 1-wire file-system %package shell License: MIT Summary: Light weight shell access to owserver and the 1-wire file-system %description shell %{name}-shell is 5 small programs to easily access owserver (and thus the 1-wire system) from shell scripts. owdir, owread, owwrite, owget and owpresent. %prep %setup -q # Perl dirs %patch0 -p1 sed -i -e 's/) Makefile.PL/& INSTALLDIRS=vendor/' \ module/swig/perl5/Makefile.am \ module/ownet/perl5/Makefile.am %build %configure --disable-rpath --disable-owperl # deal with RPATH sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # deal with unused-direct-shlib-dependency sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} # remove failed that won't be packaged rm -f %{buildroot}%{perl_archlib}/perllocal.pod rm -f %{buildroot}%{perl_archlib}/auto/OW/.packlist rm -f %{buildroot}%{perl_archlib}/auto/OWNet/.packlist rm -f %{buildroot}%{_libdir}/libow.la rm -f %{buildroot}%{_libdir}/libowcapi.la rm -f %{buildroot}%{_libdir}/libownet.la rm -f %{buildroot}%{php_extdir}/libowphp.la rm -f %{buildroot}%{_libdir}/tcl8.5/owtcl-*/ow.la rm -f %{buildroot}/usr/local/lib64/perl5/auto/OWNet/.packlist # install systemd unit files mkdir -p %{buildroot}%{_unitdir} cp -p %{SOURCE1} %{buildroot}%{_unitdir} cp -p %{SOURCE2} %{buildroot}%{_unitdir} cp -p %{SOURCE3} %{buildroot}%{_unitdir} cp -p %{SOURCE4} %{buildroot}%{_unitdir} # mount point creation mkdir -p %{buildroot}%{_tmpfilesdir} install -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf mkdir -p %{buildroot}/run install -d -m 0755 %{buildroot}/run/%{name}/ %pre server getent group ow >/dev/null || groupadd -r ow getent passwd ow >/dev/null || \ useradd -r -g ow -d /var/empty -s /sbin/nologin \ -c "1-wire file-system (OWFS) utilities account" ow exit 0 %post libs -p /sbin/ldconfig %post capi -p /sbin/ldconfig %post ownet -p /sbin/ldconfig %post fs /bin/systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf %systemd_post owfs.service %post httpd %systemd_post owhttpd.service %post ftpd %systemd_post owftpd.service %post server %systemd_post owserver.service %preun fs %systemd_preun owfs.service %preun httpd %systemd_preun owhttpd.service %preun ftpd %systemd_preun owftpd.service %preun server %systemd_preun owserver.service %postun libs -p /sbin/ldconfig %postun capi -p /sbin/ldconfig %postun ownet -p /sbin/ldconfig %postun fs %systemd_postun_with_restart owfs.service %postun httpd %systemd_postun_with_restart owhttpd.service %postun ftpd %systemd_postun_with_restart owftpd.service %postun server %systemd_postun_with_restart owserver.service %files libs %doc README NEWS ChangeLog AUTHORS COPYING %{_libdir}/libow-*.so* %{_mandir}/man3/*.3.* %{_mandir}/man5/owfs.5.* %{_mandir}/man5/owfs.conf.5.* %files devel %{_includedir}/owfs_config.h %{_includedir}/owcapi.h %{_includedir}/ownetapi.h %{_libdir}/libow.so %{_libdir}/libowcapi.so %{_libdir}/libownet.so %files capi %{_libdir}/libowcapi-*.so* %{_mandir}/man1/*owcapi.1.* %files ownet %{_libdir}/libownet-*.so* %{_mandir}/man1/*ownet*.1.* %files fs %{_bindir}/owfs %{_mandir}/man1/owfs.1.* %{_unitdir}/owfs.service %{_tmpfilesdir}/%{name}.conf %dir /run/owfs %files httpd %{_bindir}/owhttpd %{_mandir}/man1/owhttpd.1.* %{_unitdir}/owhttpd.service %files shell %{_bindir}/owdir %{_bindir}/owexist %{_bindir}/owread %{_bindir}/owwrite %{_bindir}/owget %{_bindir}/owpresent %{_mandir}/man1/owshell.1.* %{_mandir}/man1/owdir.1.* %{_mandir}/man1/owread.1.* %{_mandir}/man1/owget.1.* %{_mandir}/man1/owpresent.1.* %{_mandir}/man1/owwrite.1.* %files ftpd %{_bindir}/owftpd %{_mandir}/man1/owftpd.1.* %{_unitdir}/owftpd.service %files server %{_bindir}/owserver %{_bindir}/owexternal %{_mandir}/man1/owserver.1.* %{_unitdir}/owserver.service %files tap %doc COPYING %{_bindir}/owtap %{_mandir}/man1/owtap.1.* %files mon %doc COPYING %{_bindir}/owmon %{_mandir}/man1/owmon.1.* %files python %dir %{python_sitearch}/ow %{python_sitearch}/ow/__init__.py* %attr(0755, -, -) %{python_sitearch}/ow/_OW.so %dir %{python_sitearch}/ownet %{python_sitearch}/ownet/__init__.py* %{python_sitearch}/ownet/connection.py* %{python_sitearch}/*.egg-info %files php %dir %{php_extdir} %{php_extdir}/libowphp.so* %{_datarootdir}/php/OWNet/ownet.php %files tcl %dir %{_libdir}/tcl8.5/owtcl-* %{_libdir}/tcl8.5/owtcl-*/* %{_mandir}/mann/owtcl.n.* %{_mandir}/mann/ow.n.* %changelog * Tue Jul 09 2013 Tomasz Torcz - 2.9p1-4 - add BR: systemd * Wed Jul 03 2013 Tomasz Torcz - 2.9p1-3 - include main COPYING in -tap and -mon * Mon Jul 01 2013 Tomasz Torcz - 2.9p1-2 - deal with unused-direct-shlib-dependency * Thu Jun 20 2013 Tomasz Torcz - 2.9p1-1 - update to 2.9p1, dropping merged patches - remove perl-owfs bits from .spec, for now - correct python _OW.so perms 0775 -> 0755 * Thu Jun 13 2013 Tomasz Torcz - 2.9p0-4 - furher fixes: - BR: python2-devel for -python; drop -devel req - add tcl dep for owmon and owtap * Fri May 10 2013 Tomasz Torcz - 2.9p0-3 - use /run/owfs instead of /mnt/1wire (ref: https://lists.fedoraproject.org/pipermail/devel/2013-May/182420.html) * Mon May 06 2013 Tomasz Torcz - 2.9p0-2 - fix issues: - add Require: python-devel to python subpackage - synchronise ldconfig requires with glibc provides * Mon Mar 25 2013 Tomasz Torcz - 2.9p0-1 - initial package, based on work by Serg Oskin and Vadim Tkachenko