OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 09-Jul-2003 09:32:28
Branch: HEAD Handle: 2003070908322700
Modified files:
openpkg-src/portfwd portfwd.spec rc.portfwd
Log:
style cleanups; bugfix rc substitution
Summary:
Revision Changes Path
1.22 +19 -3 openpkg-src/portfwd/portfwd.spec
1.8 +4 -6 openpkg-src/portfwd/rc.portfwd
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/portfwd/portfwd.spec
============================================================================
$ cvs diff -u -r1.21 -r1.22 portfwd.spec
--- openpkg-src/portfwd/portfwd.spec 9 Jul 2003 07:24:21 -0000 1.21
+++ openpkg-src/portfwd/portfwd.spec 9 Jul 2003 07:32:27 -0000 1.22
@@ -58,12 +58,15 @@
%description
Portfwd is a port forwarding daemon which forwards incoming TCP
- connections and/or UDP datagrams to remote hosts. There is support for
- FTP forwarding, transparent proxy, DNS on demand, simple round-robin
- load-balacing, external destination selectors and other minor features.
+ connections and/or UDP datagrams to remote hosts. There is support
+ for FTP forwarding, transparent proxy, DNS on demand, simple
+ round-robin load-balacing, external destination selectors and other
+ minor features.
%prep
%setup -q
+
+ # patch source tree
rm -f config/install-sh
rm -f config/missing
echo "#!/bin/sh" >config/install-sh
@@ -72,6 +75,7 @@
chmod a+x config/missing config/install-sh config/depcomp
%build
+ # configure package
CC="%{l_cc}" \
CXX="%{l_cxx}" \
CFLAGS="%{l_cflags -O}" \
@@ -81,10 +85,14 @@
./configure \
--prefix=%{l_prefix} \
--sysconfdir=%{l_prefix}/etc/portfwd
+
+ # build package
%{l_make} %{l_mflags -O}
%install
rm -rf $RPM_BUILD_ROOT
+
+ # create installation hierarchy
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/sbin \
$RPM_BUILD_ROOT%{l_prefix}/etc/portfwd \
@@ -92,6 +100,8 @@
$RPM_BUILD_ROOT%{l_prefix}/man/man8 \
$RPM_BUILD_ROOT%{l_prefix}/man/man5 \
$RPM_BUILD_ROOT%{l_prefix}/var/portfwd
+
+ # install program and manual page
%{l_shtool} install -c -s -m 755 \
src/portfwd $RPM_BUILD_ROOT%{l_prefix}/sbin/
%{l_shtool} install -c -m 644 \
@@ -99,12 +109,17 @@
%{l_shtool} install -c -m 644 \
-e 's;conf.txt;portfwd.txt;g' \
doc/portfwd.cfg.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
+
+ # install default configuration and configuration grammar summary
%{l_shtool} install -c -m 644 \
+ -e 's;@l_susr@;%{l_susr};g' \
-e 's;@l_nusr@;%{l_nusr};g' \
-e 's;@l_ngrp@;%{l_ngrp};g' \
%{SOURCE portfwd.cfg} $RPM_BUILD_ROOT%{l_prefix}/etc/portfwd/
%{l_shtool} install -c -m 644 \
doc/conf.txt $RPM_BUILD_ROOT%{l_prefix}/etc/portfwd/portfwd.txt
+
+ # install run-command script
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE rc.portfwd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
@@ -116,6 +131,7 @@
%{SOURCE fsl.portfwd} \
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
+ # determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%not %dir %{l_prefix}/etc/fsl' \
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/portfwd/rc.portfwd
============================================================================
$ cvs diff -u -r1.7 -r1.8 rc.portfwd
--- openpkg-src/portfwd/rc.portfwd 7 Jul 2003 21:54:27 -0000 1.7
+++ openpkg-src/portfwd/rc.portfwd 9 Jul 2003 07:32:27 -0000 1.8
@@ -13,14 +13,12 @@
portfwd_log_complevel="9"
%start -p 100 -u @l_susr@
- if opServiceEnabled portfwd; then
- @l_prefix@/sbin/portfwd $portfwd_flags
- fi
+ opServiceEnabled portfwd || exit 0
+ @l_prefix@/sbin/portfwd $portfwd_flags
%stop -p 200 -u @l_susr@
- if opServiceEnabled portfwd; then
- rpmtool signal -d 1 -m @l_prefix@/sbin/portfwd TERM KILL >/dev/null 2>&1 ||
true
- fi
+ opServiceEnabled portfwd || exit 0
+ rpmtool signal -d 1 -m @l_prefix@/sbin/portfwd TERM KILL >/dev/null 2>&1 || true
%daily -u @l_susr@
opServiceEnabled portfwd || exit 0
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]