wok annotate clamav/receipt @ rev 4933

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