wok diff clamav/receipt @ rev 1104

Up: clamav (0.93.3) Antivirus
author Paul Issott <paul@slitaz.org>
date Fri Jul 18 22:38:32 2008 +0000 (2008-07-18)
parents
children 4a84b1fa39c3
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/clamav/receipt	Fri Jul 18 22:38:32 2008 +0000
     1.3 @@ -0,0 +1,76 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="clamav"
     1.7 +VERSION="0.93.3"
     1.8 +CATEGORY="security"
     1.9 +SHORT_DESC="Antivirus"
    1.10 +MAINTAINER="paul@slitaz.org"
    1.11 +DEPENDS=""
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.13 +WEB_SITE="http://www.clamav.net/"
    1.14 +WGET_URL="http://downloads.sourceforge.net/clamav/$TARBALL"
    1.15 +
    1.16 +# Rules to configure and make the package.
    1.17 +compile_rules()
    1.18 +{
    1.19 +	# Have to create clamav user/group to be able to compile
    1.20 +	adduser clamav -s /bin/false -H -D -S
    1.21 +
    1.22 +	cd $src
    1.23 +	./configure \
    1.24 +		--prefix=/usr \
    1.25 +		--sysconfdir=/etc/clamav \
    1.26 +		--infodir=/usr/share/info \
    1.27 +		--mandir=/usr/share/man \
    1.28 +		$CONFIGURE_ARGS
    1.29 +	make
    1.30 +	make DESTDIR=$PWD/_pkg install
    1.31 +}
    1.32 +
    1.33 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.34 +genpkg_rules()
    1.35 +{
    1.36 +	mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d
    1.37 +	cp -a $_pkg/usr/bin $fs/usr
    1.38 +	cp -a $_pkg/usr/sbin $fs/usr
    1.39 +	cp -a $_pkg/etc $fs
    1.40 +	# Copy only shared lib (.so)
    1.41 +	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
    1.42 +	cp -a $_pkg/usr/share/clamav $fs/usr/share
    1.43 +	# Copy daemon from /stuff
    1.44 +	cp stuff/daemon-clamd $fs/etc/init.d/clamd
    1.45 +}
    1.46 +
    1.47 +post_install()
    1.48 +{
    1.49 +	echo "Processing post-install commands..."
    1.50 +	
    1.51 +	# Enable freshclam update
    1.52 +	echo -n "Enabling freshclam update..."
    1.53 +	cd /etc/clamav
    1.54 +	sed 's/^Example/#Example/' < freshclam.conf > temp.file
    1.55 +	mv temp.file freshclam.conf
    1.56 +	status
    1.57 +
    1.58 +	# Enable clamd configuration
    1.59 +	echo -n "Enabling clamd daemon..."
    1.60 +	cd /etc/clamav
    1.61 +	sed 's/^Example/#Example/; s/^#PidFile/PidFile/' < clamd.conf > temp.file
    1.62 +	mv temp.file clamd.conf
    1.63 +	status
    1.64 +
    1.65 +	
    1.66 +	# adduser clamav if needed
    1.67 +	if ! grep -q clamav /etc/passwd; then
    1.68 +		echo "Adding user clamav..."
    1.69 +		adduser clamav -s /bin/false -H -D -S
    1.70 +		status
    1.71 +	fi
    1.72 +}
    1.73 +
    1.74 +# Del user clamav when pkg is removed.
    1.75 +post_remove()
    1.76 +{
    1.77 +	deluser clamav	
    1.78 +}
    1.79 +