wok-next view clamav/receipt @ rev 11080

Up: claws-mail-archive to 0.6.10.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Oct 17 01:54:41 2011 +0000 (2011-10-17)
parents a1644dbcf632
children d2d3a1cb8911
line source
1 # SliTaz package receipt.
3 PACKAGE="clamav"
4 VERSION="0.97.2"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus."
7 MAINTAINER="paul@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.clamav.net/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
11 TAGS="antivirus"
13 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libltdl"
14 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev ncurses-dev bash"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 # Have to create clamav user/group to be able to compile
20 adduser -s /bin/false -H -D clamav
22 cd $src
23 ./configure \
24 --sysconfdir=/etc/clamav \
25 --with-iconv=no \
26 $CONFIGURE_ARGS &&
27 make &&
28 make DESTDIR=$DESTDIR 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 -i 's/^Example/#Example/' freshclam.conf
53 status
55 # Enable clamd configuration
56 echo -n "Enabling clamd daemon..."
57 cd $1/etc/clamav
58 sed -i 's/^Example/#Example/; s/^#PidFile/PidFile/' clamd.conf
59 status
61 # Enable local socket
62 echo -n "Enabling local socket..."
63 cd $1/etc/clamav
64 sed -i 's/^#LocalSocket /LocalSocket /' clamd.conf
65 status
67 # adduser clamav if needed
68 if ! grep -q clamav $1/etc/passwd; then
69 echo -n "Adding user clamav..."
70 chroot $1/ adduser -s /bin/false -H -D -u 64 clamav
71 status
72 fi
74 # addgroup clamav if needed
75 if ! grep -q clamav $1/etc/group; then
76 echo -n "Adding group clamav..."
77 chroot $1/ addgroup -g 64 clamav
78 status
79 fi
81 # Enable daily.cvd updates (sometimes needed for new version)
82 chown -R clamav:clamav $1/usr/share/clamav
83 }
85 # Del user clamav when pkg is removed.
86 post_remove()
87 {
88 chroot "$1/" deluser clamav
89 }