]> git.pld-linux.org Git - packages/bb4.git/blobdiff - bb4.spec
- converted to UTF-8
[packages/bb4.git] / bb4.spec
index 3771571d590aa0715b352ee843777db697a69c72..3243b13d80e2ff275c0f705a6bde88815db6394a 100644 (file)
--- a/bb4.spec
+++ b/bb4.spec
@@ -1,8 +1,9 @@
+# TODO: webapps
+%define        nshort  bb18d
 Summary:       Big Brother System and Network Monitor
-Summary(pl):   Wielki Brat - monitor systemów i sieci
+Summary(pl.UTF-8):   Wielki Brat - monitor systemów i sieci
 Name:          bb4
 Version:       1.8d
-%define        nshort  bb18d
 Release:       2
 License:       Free for non-commercial use, 30-day trial for commercial use; not distributable
 Group:         Networking
@@ -11,16 +12,16 @@ Source1:    %{name}.init
 Patch0:                %{name}-pld.patch
 NoSource:      0
 URL:           http://bb4.com/
-BuildRequires: rpmbuild(macros) >= 1.159
-PreReq:                rc-scripts
+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(postun):      /usr/sbin/groupdel
-Requires(postun):      /usr/sbin/userdel
-Requires(post,preun):  /sbin/chkconfig
 Requires:      /usr/bin/setsid
+Requires:      rc-scripts
 Provides:      group(bb)
 Provides:      user(bb)
 Conflicts:     iputils-ping < 1:ss020124
@@ -36,13 +37,13 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 Big Brother - network monitoring system.
 
-%description -l pl
-Wielki Brat - monitor systemów i sieci.
+%description -l pl.UTF-8
+Wielki Brat - monitor systemów i sieci.
 
 %prep
 %setup -q -c
 tar xf %{nshort}.tar
-%patch -p1
+%patch0 -p1
 
 %build
 cd %{nshort}
@@ -105,7 +106,7 @@ ln -sf bb.html $RPM_BUILD_ROOT%{_htmldir}/index.html
 ln -sf %{_etcdir} $RPM_BUILD_ROOT%{_libdir}/etc
 ln -sf %{_htmldir} $RPM_BUILD_ROOT%{_libdir}/www
 ln -sf %{_vardir}/tmp $RPM_BUILD_ROOT%{_libdir}/tmp
-ln -sf %{_vardir} $RPM_BUILD_ROOT/usr/lib/bbvar
+ln -sf %{_vardir} $RPM_BUILD_ROOT%{_prefix}/lib/bbvar
 
 for f in bb-bbexttab bb-cputab bb-dftab bb-msgstab bb-proctab security ; do
        sed -e 's/^[^#]/#\&/' %{nshort}/etc/$f.DIST > $RPM_BUILD_ROOT%{_etcdir}/$f
@@ -121,37 +122,16 @@ install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bb
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`/usr/bin/getgid bb`" ]; then
-       if [ "`/usr/bin/getgid bb`" != "73" ]; then
-               echo "Error: group bb doesn't have gid=73. Correct this before installing BB." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 73 bb
-fi
-if [ -n "`/bin/id -u bb 2>/dev/null`" ]; then
-       if [ "`/bin/id -u bb`" != 73 ]; then
-               echo "Error: user bb doesn't have uid=73. Correct this before installing BB." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 73 -d %{_vardir} -s /bin/sh -c "Big Brother" \
-               -g bb -G root,proc,adm bb 1>&2
-fi
+%groupadd -g 73 bb
+%useradd -u 73 -d %{_vardir} -s /bin/sh -c "Big Brother" -g bb -G root,proc,adm bb
 
 %post
 /sbin/chkconfig --add bb
-if [ -f /var/lock/subsys/bb ]; then
-       /etc/rc.d/init.d/bb restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/bb start\" to start Big Brother daemon." >&2
-fi
+%service bb restart "Big Brother daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/bb ]; then
-                /etc/rc.d/init.d/bb stop >&2
-       fi
+       %service bb stop
        /sbin/chkconfig --del bb
 fi
 
@@ -165,20 +145,20 @@ fi
 %defattr(644,root,root,755)
 %doc %{nshort}/{LICENSE,README,README.CHANGES,README.SECURITY,README.SUPPORT}
 %dir %{_etcdir}
-%config(noreplace) %verify(not size mtime md5) %{_etcdir}/*
+%config(noreplace) %verify(not md5 mtime size) %{_etcdir}/*
 %attr(755,root,root) %{_cgidir}/*
 %dir %{_libdir}
 %attr(755,root,root) %{_libdir}/bin
 %{_libdir}/etc
 %attr(755,root,root) %{_libdir}/ext
-%dir %attr(755,root,root) %{_libdir}/web
+%dir %{_libdir}/web
 %{_libdir}/web/*_*er
 %attr(755,root,root) %{_libdir}/web/bb-*
 %attr(755,root,root) %{_libdir}/web/mk*
 %{_libdir}/www
 %{_libdir}/tmp
 %attr(755,root,root) %{_libdir}/runbb.sh
-/usr/lib/bbvar
+%{_prefix}/lib/bbvar
 %attr(775,root,bb) %dir %{_htmldir}
 %attr(775,root,bb) %{_htmldir}/html
 %{_htmldir}/gifs*
This page took 0.091362 seconds and 4 git commands to generate.