wok-next annotate clamav/receipt @ rev 21552
updated clamav (0.102.1 -> 0.102.3)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jun 22 10:59:40 2020 +0100 (2020-06-22) |
parents | f4dbd0e89f83 |
children |
rev | line source |
---|---|
al@20459 | 1 # SliTaz package receipt v2. |
paul@1104 | 2 |
paul@1104 | 3 PACKAGE="clamav" |
Hans-G?nter@21552 | 4 VERSION="0.102.3" |
paul@1104 | 5 CATEGORY="security" |
Hans-G?nter@21552 | 6 TAGS="antivirus" |
al@20472 | 7 SHORT_DESC="Antivirus" |
paul@1104 | 8 MAINTAINER="paul@slitaz.org" |
pascal@16051 | 9 LICENSE="GPL2" |
Hans-G?nter@21229 | 10 WEB_SITE="http://www.clamav.net/" |
al@20459 | 11 |
paul@1104 | 12 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@21229 | 13 WGET_URL="http://www.clamav.net/downloads/production/$TARBALL" |
paul@1104 | 14 |
Hans-G?nter@21552 | 15 BUILD_DEPENDS="bash bzip2-dev curl-dev gmp gmp-dev libxml2-dev |
Hans-G?nter@21552 | 16 ncurses-dev openssl-dev zlib-dev" |
al@21020 | 17 SPLIT="$PACKAGE-dev" |
slaxemulator@10996 | 18 |
Hans-G?nter@21229 | 19 compile_rules() |
Hans-G?nter@21229 | 20 { |
pascal@19704 | 21 grep -rl 'alignof(' * | xargs sed -i 's|alignof(|alignof_(|' |
pascal@19704 | 22 grep -rl 'alignof<' * | xargs sed -i 's|alignof<|alignof_<|' |
pascal@19704 | 23 grep -rl '__alignof_' * | xargs sed -i 's|__alignof_|__alignof|' |
Hans-G?nter@21229 | 24 |
Hans-G?nter@21229 | 25 sed -i 's|make_pair<.*>|make_pair|' \ |
Hans-G?nter@21229 | 26 libclamav/c++/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp |
Hans-G?nter@21229 | 27 sed -i 's|~0|~0U|g' \ |
Hans-G?nter@21229 | 28 libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp \ |
Hans-G?nter@21229 | 29 libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp |
pascal@19704 | 30 |
paul@1104 | 31 # Have to create clamav user/group to be able to compile |
slaxemulator@15826 | 32 adduser -s /bin/false -H -D -u 64 clamav |
paul@1104 | 33 |
Hans-G?nter@21229 | 34 ./configure \ |
Hans-G?nter@21552 | 35 --sysconfdir=/etc/clamav \ |
Hans-G?nter@21229 | 36 --with-dbdir=/var/lib/clamav \ |
Hans-G?nter@21229 | 37 --with-iconv=no \ |
Hans-G?nter@21552 | 38 --with-systemdsystemunitdir=none \ |
slaxemulator@15826 | 39 $CONFIGURE_ARGS && |
al@20569 | 40 fix libtool && |
slaxemulator@15826 | 41 make && |
al@21020 | 42 make DESTDIR=$install install |
paul@1104 | 43 } |
paul@1104 | 44 |
Hans-G?nter@21229 | 45 genpkg_rules() |
Hans-G?nter@21229 | 46 { |
al@20459 | 47 case $PACKAGE in |
al@20459 | 48 clamav) |
Hans-G?nter@21552 | 49 mkdir -p $fs/etc/init.d |
Hans-G?nter@21552 | 50 mkdir -p $fs/run/clamav |
Hans-G?nter@21552 | 51 mkdir -p $fs/usr/lib |
Hans-G?nter@21552 | 52 mkdir -p $fs/var/lib/clamav |
Hans-G?nter@21552 | 53 mkdir -p $fs/var/log/clamav |
Hans-G?nter@21229 | 54 |
Hans-G?nter@21229 | 55 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21552 | 56 rm -f $fs/usr/bin/clamav-config |
Hans-G?nter@21229 | 57 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@21229 | 58 cp -a $install/etc $fs |
Hans-G?nter@21229 | 59 mv $fs/etc/clamav/clamd.conf* $fs/etc/clamav/clamd.conf |
al@20459 | 60 mv $fs/etc/clamav/freshclam.conf* $fs/etc/clamav/freshclam.conf |
Hans-G?nter@21229 | 61 |
Hans-G?nter@21229 | 62 # Copy only shared libraries (.so) |
Hans-G?nter@21229 | 63 cp -a $install/usr/lib/*.so* $fs/usr/lib |
Hans-G?nter@21229 | 64 |
al@20459 | 65 # Copy daemon from /$stuff |
Hans-G?nter@21229 | 66 cp $stuff/daemon-clamd $fs/etc/init.d/clamd |
al@18734 | 67 |
Hans-G?nter@21229 | 68 # Customize configuration |
Hans-G?nter@21229 | 69 sed -i -e "s/^Example/#Example/" \ |
al@20459 | 70 -e "s|^#LogFile /tmp/clamd.log|LogFile /var/log/clamav/clamav.log|" \ |
al@20459 | 71 -e "s|^#PidFile.*|PidFile /run/clamav/clamd.pid|" \ |
al@20459 | 72 -e "s|^#LocalSocket /tmp/clamd.socket|LocalSocket /run/clamav/clamd-socket|" \ |
al@20459 | 73 $fs/etc/clamav/clamd.conf |
Hans-G?nter@21229 | 74 DEPENDS="bzip2 gmp libltdl ncurses slitaz-base-files zlib" |
al@20459 | 75 ;; |
al@20459 | 76 *-dev) |
al@20534 | 77 copy @dev |
al@20459 | 78 ;; |
al@20459 | 79 esac |
paul@1104 | 80 } |
paul@1104 | 81 |
Hans-G?nter@21229 | 82 post_install_clamav() |
Hans-G?nter@21229 | 83 { |
al@18734 | 84 local user=clamav |
al@18734 | 85 local group=clamav |
al@18734 | 86 |
paul@1104 | 87 # Enable freshclam update |
Hans-G?nter@21229 | 88 echo |
Hans-G?nter@21229 | 89 action 'Enabling freshclam update...' |
pascal@18730 | 90 cd "$1/etc/clamav" |
al@18734 | 91 sed -i 's/^Example/#Example/' freshclam.conf |
paul@1104 | 92 status |
paul@1104 | 93 |
paul@1104 | 94 # adduser clamav if needed |
Hans-G?nter@21229 | 95 if ! grep -q "$user:" "$1/etc/passwd" |
Hans-G?nter@21229 | 96 then |
al@18734 | 97 action 'Adding user/group $user...' |
pascal@18730 | 98 chroot "$1/" addgroup -S $group |
pascal@18730 | 99 chroot "$1/" adduser -s /bin/false -S -D -H -G $group $user |
paul@1104 | 100 status |
paul@1104 | 101 fi |
paul@1595 | 102 |
paul@1707 | 103 # Enable daily.cvd updates (sometimes needed for new version) |
al@21020 | 104 #chown -R $user:$group "$1/var/lib/clamav" |
al@18734 | 105 |
Hans-G?nter@21229 | 106 # Fix permissions |
al@20570 | 107 chroot "$1/" chown -R $user.$group /var/log/clamav \ |
paul@16157 | 108 /run/clamav /var/lib/clamav |
paul@1104 | 109 } |
paul@1104 | 110 |
Hans-G?nter@21229 | 111 post_remove_clamav() |
Hans-G?nter@21229 | 112 { |
al@18734 | 113 chroot "$1/" deluser clamav |
paul@1104 | 114 } |