wok annotate privoxy/receipt @ rev 24876
magicpoint: ar syntax adaptation)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Mar 31 11:00:43 2022 +0100 (2022-03-31) |
parents | 72d34faa7fd6 |
children | f48c0f9848e4 |
rev | line source |
---|---|
paul@2275 | 1 # SliTaz package receipt. |
paul@2275 | 2 |
paul@2275 | 3 PACKAGE="privoxy" |
Hans-G?nter@21702 | 4 VERSION="3.0.28" |
paul@2275 | 5 CATEGORY="network" |
paul@2275 | 6 SHORT_DESC="Non-caching web privacy proxy." |
paul@2275 | 7 MAINTAINER="paul@slitaz.org" |
pascal@15375 | 8 LICENSE="GPL2" |
Hans-G?nter@21702 | 9 WEB_SITE="https://www.privoxy.org/" |
paul@2275 | 10 |
Hans-G?nter@21702 | 11 TARBALL="$PACKAGE-$VERSION-stable-src.tar.gz" |
Hans-G?nter@21702 | 12 WGET_URL="$SF_MIRROR/ijbswa/$TARBALL" |
Hans-G?nter@21702 | 13 |
Hans-G?nter@21702 | 14 DEPENDS="pcre zlib" |
Hans-G?nter@21702 | 15 BUILD_DEPENDS="autoconf coreutils m4 perl zlib-dev" |
psychomaniak@19974 | 16 CONFIG_FILES="/etc/privoxy/config" |
psychomaniak@19974 | 17 |
pascal@24396 | 18 # What is the latest version available today? |
pascal@24396 | 19 current_version() |
pascal@24396 | 20 { |
pascal@24396 | 21 wget -O - https://sourceforge.net/projects/ijbswa/files/Sources/ 2>/dev/null | \ |
pascal@24396 | 22 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ |
pascal@24396 | 23 sed '/scope="row/!d;s|.*/Sources/||;s|%20.*/.*||;q' |
pascal@24396 | 24 } |
pascal@24396 | 25 |
paul@2275 | 26 # Rules to configure and make the package. |
paul@2275 | 27 compile_rules() |
paul@2275 | 28 { |
paul@2275 | 29 # Have to create privoxy user/group to be able to compile |
slaxemulator@8011 | 30 adduser -s /bin/false -H -D -u 42 privoxy |
slaxemulator@9383 | 31 addgroup -g 42 privoxy |
erjo@5885 | 32 |
paul@2275 | 33 # Needs autoconf |
paul@2275 | 34 autoheader |
paul@2275 | 35 autoconf |
paul@2275 | 36 |
Hans-G?nter@21702 | 37 ./configure \ |
Hans-G?nter@21702 | 38 --prefix=/usr \ |
Hans-G?nter@21702 | 39 --sysconfdir=/etc/privoxy \ |
Hans-G?nter@21702 | 40 --infodir=/usr/share/info \ |
Hans-G?nter@21702 | 41 --mandir=/usr/share/man \ |
Hans-G?nter@21702 | 42 --localstatedir=/var \ |
pascal@2456 | 43 $CONFIGURE_ARGS && |
Hans-G?nter@21702 | 44 make && |
Hans-G?nter@21702 | 45 make DESTDIR=$DESTDIR install |
paul@2275 | 46 } |
paul@2275 | 47 |
paul@2275 | 48 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@2275 | 49 genpkg_rules() |
paul@2275 | 50 { |
Hans-G?nter@21702 | 51 mkdir -p $fs/etc/init.d |
Hans-G?nter@21702 | 52 mkdir -p $fs/usr |
Hans-G?nter@21702 | 53 |
Hans-G?nter@21702 | 54 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@21702 | 55 cp -a $install/var $fs |
Hans-G?nter@21702 | 56 cp -a $install/etc $fs |
paul@2275 | 57 |
slaxemulator@9701 | 58 # Copy daemon from stuff |
slaxemulator@9701 | 59 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy |
paul@2275 | 60 } |
paul@2275 | 61 |
paul@7279 | 62 post_install() |
paul@2275 | 63 { |
paul@7247 | 64 # adduser privoxy if needed |
pascal@18730 | 65 if ! grep -q privoxy "$1/etc/passwd"; then |
pascal@20319 | 66 echo |
paul@7247 | 67 echo -n "Adding user privoxy..." |
pascal@18730 | 68 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy |
paul@7247 | 69 status |
paul@7247 | 70 fi |
paul@7279 | 71 |
pascal@18730 | 72 if ! grep -q privoxy "$1/etc/group"; then |
pascal@20319 | 73 echo |
slaxemulator@9383 | 74 echo -n "Adding group privoxy..." |
pascal@18730 | 75 chroot "$1/" addgroup -g 42 privoxy |
slaxemulator@9383 | 76 status |
slaxemulator@9383 | 77 fi |
slaxemulator@9383 | 78 |
paul@7279 | 79 # and change file permissions |
pascal@20319 | 80 echo |
paul@7279 | 81 echo -n "Changing file permissions..." |
pascal@18730 | 82 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy |
pascal@18730 | 83 chown -R root.root "$1/etc/privoxy/templates" |
pascal@18730 | 84 chown root.root "$1/etc/privoxy" |
pascal@18730 | 85 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile |
paul@7279 | 86 status |
paul@2275 | 87 } |
paul@7247 | 88 |
paul@7247 | 89 # Del user privoxy when pkg is removed. |
paul@7247 | 90 post_remove() |
paul@7247 | 91 { |
paul@7247 | 92 deluser privoxy |
slaxemulator@9383 | 93 delgroup privoxy |
paul@7247 | 94 } |