desktop/privoxy/PKGBUILD
AlmAck 0af05b343a kde applications 16.12.0
renamed checksums to kdeapps.sums
added for all packages the pgp signature
for new/removed packages check: https://community.kde.org/Applications/16.12_Release_Notes#Tarballs_that_we_have_split
2016-12-20 21:48:24 +00:00

61 lines
2.2 KiB
Bash

# Contributor: https://www.archlinux.org/packages/community/x86_64/privoxy/
pkgname=privoxy
pkgver=3.0.26
pkgrel=1
pkgdesc='A web proxy with advanced filtering capabilities.'
arch=('x86_64')
url='http://www.privoxy.org'
license=('GPL')
depends=('pcre' 'zlib')
makedepends=('autoconf')
backup=('etc/conf.d/privoxy'
'etc/privoxy/'{config,trust,default.action,user.filter,default.filter}
'etc/privoxy/'{match-all,user}.action
'etc/logrotate.d/privoxy')
categories=('network')
install=${pkgname}.install
source=("http://downloads.sourceforge.net/ijbswa/${pkgname}-${pkgver}-stable-src.tar.gz"
'privoxy.logrotate.d' # renamed the entry, because *.log is in gitignore
'privoxy.service'
'privoxy.conf.d')
sha256sums=('57e415b43ee5dfdca74685cc034053eaae962952fdabd086171551a86abf9cd8'
'769740ea3c15228f24b559192e7b3f45b95dcf9040e2b25f15bfdfae8af86ce3'
'df6ba82e58fc109a9a0ae76304d6028f699e494232b10f4558bee7b209df4694'
'c47c327b0fb91f08f46ec474f4aa551025e4a8dfdf18230a6977646b04ef5638')
build() {
cd "${srcdir}/${pkgname}-${pkgver}-stable"
autoheader
autoconf
./configure --prefix=/usr --sysconfdir=/etc/privoxy --enable-compression
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}-stable"
make prefix="${pkgdir}/usr" SBIN_DEST="${pkgdir}/usr/bin" \
MAN_DEST="${pkgdir}/usr/share/man/man1" GROUP=42 \
CONF_BASE="${pkgdir}/etc/privoxy" VAR_DEST="${pkgdir}/var" install
# Install start scripts and config files
install -Dm0644 "${srcdir}/privoxy.service" "${pkgdir}/usr/lib/systemd/system/privoxy.service"
install -Dm0644 "${srcdir}/privoxy.logrotate.d" "${pkgdir}/etc/logrotate.d/privoxy"
# install -Dm0644 "${srcdir}/privoxy.conf.d" "${pkgdir}/etc/conf.d/privoxy"
# Fix config paths.
sed -i -e 's#^confdir.*$#confdir /etc/privoxy#' -e 's#^logdir.*$#logdir /var/log/privoxy#' \
-e '/^user-manual/s#.*#\#user-manual /usr/share/doc/privoxy/user-manual/#' \
"${pkgdir}/etc/privoxy/config"
# Don't overwrite existing log files and fix log directory permissions.
rm "${pkgdir}/var/log/privoxy/"*
chown -R 42:42 "${pkgdir}"/etc/privoxy "${pkgdir}"/var/log/privoxy
# Avoid conflict with /var/run
rmdir "${pkgdir}/var/run"
}