wok annotate clamav/receipt @ rev 20930
updated fluidsynth again (1.1.3 -> 2.0.4)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Mar 02 13:46:27 2019 +0100 (2019-03-02) |
parents | c44b8ec1b3d3 |
children | a4e913105025 |
rev | line source |
---|---|
paul@1104 | 1 # SliTaz package receipt. |
paul@1104 | 2 |
paul@1104 | 3 PACKAGE="clamav" |
Hans-G?nter@20789 | 4 VERSION="0.101.1" |
paul@1104 | 5 CATEGORY="security" |
Hans-G?nter@20789 | 6 TAGS="antivirus" |
paul@1341 | 7 SHORT_DESC="Antivirus." |
paul@1104 | 8 MAINTAINER="paul@slitaz.org" |
pascal@16051 | 9 LICENSE="GPL2" |
Hans-G?nter@20789 | 10 WEB_SITE="http://www.clamav.net/" |
Hans-G?nter@20789 | 11 |
paul@1104 | 12 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@20086 | 13 WGET_URL="${WEB_SITE}downloads/production/$TARBALL" |
paul@1104 | 14 |
pascal@20087 | 15 DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libltdl libssl" |
pascal@20087 | 16 BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev ncurses-dev openssl-dev bash" |
slaxemulator@10996 | 17 |
paul@1104 | 18 # Rules to configure and make the package. |
paul@1104 | 19 compile_rules() |
paul@1104 | 20 { |
pascal@17670 | 21 export LDFLAGS="$LDFLAGS -ltinfo" |
paul@1104 | 22 # Have to create clamav user/group to be able to compile |
slaxemulator@15826 | 23 adduser -s /bin/false -H -D -u 64 clamav |
paul@1104 | 24 |
paul@1104 | 25 ./configure \ |
paul@16157 | 26 --prefix=/usr \ |
paul@1104 | 27 --sysconfdir=/etc/clamav \ |
paul@16157 | 28 --with-dbdir=/var/lib/clamav \ |
pascal@3076 | 29 --with-iconv=no \ |
pascal@20087 | 30 --disable-zlib-vcheck \ |
slaxemulator@15826 | 31 $CONFIGURE_ARGS && |
slaxemulator@15826 | 32 make && |
slaxemulator@15826 | 33 make DESTDIR=$DESTDIR install |
paul@1104 | 34 } |
paul@1104 | 35 |
paul@1104 | 36 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@1104 | 37 genpkg_rules() |
paul@1104 | 38 { |
paul@16157 | 39 mkdir -p $fs/usr/lib $fs/etc/init.d $fs/var/lib/clamav \ |
paul@16157 | 40 $fs/var/log/clamav $fs/run/clamav |
erjo@11931 | 41 cp -a $install/usr/bin $fs/usr |
slaxemulator@15826 | 42 rm -f $fs/usr/bin/clamav-config |
erjo@11931 | 43 cp -a $install/usr/sbin $fs/usr |
erjo@11931 | 44 cp -a $install/etc $fs |
pascal@16052 | 45 mv $fs/etc/clamav/clamd.conf* $fs/etc/clamav/clamd.conf |
pascal@16052 | 46 mv $fs/etc/clamav/freshclam.conf* $fs/etc/clamav/freshclam.conf |
paul@1104 | 47 # Copy only shared lib (.so) |
erjo@11931 | 48 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pankso@9697 | 49 # Copy daemon from /$stuff |
pankso@9697 | 50 cp $stuff/daemon-clamd $fs/etc/init.d/clamd |
al@18734 | 51 |
erjo@11931 | 52 # Customize config |
erjo@11931 | 53 sed -i -e "s/^Example/#Example/" \ |
erjo@11931 | 54 -e "s|^#LogFile /tmp/clamd.log|LogFile /var/log/clamav/clamav.log|" \ |
paul@16157 | 55 -e "s|^#PidFile.*|PidFile /run/clamav/clamd.pid|" \ |
paul@16157 | 56 -e "s|^#LocalSocket /tmp/clamd.socket|LocalSocket /run/clamav/clamd-socket|" \ |
erjo@11931 | 57 $fs/etc/clamav/clamd.conf |
erjo@11931 | 58 |
paul@1104 | 59 } |
paul@1104 | 60 |
paul@1104 | 61 post_install() |
paul@1104 | 62 { |
al@18734 | 63 local user=clamav |
al@18734 | 64 local group=clamav |
al@18734 | 65 |
paul@1104 | 66 # Enable freshclam update |
al@18734 | 67 echo; action 'Enabling freshclam update...' |
pascal@18730 | 68 cd "$1/etc/clamav" |
al@18734 | 69 sed -i 's/^Example/#Example/' freshclam.conf |
paul@1104 | 70 status |
paul@1104 | 71 |
paul@1104 | 72 # adduser clamav if needed |
pascal@18730 | 73 if ! grep -q "${user}:" "$1/etc/passwd"; then |
al@18734 | 74 action 'Adding user/group $user...' |
pascal@18730 | 75 chroot "$1/" addgroup -S $group |
pascal@18730 | 76 chroot "$1/" adduser -s /bin/false -S -D -H -G $group $user |
paul@1104 | 77 status |
paul@1104 | 78 fi |
paul@1595 | 79 |
paul@1707 | 80 # Enable daily.cvd updates (sometimes needed for new version) |
pascal@18730 | 81 #chown -R ${user}:${group} "$1/var/lib/clamav" |
al@18734 | 82 |
erjo@11931 | 83 # Fix perms |
pascal@18730 | 84 chroot "$1/" chown -R ${user}.${group} /var/log/clamav \ |
paul@16157 | 85 /run/clamav /var/lib/clamav |
paul@1104 | 86 } |
paul@1104 | 87 |
paul@1104 | 88 # Del user clamav when pkg is removed. |
paul@1104 | 89 post_remove() |
paul@1104 | 90 { |
al@18734 | 91 chroot "$1/" deluser clamav |
paul@1104 | 92 } |