wok-next annotate privoxy/receipt @ rev 5885
privoxy: fix build.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Wed Jul 21 16:00:54 2010 +0200 (2010-07-21) |
parents | a57f6141ce9e |
children | 8af11abf492a |
rev | line source |
---|---|
paul@2275 | 1 # SliTaz package receipt. |
paul@2275 | 2 |
paul@2275 | 3 PACKAGE="privoxy" |
paul@5127 | 4 VERSION="3.0.16-stable" |
paul@2275 | 5 CATEGORY="network" |
paul@2275 | 6 SHORT_DESC="Non-caching web privacy proxy." |
paul@2275 | 7 MAINTAINER="paul@slitaz.org" |
pascal@2456 | 8 DEPENDS="zlib pcre" |
paul@2275 | 9 BUILD_DEPENDS="zlib-dev autoconf perl m4 coreutils" |
paul@2275 | 10 TARBALL="$PACKAGE-$VERSION-src.tar.gz" |
paul@2275 | 11 WEB_SITE="http://www.privoxy.org/" |
paul@2275 | 12 WGET_URL="http://downloads.sourceforge.net/ijbswa/$TARBALL" |
paul@2275 | 13 |
paul@2275 | 14 # Rules to configure and make the package. |
paul@2275 | 15 compile_rules() |
paul@2275 | 16 { |
paul@2275 | 17 # Have to create privoxy user/group to be able to compile |
erjo@5885 | 18 # adduser privoxy -s /bin/false -H -D -S |
erjo@5885 | 19 |
paul@2275 | 20 cd $src |
paul@2275 | 21 |
paul@2275 | 22 # Needs autoconf |
paul@2275 | 23 autoheader |
paul@2275 | 24 autoconf |
paul@2275 | 25 |
paul@2275 | 26 ./configure \ |
paul@2275 | 27 --prefix=/usr \ |
paul@2275 | 28 --sysconfdir=/etc/privoxy \ |
paul@2275 | 29 --infodir=/usr/share/info \ |
paul@2275 | 30 --mandir=/usr/share/man \ |
pascal@4211 | 31 --localstatedir=/var \ |
erjo@5885 | 32 --with-user=nobody \ |
erjo@5885 | 33 --with-group=nogroup \ |
pascal@2456 | 34 $CONFIGURE_ARGS && |
pascal@2456 | 35 make && |
paul@2275 | 36 make DESTDIR=$PWD/_pkg install |
paul@2275 | 37 } |
paul@2275 | 38 |
paul@2275 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@2275 | 40 genpkg_rules() |
paul@2275 | 41 { |
paul@4836 | 42 mkdir -p $fs/etc/init.d $fs/usr |
paul@4373 | 43 cp -a $_pkg/usr/sbin $fs/usr |
paul@4836 | 44 cp -a $_pkg/var $fs |
paul@4836 | 45 cp -a $_pkg/etc $fs |
paul@2275 | 46 |
paul@2275 | 47 # Copy daemon from /stuff |
paul@2275 | 48 cp stuff/daemon-privoxy $fs/etc/init.d/privoxy |
paul@2275 | 49 } |
paul@2275 | 50 |
paul@2275 | 51 post_install() |
paul@2275 | 52 { |
paul@2275 | 53 # adduser privoxy if needed |
paul@2275 | 54 if ! grep -q privoxy $1/etc/passwd; then |
paul@2275 | 55 echo -n "Adding user privoxy..." |
paul@2275 | 56 chroot $1/ adduser privoxy -s /bin/false -H -D -S |
paul@2275 | 57 status |
paul@2275 | 58 fi |
paul@2314 | 59 |
paul@2314 | 60 # And change file permissions |
paul@2314 | 61 echo -n "Changing file permissions..." |
paul@2314 | 62 chown -R root.privoxy /etc/privoxy |
paul@2314 | 63 chown -R root.root /etc/privoxy/templates |
pascal@4211 | 64 chown -R root.privoxy /var/log/privoxy |
paul@2314 | 65 status |
paul@2275 | 66 } |
paul@2275 | 67 |
paul@2275 | 68 # Del user privoxy when pkg is removed. |
paul@2275 | 69 post_remove() |
paul@2275 | 70 { |
paul@2275 | 71 deluser privoxy |
paul@2275 | 72 } |