wok-current view clamav/receipt @ rev 3251
Add: html5lib
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Sun May 31 23:49:06 2009 +0000 (2009-05-31) |
parents | dfeca2ad1595 |
children | c7584773b8f1 |
line source
1 # SliTaz package receipt.
3 PACKAGE="clamav"
4 VERSION="0.95.1"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus."
7 MAINTAINER="paul@slitaz.org"
8 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses"
9 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.clamav.net/"
12 WGET_URL="http://downloads.sourceforge.net/clamav/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # Have to create clamav user/group to be able to compile
18 adduser clamav -s /bin/false -H -D -S
20 cd $src
21 ./configure \
22 --prefix=/usr \
23 --sysconfdir=/etc/clamav \
24 --infodir=/usr/share/info \
25 --mandir=/usr/share/man \
26 --with-iconv=no \
27 $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$PWD/_pkg install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d
36 cp -a $_pkg/usr/bin $fs/usr
37 cp -a $_pkg/usr/sbin $fs/usr
38 cp -a $_pkg/etc $fs
39 # Copy only shared lib (.so)
40 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
41 cp -a $_pkg/usr/share/clamav $fs/usr/share
42 # Copy daemon from /stuff
43 cp stuff/daemon-clamd $fs/etc/init.d/clamd
44 }
46 post_install()
47 {
48 echo "Processing post-install commands..."
50 # Enable freshclam update
51 echo -n "Enabling freshclam update..."
52 cd $1/etc/clamav
53 sed 's/^Example/#Example/' < freshclam.conf > temp.file
54 mv temp.file freshclam.conf
55 status
57 # Enable clamd configuration
58 echo -n "Enabling clamd daemon..."
59 cd $1/etc/clamav
60 sed 's/^Example/#Example/; s/^#PidFile/PidFile/' < clamd.conf > temp.file
61 mv temp.file clamd.conf
62 status
64 # adduser clamav if needed
65 if ! grep -q clamav $1/etc/passwd; then
66 echo -n "Adding user clamav..."
67 chroot $1/ adduser clamav -s /bin/false -H -D -S
68 status
69 fi
71 # Enable daily.cvd updates (sometimes needed for new version)
72 chown -R clamav:clamav /usr/share/clamav
73 }
75 # Del user clamav when pkg is removed.
76 post_remove()
77 {
78 deluser clamav
79 }