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