wok view clamav/receipt @ rev 19099
libgnome-keyring: add arm support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 03 22:53:34 2016 +0200 (2016-05-03) |
parents | 9e01bc6321ea |
children | dd35682fcd62 |
line source
1 # SliTaz package receipt.
3 PACKAGE="clamav"
4 VERSION="0.98.1"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus."
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.clamav.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 TAGS="antivirus"
14 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libltdl"
15 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev ncurses-dev bash"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 export LDFLAGS="$LDFLAGS -ltinfo"
21 # Have to create clamav user/group to be able to compile
22 adduser -s /bin/false -H -D -u 64 clamav
24 ./configure \
25 --prefix=/usr \
26 --sysconfdir=/etc/clamav \
27 --with-dbdir=/var/lib/clamav \
28 --with-iconv=no \
29 $CONFIGURE_ARGS &&
30 make &&
31 make DESTDIR=$DESTDIR install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/lib $fs/etc/init.d $fs/var/lib/clamav \
38 $fs/var/log/clamav $fs/run/clamav
39 cp -a $install/usr/bin $fs/usr
40 rm -f $fs/usr/bin/clamav-config
41 cp -a $install/usr/sbin $fs/usr
42 cp -a $install/etc $fs
43 mv $fs/etc/clamav/clamd.conf* $fs/etc/clamav/clamd.conf
44 mv $fs/etc/clamav/freshclam.conf* $fs/etc/clamav/freshclam.conf
45 # Copy only shared lib (.so)
46 cp -a $install/usr/lib/*.so* $fs/usr/lib
47 # Copy daemon from /$stuff
48 cp $stuff/daemon-clamd $fs/etc/init.d/clamd
50 # Customize config
51 sed -i -e "s/^Example/#Example/" \
52 -e "s|^#LogFile /tmp/clamd.log|LogFile /var/log/clamav/clamav.log|" \
53 -e "s|^#PidFile.*|PidFile /run/clamav/clamd.pid|" \
54 -e "s|^#LocalSocket /tmp/clamd.socket|LocalSocket /run/clamav/clamd-socket|" \
55 $fs/etc/clamav/clamd.conf
57 }
59 post_install()
60 {
61 local user=clamav
62 local group=clamav
64 # Enable freshclam update
65 echo; action 'Enabling freshclam update...'
66 cd "$1/etc/clamav"
67 sed -i 's/^Example/#Example/' freshclam.conf
68 status
70 # adduser clamav if needed
71 if ! grep -q "${user}:" "$1/etc/passwd"; then
72 action 'Adding user/group $user...'
73 chroot "$1/" addgroup -S $group
74 chroot "$1/" adduser -s /bin/false -S -D -H -G $group $user
75 status
76 fi
78 # Enable daily.cvd updates (sometimes needed for new version)
79 #chown -R ${user}:${group} "$1/var/lib/clamav"
81 # Fix perms
82 chroot "$1/" chown -R ${user}.${group} /var/log/clamav \
83 /run/clamav /var/lib/clamav
84 }
86 # Del user clamav when pkg is removed.
87 post_remove()
88 {
89 chroot "$1/" deluser clamav
90 }