wok-next rev 21229

updated clamav (0.99.4 -> 0.101.1)
author Hans-G?nter Theisgen
date Tue Dec 03 16:54:38 2019 +0100 (2019-12-03)
parents 01903f3f2f24
children 860cc97cdddf
files clamav/receipt
line diff
     1.1 --- a/clamav/receipt	Tue Dec 03 16:39:59 2019 +0100
     1.2 +++ b/clamav/receipt	Tue Dec 03 16:54:38 2019 +0100
     1.3 @@ -1,64 +1,72 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6  PACKAGE="clamav"
     1.7 -VERSION="0.99.4"
     1.8 +VERSION="0.101.1"
     1.9  CATEGORY="security"
    1.10  SHORT_DESC="Antivirus"
    1.11  MAINTAINER="paul@slitaz.org"
    1.12  LICENSE="GPL2"
    1.13 -WEB_SITE="https://www.clamav.net/"
    1.14 +WEB_SITE="http://www.clamav.net/"
    1.15  
    1.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.17 -WGET_URL="https://www.clamav.net/downloads/production/$TARBALL"
    1.18 +WGET_URL="http://www.clamav.net/downloads/production/$TARBALL"
    1.19  
    1.20 -BUILD_DEPENDS="zlib-dev gmp gmp-dev bzip2-dev ncurses-dev bash \
    1.21 -libxml2-dev openssl-dev"
    1.22 +BUILD_DEPENDS="bash bzip2-dev gmp gmp-dev libxml2-dev ncurses-dev 
    1.23 +	openssl-dev zlib-dev"
    1.24  SPLIT="$PACKAGE-dev"
    1.25  
    1.26 -compile_rules() {
    1.27 +compile_rules()
    1.28 +{
    1.29  	grep -rl 'alignof(' * | xargs sed -i 's|alignof(|alignof_(|'
    1.30  	grep -rl 'alignof<' * | xargs sed -i 's|alignof<|alignof_<|'
    1.31  	grep -rl '__alignof_' * | xargs sed -i 's|__alignof_|__alignof|'
    1.32 -	sed -i 's|make_pair<.*>|make_pair|' libclamav/c++/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp
    1.33 -	sed -i 's|~0|~0U|g' libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp \
    1.34 -			libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
    1.35 +
    1.36 +	sed -i 's|make_pair<.*>|make_pair|' \
    1.37 +		libclamav/c++/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp
    1.38 +	sed -i 's|~0|~0U|g' \
    1.39 +		libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp \
    1.40 +		libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
    1.41  
    1.42  	# Have to create clamav user/group to be able to compile
    1.43  	adduser -s /bin/false -H -D -u 64 clamav
    1.44  
    1.45 -	./configure \
    1.46 -		--sysconfdir=/etc/clamav \
    1.47 -		--with-dbdir=/var/lib/clamav \
    1.48 -		--with-iconv=no \
    1.49 +	./configure				\
    1.50 +		--sysconfdir=/etc/clamav	\
    1.51 +		--with-dbdir=/var/lib/clamav	\
    1.52 +		--with-iconv=no			\
    1.53  		$CONFIGURE_ARGS &&
    1.54  	fix libtool &&
    1.55  	make &&
    1.56  	make DESTDIR=$install install
    1.57  }
    1.58  
    1.59 -genpkg_rules() {
    1.60 +genpkg_rules()
    1.61 +{
    1.62  	case $PACKAGE in
    1.63  		clamav)
    1.64 -			mkdir -p $fs/usr/lib $fs/etc/init.d $fs/var/lib/clamav \
    1.65 -				$fs/var/log/clamav $fs/run/clamav
    1.66 -			cp -a $install/usr/bin $fs/usr
    1.67 +			mkdir -p $fs/usr/lib $fs/etc/init.d $fs/var/lib/clamav
    1.68 +			mkdir -p $fs/var/log/clamav $fs/run/clamav
    1.69 +
    1.70 +			cp -a $install/usr/bin		$fs/usr
    1.71  			rm -f $fs/usr/bin/clamav-config
    1.72 -			cp -a $install/usr/sbin $fs/usr
    1.73 -			cp -a $install/etc $fs
    1.74 -			mv $fs/etc/clamav/clamd.conf* $fs/etc/clamav/clamd.conf
    1.75 +			cp -a $install/usr/sbin		$fs/usr
    1.76 +			cp -a $install/etc		$fs
    1.77 +			mv $fs/etc/clamav/clamd.conf*	$fs/etc/clamav/clamd.conf
    1.78  			mv $fs/etc/clamav/freshclam.conf* $fs/etc/clamav/freshclam.conf
    1.79 -			# Copy only shared lib (.so)
    1.80 -			cp -a $install/usr/lib/*.so* $fs/usr/lib
    1.81 +
    1.82 +			# Copy only shared libraries (.so)
    1.83 +			cp -a $install/usr/lib/*.so*	$fs/usr/lib
    1.84 +
    1.85  			# Copy daemon from /$stuff
    1.86 -			cp $stuff/daemon-clamd $fs/etc/init.d/clamd
    1.87 +			cp $stuff/daemon-clamd		$fs/etc/init.d/clamd
    1.88  
    1.89 -			# Customize config
    1.90 -			sed -i -e "s/^Example/#Example/" \
    1.91 +			# Customize configuration
    1.92 +			sed -i	-e "s/^Example/#Example/" \
    1.93  				-e "s|^#LogFile /tmp/clamd.log|LogFile /var/log/clamav/clamav.log|" \
    1.94  				-e "s|^#PidFile.*|PidFile /run/clamav/clamd.pid|" \
    1.95  				-e "s|^#LocalSocket /tmp/clamd.socket|LocalSocket /run/clamav/clamd-socket|" \
    1.96  				$fs/etc/clamav/clamd.conf
    1.97 -			DEPENDS="zlib gmp bzip2 slitaz-base-files ncurses libltdl"
    1.98 +			DEPENDS="bzip2 gmp libltdl ncurses slitaz-base-files zlib"
    1.99  			TAGS="antivirus"
   1.100  			;;
   1.101  		*-dev)
   1.102 @@ -67,18 +75,21 @@
   1.103  	esac
   1.104  }
   1.105  
   1.106 -post_install_clamav() {
   1.107 +post_install_clamav()
   1.108 +{
   1.109  	local user=clamav
   1.110  	local group=clamav
   1.111  
   1.112  	# Enable freshclam update
   1.113 -	echo; action 'Enabling freshclam update...'
   1.114 +	echo
   1.115 +	action 'Enabling freshclam update...'
   1.116  	cd "$1/etc/clamav"
   1.117  	sed -i 's/^Example/#Example/' freshclam.conf
   1.118  	status
   1.119  
   1.120  	# adduser clamav if needed
   1.121 -	if ! grep -q "$user:" "$1/etc/passwd"; then
   1.122 +	if ! grep -q "$user:" "$1/etc/passwd"
   1.123 +	  then
   1.124  		action 'Adding user/group $user...'
   1.125  		chroot "$1/" addgroup -S $group
   1.126  		chroot "$1/" adduser -s /bin/false -S -D -H -G $group $user
   1.127 @@ -88,11 +99,12 @@
   1.128  	# Enable daily.cvd updates (sometimes needed for new version)
   1.129  	#chown -R $user:$group "$1/var/lib/clamav"
   1.130  
   1.131 -	# Fix perms
   1.132 +	# Fix permissions
   1.133  	chroot "$1/" chown -R $user.$group /var/log/clamav \
   1.134  		/run/clamav /var/lib/clamav
   1.135  }
   1.136  
   1.137 -post_remove_clamav() {
   1.138 +post_remove_clamav()
   1.139 +{
   1.140  	chroot "$1/" deluser clamav
   1.141  }