]> git.pld-linux.org Git - packages/flowd.git/blobdiff - flowd.spec
- rename binding packages, finish python files, cleanups; rel 1
[packages/flowd.git] / flowd.spec
index 1d07429c13f979b74e8af9327910ce4db6366502..0876aef0e9c2749ab2c46bb61175c013a9552224 100644 (file)
@@ -4,28 +4,31 @@
 #
 %include       /usr/lib/rpm/macros.perl
 Summary:       The flowd NetFlow collector daemon
-Summary(pl.UTF-8):   flowd - demon zbierania danych NetFlow
+Summary(pl.UTF-8):     flowd - demon zbierania danych NetFlow
 Name:          flowd
-Version:       0.9
+Version:       0.9.1
 Release:       1
 License:       BSD
 Group:         Applications/Networking
 Source0:       http://www.mindrot.org/files/flowd/%{name}-%{version}.tar.gz
-# Source0-md5: 442917bb3c66a81786e9ab1d40006122
+# Source0-md5: a3d0512b5e6d9c7d9e749d9894376ea4
+Patch0:                %{name}-username.patch
 URL:           http://www.mindrot.org/flowd.html
+BuildRequires: byacc
 BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: python-devel
 BuildRequires: rpm-perlprov >= 4.1-13
 BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
 Requires(pre): /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires(post,preun):  /sbin/chkconfig
-Requires(postun):      /usr/sbin/groupdel
-Requires(postun):      /usr/sbin/userdel
 Requires:      rc-scripts
-Provides:      group(_flowd)
-Provides:      user(_flowd)
+Provides:      group(flowd)
+Provides:      user(flowd)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,36 +47,37 @@ Obsługuje podstawowe filtrowanie w celu ograniczania lub znakowania
 zapisywanych przepływów, ma rozdzielenie uprawnień w celu ograniczenia
 wpływu własnych błedów na bezpieczeństwo.
 
-%package perl
+%package -n perl-Flowd
 Summary:       Perl API to access flowd logfiles
-Summary(pl.UTF-8):   Perlowe API do dostępu do plików logów flowd
+Summary(pl.UTF-8):     Perlowe API do dostępu do plików logów flowd
 Group:         Development/Languages/Perl
+Obsoletes:     flowd-perl
 
-%description perl
+%description -n perl-Flowd
 This is a Perl API to the binary flowd network flow log format and an
 example reader application.
 
-%description perl -l pl.UTF-8
+%description -n perl-Flowd -l pl.UTF-8
 Ten pakiet zawiera API Perla dla binarnego formatu plików logów
 przepływów sieciowych flowd oraz przykładowy program czytający.
 
-%package python
+%package -n python-flowd
 Summary:       Python API to access flowd logfiles
-Summary(pl.UTF-8):   Pythonowe API do dostępu do plików logów flowd
+Summary(pl.UTF-8):     Pythonowe API do dostępu do plików logów flowd
 Group:         Applications/Networking
-Requires:      python
+Obsoletes:     python-flowd
 
-%description python
+%description -n python-flowd
 This is a Python API to the binary flowd network flow log format and
 an example reader application.
 
-%description python -l pl.UTF-8
+%description -n python-flowd -l pl.UTF-8
 Ten pakiet zawiera API Pythona dla binarnego formatu plików logów
 przepływów sieciowych flowd oraz przykładowy program czytający.
 
 %package tools
 Summary:       Collection of example flowd tools
-Summary(pl.UTF-8):   Zbiór przykładowych narzędzi dla flowd
+Summary(pl.UTF-8):     Zbiór przykładowych narzędzi dla flowd
 Group:         Applications/Networking
 
 %description tools
@@ -84,7 +88,7 @@ Zbiór narzędzi do używania z flowd.
 
 %package devel
 Summary:       C API to access flowd logfiles
-Summary(pl.UTF-8):   API C do dostępu do plików logów flowd
+Summary(pl.UTF-8):     API C do dostępu do plików logów flowd
 Group:         Development/Libraries
 
 %description devel
@@ -96,21 +100,21 @@ sieciowych flowd.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
-#      --enable-gcc-warnings \
-
 %{__make}
 
-cd Flowd-perl 
+CFLAGS="%{rpmcflags}" \
+%{__python} setup.py build
+
+cd Flowd-perl
 %{__perl} Makefile.PL \
        INSTALLDIRS=vendor
-%{__make} 
+%{__make}
 %{?with_tests:%{__make} test}
 
-#python setup.py install --root=$RPM_BUILD_ROOT --optimize=2
-
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -119,21 +123,25 @@ rm -rf $RPM_BUILD_ROOT
 
 # Misc stuff
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-install flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
+install -p flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
 
 # Perl module
 %{__make} -C Flowd-perl pure_install \
        DESTDIR=$RPM_BUILD_ROOT
 
+rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
+
 # Python module
-./setup.py install --optimize 1 --root=$RPM_BUILD_ROOT 
+%{__python} setup.py install \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-%groupadd -g XXX _flowd
-%useradd -u XXX -d /usr/share/empty -s /bin/false -c "flowd user" -g _flowd _flowd
+%groupadd -g 198 flowd
+%useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
 
 %post
 /sbin/chkconfig --add flowd
@@ -147,14 +155,13 @@ fi
 
 %postun
 if [ "$1" = "0" ]; then
-       %userremove _flowd
-       %groupremove _flowd
+       %userremove flowd
+       %groupremove flowd
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog LICENSE README TODO
-#%%dir %%attr(111,root,root) %{_var}/empty
 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf
 %attr(754,root,root) /etc/rc.d/init.d/flowd
 %attr(755,root,root) %{_bindir}/flowd-reader
@@ -163,18 +170,22 @@ fi
 %{_mandir}/man8/flowd.8*
 %{_mandir}/man8/flowd-reader.8*
 
-%files perl 
+%files -n perl-Flowd
 %defattr(644,root,root,755)
-#%%doc reader.pl
+%doc reader.pl
 %{perl_vendorarch}/Flowd.pm
 %dir %{perl_vendorarch}/auto/Flowd
 %{perl_vendorarch}/auto/Flowd/Flowd.bs
 %attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
-%{_mandir}/man3/*
+%{_mandir}/man3/Flowd.3pm*
 
-%files python 
+%files -n python-flowd
 %defattr(644,root,root,755)
 %doc reader.py
+%attr(755,root,root) %{py_sitedir}/flowd.so
+%if "%{py_ver}" > "2.4"
+%{py_sitedir}/flowd-*.egg-info
+%endif
 
 %files tools
 %defattr(644,root,root,755)
This page took 0.105507 seconds and 4 git commands to generate.