wok-next annotate clamav/receipt @ rev 1445
Add: gnome_doc_utils, gnome-doc-utils?dev.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Thu Oct 02 23:54:20 2008 +0200 (2008-10-02) |
parents | 10710b8535bc |
children | 017bcfe12393 |
rev | line source |
---|---|
paul@1104 | 1 # SliTaz package receipt. |
paul@1104 | 2 |
paul@1104 | 3 PACKAGE="clamav" |
paul@1341 | 4 VERSION="0.94" |
paul@1104 | 5 CATEGORY="security" |
paul@1341 | 6 SHORT_DESC="Antivirus." |
paul@1104 | 7 MAINTAINER="paul@slitaz.org" |
paul@1341 | 8 DEPENDS="zlib gmp bzip2" |
paul@1341 | 9 BUILD_DEPENDS="zlib-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 \ |
paul@1104 | 26 $CONFIGURE_ARGS |
paul@1104 | 27 make |
paul@1104 | 28 make DESTDIR=$PWD/_pkg install |
paul@1104 | 29 } |
paul@1104 | 30 |
paul@1104 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@1104 | 32 genpkg_rules() |
paul@1104 | 33 { |
paul@1104 | 34 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d |
paul@1104 | 35 cp -a $_pkg/usr/bin $fs/usr |
paul@1104 | 36 cp -a $_pkg/usr/sbin $fs/usr |
paul@1104 | 37 cp -a $_pkg/etc $fs |
paul@1104 | 38 # Copy only shared lib (.so) |
paul@1104 | 39 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
paul@1104 | 40 cp -a $_pkg/usr/share/clamav $fs/usr/share |
paul@1104 | 41 # Copy daemon from /stuff |
paul@1104 | 42 cp stuff/daemon-clamd $fs/etc/init.d/clamd |
paul@1104 | 43 } |
paul@1104 | 44 |
paul@1104 | 45 post_install() |
paul@1104 | 46 { |
paul@1104 | 47 echo "Processing post-install commands..." |
paul@1104 | 48 |
paul@1104 | 49 # Enable freshclam update |
paul@1104 | 50 echo -n "Enabling freshclam update..." |
pascal@1137 | 51 cd $1/etc/clamav |
paul@1104 | 52 sed 's/^Example/#Example/' < freshclam.conf > temp.file |
paul@1104 | 53 mv temp.file freshclam.conf |
paul@1104 | 54 status |
paul@1104 | 55 |
paul@1104 | 56 # Enable clamd configuration |
paul@1104 | 57 echo -n "Enabling clamd daemon..." |
pascal@1137 | 58 cd $1/etc/clamav |
paul@1104 | 59 sed 's/^Example/#Example/; s/^#PidFile/PidFile/' < clamd.conf > temp.file |
paul@1104 | 60 mv temp.file clamd.conf |
paul@1104 | 61 status |
paul@1104 | 62 |
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@1104 | 70 } |
paul@1104 | 71 |
paul@1104 | 72 # Del user clamav when pkg is removed. |
paul@1104 | 73 post_remove() |
paul@1104 | 74 { |
paul@1104 | 75 deluser clamav |
paul@1104 | 76 } |
paul@1104 | 77 |