wok-next annotate squidclamav/receipt @ rev 18432
blender: update DEPENDS
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Sep 22 00:31:02 2015 +0200 (2015-09-22) |
parents | 8bc27fb245c6 |
children | 9e01bc6321ea |
rev | line source |
---|---|
pascal@9981 | 1 # SliTaz package receipt. |
pascal@9981 | 2 |
pascal@9981 | 3 PACKAGE="squidclamav" |
erjo@14813 | 4 VERSION="6.10" |
pascal@9981 | 5 CATEGORY="security" |
pascal@9981 | 6 SHORT_DESC="Antivirus redirector for Squid proxy." |
pascal@9981 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15022 | 8 LICENSE="GPL3" |
pascal@9981 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@9981 | 10 WEB_SITE="http://squidclamav.darold.net/" |
pascal@9981 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@9981 | 12 CONFIG_FILES="/etc/squidclamav.conf" |
pascal@9981 | 13 |
erjo@11917 | 14 DEPENDS="squid libcurl clamav c_icap squidguard" |
erjo@11917 | 15 BUILD_DEPENDS="curl-dev c_icap-dev" |
pankso@10444 | 16 |
pascal@9981 | 17 # Rules to configure and make the package. |
pascal@9981 | 18 compile_rules() |
pascal@9981 | 19 { |
pascal@9981 | 20 cd $src |
pascal@11894 | 21 mkdir -p $DESTDIR/etc |
pankso@10444 | 22 ./configure \ |
pankso@10444 | 23 --prefix=/usr \ |
erjo@11923 | 24 --libdir=/usr/lib \ |
erjo@11923 | 25 --libexecdir=/var/www/cgi-bin \ |
erjo@11917 | 26 --sysconfdir=/etc \ |
erjo@11917 | 27 $CONFIGURE_ARGS && |
erjo@11917 | 28 make && make install |
pascal@9981 | 29 } |
pascal@9981 | 30 |
pascal@9981 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@9981 | 32 genpkg_rules() |
pascal@9981 | 33 { |
erjo@11917 | 34 mkdir -p $fs/usr \ |
erjo@11917 | 35 $fs/etc/squid/conf.d |
erjo@11917 | 36 |
erjo@11917 | 37 cp -a $install/etc $fs |
erjo@11917 | 38 cp -a $install/usr/lib $fs/usr |
erjo@11923 | 39 cp -a $install/var $fs/ |
erjo@11917 | 40 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d |
erjo@11917 | 41 |
erjo@11917 | 42 # Customise config file |
erjo@11923 | 43 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \ |
erjo@11917 | 44 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \ |
erjo@11917 | 45 $fs/etc/squidclamav.conf |
erjo@12148 | 46 |
erjo@12148 | 47 rm -f $fs/usr/lib/c_icap/*.la |
erjo@12148 | 48 |
erjo@11917 | 49 |
pascal@9981 | 50 } |
erjo@11917 | 51 |
erjo@11917 | 52 #Post install command |
erjo@11917 | 53 post_install() |
erjo@11917 | 54 { |
erjo@12148 | 55 echo 'Service squidclamav squidclamav.so' >> $1/etc/c-icap/c-icap.conf |
erjo@11917 | 56 if ( ps | grep -q squid ); then |
erjo@11917 | 57 /etc/init.d/squid restart |
erjo@11917 | 58 fi |
erjo@11917 | 59 } |
erjo@11917 | 60 |
erjo@11917 | 61 #Post remove command |
erjo@11917 | 62 post_remove() |
erjo@11917 | 63 { |
erjo@12156 | 64 sed -i -e "s/.*squidclamav.*//" $1/etc/c-icap/c-icap.conf |
erjo@11917 | 65 if ( ps | grep -q squid ); then |
erjo@11917 | 66 /etc/init.d/squid restart |
erjo@11917 | 67 fi |
erjo@12148 | 68 if ( ps | grep -q c-icap ); then |
erjo@12148 | 69 /etc/init.d/c-icapd restart |
erjo@12148 | 70 fi |
erjo@11917 | 71 } |