desktop/privoxy/PKGBUILD

74 lines
2.6 KiB
Bash
Raw Normal View History

# Chakra Packages for Chakra, part of chakra-project.org
#
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
pkgname=privoxy
2011-12-29 04:17:44 +08:00
pkgver=3.0.19
2012-10-14 15:26:55 +08:00
pkgrel=2
pkgdesc='A web proxy with advanced filtering capabilities.'
arch=('i686' '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')
2012-10-14 15:26:55 +08:00
install=${pkgname}.install
source=("http://downloads.sourceforge.net/ijbswa/${pkgname}-${pkgver}-stable-src.tar.gz"
'privoxy'
2012-10-14 15:26:55 +08:00
'privoxy-logrotate' # renamed the entry, because *.log is in gitignore
'privoxy.conf.d'
'privoxy.service')
sha256sums=('816e627b31caa3d9e71d0a8b83ac9ea7dcbeaaafef3c9a9c792696aa56255232'
'5b81aac349a83cd0892d4f0952b97e8d9ddbb8b7e0f73c5ab31a20437fd46a48'
'21323dcfb6b3e571e23112a437db66208f73e32a400b40c192fbb30d7489ce28'
'c47c327b0fb91f08f46ec474f4aa551025e4a8dfdf18230a6977646b04ef5638'
'5b89f59d2550c22fde4b5e74521ab5b4f41226abcd1d12379671ca5f5bffa8aa')
build() {
cd "${srcdir}/${pkgname}-${pkgver}-stable"
autoheader
autoconf
./configure --prefix=/usr --sysconfdir=/etc/privoxy
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}-stable"
make prefix="${pkgdir}/usr" MAN_DEST="${pkgdir}/usr/share/man/man1" GROUP=42 \
CONF_BASE="${pkgdir}/etc/privoxy" VAR_DEST="${pkgdir}/var" install
# Don't overwrite existing log files!
rm "${pkgdir}/var/log/privoxy/"*
2012-10-14 15:26:55 +08:00
# Install start scripts and config files
install -Dm0755 "${srcdir}/privoxy" "${pkgdir}/etc/rc.d/privoxy"
2012-10-14 15:26:55 +08:00
install -Dm0644 "${srcdir}/privoxy-logrotate" "${pkgdir}/etc/logrotate.d/privoxy"
install -Dm0644 "${srcdir}/privoxy.conf.d" "${pkgdir}/etc/conf.d/privoxy"
2012-10-14 15:26:55 +08:00
# systemd unit file
install -Dm0644 "${srcdir}/privoxy.service" "${pkgdir}/usr/lib/systemd/system/privoxy.service"
# 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"
# Fix group ownership and permissions.
chgrp -R 42 "${pkgdir}/etc/privoxy/"
chgrp -R 42 "${pkgdir}/var/log/privoxy/"
find "${pkgdir}/etc/privoxy/" -type d | xargs chmod 0770
find "${pkgdir}/etc/privoxy/" -type f | xargs chmod 0660
2011-12-29 04:17:44 +08:00
chmod 0700 "${pkgdir}/var/log/privoxy"
2012-10-14 15:26:55 +08:00
# Avoid conflict with /var/run
rmdir "${pkgdir}/var/run"
}