wok-current view clamav/receipt @ rev 2603
Up: clamav (0.95.1)[security fix]
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Fri Apr 10 18:03:20 2009 +0000 (2009-04-10) |
parents | 43431755fb4c |
children | e97c81ccdba0 |
line source
1 # SliTaz package receipt.
3 PACKAGE="clamav"
4 VERSION="0.95.1"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus."
7 MAINTAINER="paul@slitaz.org"
8 DEPENDS="zlib gmp bzip2 libiconv slitaz-base-files"
9 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.clamav.net/"
12 WGET_URL="http://downloads.sourceforge.net/clamav/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # Have to create clamav user/group to be able to compile
18 adduser clamav -s /bin/false -H -D -S
20 cd $src
21 ./configure \
22 --prefix=/usr \
23 --sysconfdir=/etc/clamav \
24 --infodir=/usr/share/info \
25 --mandir=/usr/share/man \
26 $CONFIGURE_ARGS
27 make
28 make DESTDIR=$PWD/_pkg install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d
35 cp -a $_pkg/usr/bin $fs/usr
36 cp -a $_pkg/usr/sbin $fs/usr
37 cp -a $_pkg/etc $fs
38 # Copy only shared lib (.so)
39 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
40 cp -a $_pkg/usr/share/clamav $fs/usr/share
41 # Copy daemon from /stuff
42 cp stuff/daemon-clamd $fs/etc/init.d/clamd
43 }
45 post_install()
46 {
47 echo "Processing post-install commands..."
49 # Enable freshclam update
50 echo -n "Enabling freshclam update..."
51 cd $1/etc/clamav
52 sed 's/^Example/#Example/' < freshclam.conf > temp.file
53 mv temp.file freshclam.conf
54 status
56 # Enable clamd configuration
57 echo -n "Enabling clamd daemon..."
58 cd $1/etc/clamav
59 sed 's/^Example/#Example/; s/^#PidFile/PidFile/' < clamd.conf > temp.file
60 mv temp.file clamd.conf
61 status
63 # adduser clamav if needed
64 if ! grep -q clamav $1/etc/passwd; then
65 echo -n "Adding user clamav..."
66 chroot $1/ adduser clamav -s /bin/false -H -D -S
67 status
68 fi
70 # Enable daily.cvd updates (sometimes needed for new version)
71 chown -R clamav:clamav /usr/share/clamav
72 }
74 # Del user clamav when pkg is removed.
75 post_remove()
76 {
77 deluser clamav
78 }