wok-current view clamav/receipt @ rev 7549

Added jpeg-dev to gdk-pixbuf-dev depends.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Dec 07 23:26:56 2010 +0000 (2010-12-07)
parents e62b6b97629b
children f6df58d6487e
line source
1 # SliTaz package receipt.
3 PACKAGE="clamav"
4 VERSION="0.96.5"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus."
7 MAINTAINER="paul@slitaz.org"
8 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libtool"
9 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev ncurses-dev bash"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.clamav.net/"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 TAGS="antivirus"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 # Have to create clamav user/group to be able to compile
19 adduser clamav -s /bin/false -H -D
21 cd $src
22 ./configure \
23 --prefix=/usr \
24 --sysconfdir=/etc/clamav \
25 --infodir=/usr/share/info \
26 --mandir=/usr/share/man \
27 --with-iconv=no \
28 $CONFIGURE_ARGS &&
29 make -j 4 &&
30 make DESTDIR=$PWD/_pkg install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d
37 cp -a $_pkg/usr/bin $fs/usr
38 cp -a $_pkg/usr/sbin $fs/usr
39 cp -a $_pkg/etc $fs
40 # Copy only shared lib (.so)
41 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
42 cp -a $_pkg/usr/share/clamav $fs/usr/share
43 # Copy daemon from /stuff
44 cp stuff/daemon-clamd $fs/etc/init.d/clamd
45 }
47 post_install()
48 {
49 echo "Processing post-install commands..."
51 # Enable freshclam update
52 echo -n "Enabling freshclam update..."
53 cd $1/etc/clamav
54 sed -i 's/^Example/#Example/' freshclam.conf
55 status
57 # Enable clamd configuration
58 echo -n "Enabling clamd daemon..."
59 cd $1/etc/clamav
60 sed -i 's/^Example/#Example/; s/^#PidFile/PidFile/' clamd.conf
61 status
63 # Enable local socket
64 echo -n "Enabling local socket..."
65 cd $1/etc/clamav
66 sed -i 's/^#LocalSocket /LocalSocket /' clamd.conf
67 status
69 # adduser clamav if needed
70 if ! grep -q clamav $1/etc/passwd; then
71 echo -n "Adding user clamav..."
72 chroot $1/ adduser clamav -s /bin/false -H -D
73 status
74 fi
76 # Enable daily.cvd updates (sometimes needed for new version)
77 chown -R clamav:clamav $1/usr/share/clamav
78 }
80 # Del user clamav when pkg is removed.
81 post_remove()
82 {
83 deluser clamav
84 }