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: 02-Jul-2003 14:32:19
Branch: HEAD Handle: 2003070213321900
Added files:
openpkg-src/clamav rc.clamav
Modified files:
openpkg-src/clamav clamav.spec
Log:
finish packaging this
Summary:
Revision Changes Path
1.3 +45 -5 openpkg-src/clamav/clamav.spec
1.1 +26 -0 openpkg-src/clamav/rc.clamav
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/clamav/clamav.spec
============================================================================
$ cvs diff -u -r1.2 -r1.3 clamav.spec
--- openpkg-src/clamav/clamav.spec 2 Jul 2003 07:57:46 -0000 1.2
+++ openpkg-src/clamav/clamav.spec 2 Jul 2003 12:32:19 -0000 1.3
@@ -60,6 +60,7 @@
%setup -q
%build
+ # configure package
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags}" \
@@ -67,21 +68,60 @@
./configure \
--prefix=%{l_prefix} \
--sysconfdir=%{l_prefix}/etc/clamav \
- --with-user=%{l_musr} \
- --with-group=%{l_mgrp} \
+ --with-user=%{l_rusr} \
+ --with-group=%{l_rgrp} \
--disable-clamav \
--disable-clamuko \
--disable-urandom \
- --disable-pthreads \
--disable-cr \
--disable-shared
+
+ # build package
%{l_make} %{l_mflags -O}
%install
rm -rf $RPM_BUILD_ROOT
+
+ # perform standard package installation
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+ # install default configuration
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/clamav
+ %{l_shtool} install -c -m 644 \
+ -e 's;^\(Example\);#\1;' \
+ -e 's;^#\(LogFile\).*;\1 %{l_prefix}/var/clamav/clamd.log;' \
+ -e 's;^#\(PidFile\).*;\1 %{l_prefix}/var/clamav/clamd.pid;' \
+ -e 's;^\(LocalSocket\).*;\1 %{l_prefix}/var/clamav/clamd.sock;' \
+ -e 's;^#\(DataDirectory\).*;\1 %{l_prefix}/share/clamav;' \
+ -e 's;^#\(User\).*;\1 %{l_rusr};' \
+ etc/clamav.conf \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/clamav/
+
+ # install run-command script
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
+ %{l_shtool} install -c -m 755 \
+ -e 's;@l_prefix@;%{l_prefix};g' \
+ -e 's;@l_rusr@;%{l_rusr};g' \
+ -e 's;@l_rgrp@;%{l_rgrp};g' \
+ %{SOURCE rc.clamav} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+
+ # strip-down installation hierarchy
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+ strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/clamav-milter.1
+
+ # create additional installation directory
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/var/clamav
+
+ # determine installation files
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%config %{l_prefix}/etc/clamav/clamav.conf' \
+ '%attr(755,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/clamav' \
+ '%attr(755,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/clamav'
%files -f files
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/clamav/rc.clamav
============================================================================
$ cvs diff -u -r0 -r1.1 rc.clamav
--- /dev/null 2003-07-02 14:32:19.000000000 +0200
+++ rc.clamav 2003-07-02 14:32:19.000000000 +0200
@@ -0,0 +1,26 @@
[EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc
+##
+## rc.clamav -- Run-Commands
+##
+
+%config
+ clamav_enable="yes"
+
+%common
+ clamav_cfgfile="@l_prefix@/etc/clamav/clamav.conf"
+ clamav_pidfile="@l_prefix@/var/clamav/clamd.pid"
+
+%start -p 200 -u @l_rusr@
+ opServiceEnabled clamav || exit 0
+ @l_prefix@/sbin/clamd --config-file=$clamav_cfgfile
+
+%stop -p 200 -u @l_rusr@
+ opServiceEnabled clamav || exit 0
+ if [ -f $clamav_pidfile ]; then
+ kill -TERM `cat $clamav_pidfile`
+ fi
+
+%daily -p 200 -u @l_rusr@
+ opServiceEnabled clamav || exit 0
+ @l_prefix@/bin/freshclam
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]