3 Summary: Big Brother System and Network Monitor
4 Summary(pl.UTF-8): Wielki Brat - monitor systemów i sieci
8 License: Free for non-commercial use, 30-day trial for commercial use; not distributable
10 Source0: bb-%{version}.tar.gz
12 Patch0: %{name}-pld.patch
15 BuildRequires: rpmbuild(macros) >= 1.268
16 Requires(post,preun): /sbin/chkconfig
17 Requires(postun): /usr/sbin/groupdel
18 Requires(postun): /usr/sbin/userdel
19 Requires(pre): /bin/id
20 Requires(pre): /usr/bin/getgid
21 Requires(pre): /usr/sbin/groupadd
22 Requires(pre): /usr/sbin/useradd
23 Requires: /usr/bin/setsid
27 Conflicts: iputils-ping < 1:ss020124
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _etcdir /etc/bb
31 %define _libdir /usr/lib/bb
32 %define _htmldir /home/services/httpd/html/bb
33 %define _cgidir /home/services/httpd/cgi-bin
34 %define _vardir /var/lib/bb
35 %define _sysconfdir /etc/dummy
38 Big Brother - network monitoring system.
40 %description -l pl.UTF-8
41 Wielki Brat - monitor systemów i sieci.
75 %{__make} OPTCFLAGS="%{rpmcflags}"
81 for f in bbmv bbprune bbrm ; do
82 sed -e 's@&&BBHOME@%{_libdir}@' $f.DIST > $f
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_libdir},%{_htmldir}/{html,notes,rep},%{_cgidir},%{_vardir}/tmp} \
89 $RPM_BUILD_ROOT{%{_etcdir},/etc/rc.d/init.d}
91 cp -rf bbvar/* $RPM_BUILD_ROOT%{_vardir}
93 for f in bb-ack.sh bb-hist.sh bb-histlog.sh bb-hostsvc.sh bb-rep.sh bb-replog.sh ; do
94 sed -e 's@&&BBHOME@%{_libdir}@' %{nshort}/web/$f.DIST > $RPM_BUILD_ROOT%{_cgidir}/$f
96 sed -e 's@&BBHOME@%{_libdir}@' %{nshort}/runbb.sh.DIST > $RPM_BUILD_ROOT%{_libdir}/runbb.sh
98 rm -f %{nshort}/web/*.DIST %{nshort}/www/help/*.DIST
100 cp -rf %{nshort}/{bin,ext,web} $RPM_BUILD_ROOT%{_libdir}
101 cp -rf %{nshort}/www/{gifs,gifs-bb13,psy,help} $RPM_BUILD_ROOT%{_htmldir}
103 install %{nshort}/etc/bbchk*.sh $RPM_BUILD_ROOT%{_libdir}/bin
105 ln -sf bb.html $RPM_BUILD_ROOT%{_htmldir}/index.html
106 ln -sf %{_etcdir} $RPM_BUILD_ROOT%{_libdir}/etc
107 ln -sf %{_htmldir} $RPM_BUILD_ROOT%{_libdir}/www
108 ln -sf %{_vardir}/tmp $RPM_BUILD_ROOT%{_libdir}/tmp
109 ln -sf %{_vardir} $RPM_BUILD_ROOT%{_prefix}/lib/bbvar
111 for f in bb-bbexttab bb-cputab bb-dftab bb-msgstab bb-proctab security ; do
112 sed -e 's/^[^#]/#\&/' %{nshort}/etc/$f.DIST > $RPM_BUILD_ROOT%{_etcdir}/$f
114 echo '0.0.0.0/0.0.0.0' >> $RPM_BUILD_ROOT%{_etcdir}/security
115 sed -e 's/^[^#]/#\&/' %{nshort}/etc/bb-hosts > $RPM_BUILD_ROOT%{_etcdir}/bb-hosts
116 install %{nshort}/etc/{bbdef.sh,bbinc.sh,bbsys.local,bbsys.sh,bbwarnrules.cfg,bbwarnsetup.cfg,*.scr} \
117 $RPM_BUILD_ROOT%{_etcdir}
119 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bb
122 rm -rf $RPM_BUILD_ROOT
126 %useradd -u 73 -d %{_vardir} -s /bin/sh -c "Big Brother" -g bb -G root,proc,adm bb
129 /sbin/chkconfig --add bb
130 %service bb restart "Big Brother daemon"
133 if [ "$1" = "0" ]; then
135 /sbin/chkconfig --del bb
139 if [ "$1" = "0" ]; then
145 %defattr(644,root,root,755)
146 %doc %{nshort}/{LICENSE,README,README.CHANGES,README.SECURITY,README.SUPPORT}
148 %config(noreplace) %verify(not md5 mtime size) %{_etcdir}/*
149 %attr(755,root,root) %{_cgidir}/*
151 %attr(755,root,root) %{_libdir}/bin
153 %attr(755,root,root) %{_libdir}/ext
156 %attr(755,root,root) %{_libdir}/web/bb-*
157 %attr(755,root,root) %{_libdir}/web/mk*
160 %attr(755,root,root) %{_libdir}/runbb.sh
162 %attr(775,root,bb) %dir %{_htmldir}
163 %attr(775,root,bb) %{_htmldir}/html
166 %{_htmldir}/index.html
169 %attr(775,root,http) %{_htmldir}/rep
171 %attr(775,root,bb) %{_vardir}/*
172 %attr(754,root,root) /etc/rc.d/init.d/bb