wok-6.x annotate clamav/receipt @ rev 8111

Fixed pcsxr-svn to use the real tar and not busybox tar.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Jan 23 15:36:07 2011 +0000 (2011-01-23)
parents 37c3bd2e88f2
children 5547d7b70fc2
rev   line source
paul@1104 1 # SliTaz package receipt.
paul@1104 2
paul@1104 3 PACKAGE="clamav"
slaxemulator@7479 4 VERSION="0.96.5"
paul@1104 5 CATEGORY="security"
paul@1341 6 SHORT_DESC="Antivirus."
paul@1104 7 MAINTAINER="paul@slitaz.org"
paul@7101 8 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libtool"
slaxemulator@5411 9 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev ncurses-dev bash"
paul@1104 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
paul@1104 11 WEB_SITE="http://www.clamav.net/"
slaxemulator@7479 12 WGET_URL="$SF_MIRROR/$PACKAGE/$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
slaxemulator@7963 19 adduser -s /bin/false -H -D clamav
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@5801 29 make -j 4 &&
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@5652 54 sed -i 's/^Example/#Example/' 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@5652 60 sed -i 's/^Example/#Example/; s/^#PidFile/PidFile/' clamd.conf
paul@5652 61 status
paul@5652 62
paul@5652 63 # Enable local socket
paul@5652 64 echo -n "Enabling local socket..."
paul@5652 65 cd $1/etc/clamav
paul@5652 66 sed -i 's/^#LocalSocket /LocalSocket /' clamd.conf
paul@1104 67 status
paul@1104 68
paul@1104 69 # adduser clamav if needed
pascal@1137 70 if ! grep -q clamav $1/etc/passwd; then
paul@1341 71 echo -n "Adding user clamav..."
slaxemulator@7963 72 chroot $1/ adduser -s /bin/false -H -D -u 64 clamav
slaxemulator@7963 73 status
slaxemulator@7963 74 fi
slaxemulator@7963 75
slaxemulator@7963 76 # addgroup clamav if needed
slaxemulator@7963 77 if ! grep -q clamav $1/etc/group; then
slaxemulator@7963 78 echo -n "Adding group clamav..."
slaxemulator@7963 79 chroot $1/ addgroup -g 64 clamav
paul@1104 80 status
paul@1104 81 fi
paul@1595 82
paul@1707 83 # Enable daily.cvd updates (sometimes needed for new version)
paul@7101 84 chown -R clamav:clamav $1/usr/share/clamav
paul@1104 85 }
paul@1104 86
paul@1104 87 # Del user clamav when pkg is removed.
paul@1104 88 post_remove()
paul@1104 89 {
paul@1104 90 deluser clamav
paul@1104 91 }
paul@1104 92