wok annotate clamav/receipt @ rev 4430

wodim: update depends
author Paul Issott <paul@slitaz.org>
date Mon Oct 26 19:29:06 2009 +0000 (2009-10-26)
parents 549dee08a66a
children 90e89069273c
rev   line source
paul@1104 1 # SliTaz package receipt.
paul@1104 2
paul@1104 3 PACKAGE="clamav"
erjo@3463 4 VERSION="0.95.2"
paul@1104 5 CATEGORY="security"
paul@1341 6 SHORT_DESC="Antivirus."
paul@1104 7 MAINTAINER="paul@slitaz.org"
pankso@3075 8 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses"
paul@1711 9 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev"
paul@1104 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
paul@1104 11 WEB_SITE="http://www.clamav.net/"
paul@1104 12 WGET_URL="http://downloads.sourceforge.net/clamav/$TARBALL"
paul@1104 13
paul@1104 14 # Rules to configure and make the package.
paul@1104 15 compile_rules()
paul@1104 16 {
paul@1104 17 # Have to create clamav user/group to be able to compile
paul@1104 18 adduser clamav -s /bin/false -H -D -S
paul@1104 19
paul@1104 20 cd $src
paul@1104 21 ./configure \
paul@1104 22 --prefix=/usr \
paul@1104 23 --sysconfdir=/etc/clamav \
paul@1104 24 --infodir=/usr/share/info \
paul@1104 25 --mandir=/usr/share/man \
pascal@3076 26 --with-iconv=no \
pascal@2608 27 $CONFIGURE_ARGS &&
pascal@2608 28 make &&
paul@1104 29 make DESTDIR=$PWD/_pkg install
paul@1104 30 }
paul@1104 31
paul@1104 32 # Rules to gen a SliTaz package suitable for Tazpkg.
paul@1104 33 genpkg_rules()
paul@1104 34 {
erjo@3463 35 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d
paul@1104 36 cp -a $_pkg/usr/bin $fs/usr
paul@1104 37 cp -a $_pkg/usr/sbin $fs/usr
paul@1104 38 cp -a $_pkg/etc $fs
paul@1104 39 # Copy only shared lib (.so)
paul@1104 40 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
paul@1104 41 cp -a $_pkg/usr/share/clamav $fs/usr/share
paul@1104 42 # Copy daemon from /stuff
paul@1104 43 cp stuff/daemon-clamd $fs/etc/init.d/clamd
paul@1104 44 }
paul@1104 45
paul@1104 46 post_install()
paul@1104 47 {
paul@1104 48 echo "Processing post-install commands..."
paul@1104 49
paul@1104 50 # Enable freshclam update
paul@1104 51 echo -n "Enabling freshclam update..."
pascal@1137 52 cd $1/etc/clamav
paul@1104 53 sed 's/^Example/#Example/' < freshclam.conf > temp.file
paul@1104 54 mv temp.file freshclam.conf
paul@1104 55 status
paul@1104 56
paul@1104 57 # Enable clamd configuration
paul@1104 58 echo -n "Enabling clamd daemon..."
pascal@1137 59 cd $1/etc/clamav
paul@1104 60 sed 's/^Example/#Example/; s/^#PidFile/PidFile/' < clamd.conf > temp.file
paul@1104 61 mv temp.file clamd.conf
paul@1104 62 status
paul@1104 63
paul@1104 64 # adduser clamav if needed
pascal@1137 65 if ! grep -q clamav $1/etc/passwd; then
paul@1341 66 echo -n "Adding user clamav..."
pascal@1137 67 chroot $1/ adduser clamav -s /bin/false -H -D -S
paul@1104 68 status
paul@1104 69 fi
paul@1595 70
paul@1707 71 # Enable daily.cvd updates (sometimes needed for new version)
paul@1722 72 chown -R clamav:clamav /usr/share/clamav
paul@1104 73 }
paul@1104 74
paul@1104 75 # Del user clamav when pkg is removed.
paul@1104 76 post_remove()
paul@1104 77 {
paul@1104 78 deluser clamav
paul@1104 79 }
paul@1104 80