SPECS: protolog.spec - init and config moved to SOURCES - pass CC ...
glen
glen at pld-linux.org
Sun Mar 12 22:54:55 CET 2006
Author: glen Date: Sun Mar 12 21:54:55 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- init and config moved to SOURCES
- pass CC
- rel 7
---- Files affected:
SPECS:
protolog.spec (1.36 -> 1.37)
---- Diffs:
================================================================
Index: SPECS/protolog.spec
diff -u SPECS/protolog.spec:1.36 SPECS/protolog.spec:1.37
--- SPECS/protolog.spec:1.36 Tue Dec 13 15:37:24 2005
+++ SPECS/protolog.spec Sun Mar 12 22:54:49 2006
@@ -3,14 +3,15 @@
Summary(pl): Program zapisujący informacje związane z protokołami Internetowymi
Name: protolog
Version: 1.0.8
-Release: 6
+Release: 7
License: GPL
Group: Networking
-Vendor: Diego Javier Grigna <diego at grigna.com>
URL: http://www.grigna.com/diego/linux/
Source0: ftp://sunsite.unc.edu/pub/Linux/system/network/monitor/%{name}-%{version}.tar.gz
# Source0-md5: c5a48e61170b3ead0dc55ad86454da1d
Source1: %{name}.logrotate
+Source2: %{name}.conf
+Source3: %{name}.init
Patch0: %{name}-1.0.8.make.diff
Requires(post,preun): /sbin/chkconfig
Requires: rc-scripts
@@ -30,12 +31,13 @@
%build
%{__make} -C src \
+ CC="%{__cc}" \
OPT="%{rpmcflags}"
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,logrotate.d},%{_sbindir},%{_mandir}/man8} \
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,logrotate.d},%{_sbindir},%{_mandir}/man8} \
$RPM_BUILD_ROOT/var/log/archiv/protolog
%{__make} -C src install \
@@ -45,80 +47,9 @@
touch $RPM_BUILD_ROOT/var/log/protolog/{icmp.log,icmp.raw,tcp.log,tcp.raw,udp.log,udp.raw}
-cat << EOF > $RPM_BUILD_ROOT/etc/rc.d/init.d/protolog
-#!/bin/bash
-#
-# chkconfig: 2345 50 50
-# description: IP protocols logger - logs TCP and ICMP.
-#
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# Source networking configuration.
-. /etc/sysconfig/network
-
-PLOGTCP="-q"
-PLOGUDP="-q"
-PLOGICMP="-q"
-
-if [ -r %{_sysconfdir}/protolog.conf ]; then
-. %{_sysconfdir}/protolog.conf
-fi
-
-# Check that networking is up.
-[ \${NETWORKING} = "no" ] && exit 0
-# See how we were called.
-case "\$1" in
- start)
- show Starting protolog TCP daemon:
- daemon plogtcp \$PLOGTCP
- show Starting protolog UDP daemon:
- daemon plogudp \$PLOGUDP
- show Starting protolog ICMP daemon:
- daemon plogicmp \$PLOGICMP
- touch /var/lock/subsys/protolog
- ;;
- stop)
- show Stopping protolog TCP daemon:
- killproc plogtcp
- show Stopping protolog UDP daemon:
- killproc plogudp
- show Stopping protolog ICMP daemon:
- killproc plogicmp
- rm -f /var/lock/subsys/protolog
- ;;
- status)
- status protolog
- ;;
- restart)
- \$0 stop
- \$0 start
- ;;
- *)
- echo "Usage: \$0 {start|stop|status|restart}"
- exit 1
-esac
-
-exit 0
-EOF
-
-cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/protolog.conf
-#
-# Opcje dla plogtcp - TCP packet logger
-# zobacz: man plogtcp
-PLOGTCP="-qlri \`hostname --ip-address\`"
-
-# Opcje dla plogudp - UDP packet logger
-# zobacz: man plogudp
-PLOGUDP="-qli \`hostname --ip-address\`"
-
-# Opcje dla plogicmp - ICMP packet logger
-# zobacz: man plogicmp
-PLOGICMP="-qlri \`hostname --ip-address\`"
-
-EOF
-
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/protolog
%clean
rm -rf $RPM_BUILD_ROOT
@@ -140,7 +71,7 @@
%attr(750,root,root) %dir /var/log/archiv/protolog
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /var/log/protolog/*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/protolog
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/protolog.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/protolog
%{_mandir}/man8/*
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -149,6 +80,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.37 2006/03/12 21:54:49 glen
+- init and config moved to SOURCES
+- pass CC
+- rel 7
+
Revision 1.36 2005/12/13 14:37:24 glen
- adapterized (sorted %verify flags)
@@ -179,7 +115,7 @@
- adding es/pt_BR Group translations
Revision 1.27 2002/01/18 02:14:42 kloczek
-perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
+- perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
Revision 1.26 2001/09/25 12:27:59 qboosh
- release 6: run chkconfig --del only on remove, not upgrade
@@ -192,7 +128,7 @@
- prereq chkconfig
Revision 1.22 2001/05/02 21:51:28 qboosh
-- adapterized and made spec %%debug ready or added using %%rpm*flags macros
+- adapterized and made spec %debug ready or added using %rpm*flags macros
Revision 1.21 2000/09/01 14:41:00 baggins
- typo
@@ -205,7 +141,7 @@
- fixed logrotate config
Revision 1.18 2000/06/09 07:23:51 kloczek
-- added using %%{__make} macro.
+- added using %{__make} macro.
Revision 1.17 2000/06/07 04:36:13 kloczek
- spec adapterized.
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/protolog.spec?r1=1.36&r2=1.37&f=u
More information about the pld-cvs-commit
mailing list