wok view clamav/receipt @ rev 10013
binutils: use --build and --host like it was in 3.0 and above so we got the correct tripplet
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 19 05:35:18 2011 +0200 (2011-05-19) |
parents | c11845afb313 |
children | e554dc108e47 |
line source
1 # SliTaz package receipt.
3 PACKAGE="clamav"
4 VERSION="0.97"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus."
7 MAINTAINER="paul@slitaz.org"
8 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libltdl"
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 -s /bin/false -H -D clamav
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 -s /bin/false -H -D -u 64 clamav
73 status
74 fi
76 # addgroup clamav if needed
77 if ! grep -q clamav $1/etc/group; then
78 echo -n "Adding group clamav..."
79 chroot $1/ addgroup -g 64 clamav
80 status
81 fi
83 # Enable daily.cvd updates (sometimes needed for new version)
84 chown -R clamav:clamav $1/usr/share/clamav
85 }
87 # Del user clamav when pkg is removed.
88 post_remove()
89 {
90 deluser clamav
91 }