]> git.pld-linux.org Git - packages/ntop.git/blobdiff - ntop.spec
- kill unnecessary linking
[packages/ntop.git] / ntop.spec
index c7ddc50a6689a24cf45a79e45e5ed43702bc9ff1..b9f17e8f3fc8321de371f89cc259d834d68ee698 100644 (file)
--- a/ntop.spec
+++ b/ntop.spec
@@ -5,6 +5,7 @@
 #  - paths wrong somewhere /var/lib/ntop/ntop is expected (should be without last path component)
 #  - /var/lib/ntop/* should be %ghost
 #  - .la files should be in -devel
+#  - ntop apperars to be daemon, so it should be in _sbindir not in _bindir
 #
 Summary:       Network monitoring tool
 Summary(pl):   Narzêdzie do monitorowania sieci
@@ -17,9 +18,9 @@ Source0:      http://dl.sourceforge.net/ntop/%{name}-%{version}.tgz
 # Source0-md5: 1c9b4097c2e464b84f2fe8f6626d2b06
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
-Patch1:                %{name}-plugins_makefile.patch
-Patch2:                %{name}-conf.patch
-Patch3:                %{name}-DESTDIR.patch
+Patch0:                %{name}-plugins_makefile.patch
+Patch1:                %{name}-conf.patch
+Patch2:                %{name}-DESTDIR.patch
 URL:           http://www.ntop.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -33,7 +34,7 @@ BuildRequires:        libtool
 BuildRequires: ncurses-devel >= 5.2
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: readline-devel >= 4.2
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: zlib-devel
 PreReq:                rc-scripts
 Requires(pre): /bin/id
@@ -58,13 +59,12 @@ robi to popularna uniksowa komenda top.
 
 %prep
 %setup -q -n %{name}
+%patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
 
 %build
 #mv -f acinclude.m4.in acinclude.m4
-#rm -f missing
 #%%{__libtoolize}
 %{__aclocal}
 %{__autoconf}
@@ -87,12 +87,11 @@ robi to popularna uniksowa komenda top.
 
 
 %{__make}
-cd plugins
-%{__make}
+%{__make} -C plugins
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d     $RPM_BUILD_ROOT{%{_var}/lib/%{name},/etc/{rc.d/init.d,sysconfig}}
+install -d $RPM_BUILD_ROOT{%{_var}/lib/%{name},/etc/{rc.d/init.d,sysconfig}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -108,23 +107,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`/usr/bin/getgid ntop`" ]; then
-       if [ "`/usr/bin/getgid ntop`" != "120" ]; then
-               echo "Error: group ntop doesn't have gid=120. Correct this before installing ntop." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 120 ntop
-fi
-if [ -n "`/bin/id -u ntop 2>/dev/null`" ]; then
-       if [ "`/bin/id -u ntop`" != "120" ]; then
-               echo "Error: user ntop doesn't have uid=120. Correct this before installing ntop." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 120 -d /var/lib/ntop -s /bin/false \
-               -c "ntop User" -g ntop ntop 1>&2
-fi
+%groupadd -g 120 ntop
+%useradd -u 120 -d /var/lib/ntop -s /bin/false -c "ntop User" -g ntop ntop
 
 %post
 /sbin/ldconfig
@@ -163,5 +147,5 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/ntop
 %attr(640,root,root) /etc/sysconfig/ntop
 %attr(750,root,ntop) %dir /etc/ntop
-%attr(640,root,ntop) %config(noreplace) %verify(not size mtime md5) /etc/ntop/*
-%attr(644,root,ntop) %config(noreplace) %verify(not size mtime md5) /etc/ntop.conf
+%attr(640,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop/*
+%attr(644,root,ntop) %config(noreplace) %verify(not md5 mtime size) /etc/ntop.conf
This page took 0.106506 seconds and 4 git commands to generate.