wok-current annotate squidclamav/receipt @ rev 11917
Up: squidclamav (6.5) & improve package
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Thu Mar 01 00:01:55 2012 +0100 (2012-03-01) |
parents | b71d9a5eaa48 |
children | 7ee3b751dc0d |
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 \ |
pankso@10444 | 23 --libexecdir=/usr/lib \ |
erjo@11917 | 24 --sysconfdir=/etc \ |
erjo@11917 | 25 $CONFIGURE_ARGS && |
erjo@11917 | 26 make && make install |
pascal@9981 | 27 } |
pascal@9981 | 28 |
pascal@9981 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@9981 | 30 genpkg_rules() |
pascal@9981 | 31 { |
erjo@11917 | 32 mkdir -p $fs/usr \ |
erjo@11917 | 33 $fs/var/www/cgi-bin \ |
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@11917 | 38 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d |
erjo@11917 | 39 |
erjo@11917 | 40 # Customise config file |
erjo@11917 | 41 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/clwarn.cgi|" \ |
erjo@11917 | 42 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \ |
erjo@11917 | 43 $fs/etc/squidclamav.conf |
erjo@11917 | 44 |
pascal@9981 | 45 } |
erjo@11917 | 46 |
erjo@11917 | 47 #Post install command |
erjo@11917 | 48 post_install() |
erjo@11917 | 49 { |
erjo@11917 | 50 if ( ps | grep -q squid ); then |
erjo@11917 | 51 /etc/init.d/squid restart |
erjo@11917 | 52 fi |
erjo@11917 | 53 } |
erjo@11917 | 54 |
erjo@11917 | 55 #Post remove command |
erjo@11917 | 56 post_remove() |
erjo@11917 | 57 { |
erjo@11917 | 58 if ( ps | grep -q squid ); then |
erjo@11917 | 59 /etc/init.d/squid restart |
erjo@11917 | 60 fi |
erjo@11917 | 61 } |