mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
44 lines
1.7 KiB
Bash
44 lines
1.7 KiB
Bash
# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
|
|
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
|
# Contributor: v01d <phreakuencies@gmail.com>
|
|
|
|
pkgname=p3scan
|
|
pkgver=2.3.2
|
|
pkgrel=2
|
|
pkgdesc="Fully transparent POP3/SMTP proxy with Anti-Virus and SPAM protection"
|
|
arch=('i686' 'x86_64')
|
|
url="http://p3scan.sourceforge.net/"
|
|
depends=('pcre' 'openssl')
|
|
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz" "rc.p3scan")
|
|
md5sums=('9f8decc7d4701228788e3c8717096ca0' 'f6e3450c3a932477c49082559b7abef8')
|
|
install=p3scan.install
|
|
|
|
build() {
|
|
cd $startdir/src/$pkgname-$pkgver
|
|
|
|
# Fix CFLAGS and other options hardcoded in Makefiles
|
|
sed -ri "s|^CFLAGS=-Wall( -g)? -O2|CFLAGS=-Wall $CFLAGS|" Makefile ripmime/Makefile ripmime/tnef/Makefile ripmime/ripOLE/Makefile
|
|
sed -ri 's|^LOCATION=.+$|LOCATION=/usr|' ripmime/Makefile
|
|
sed -ri 's|\$\(SYSINS\) -v -m 550 --strip p3scan \$\(PREFIX\)/sbin/|$(SYSINS) -D -v -m 550 --strip p3scan $(DESTDIR)/usr/sbin/|' Makefile
|
|
make || return 1
|
|
|
|
# Create base dirs, the Makefile assumes they're there
|
|
install -d $startdir/pkg/usr/sbin $startdir/pkg/etc/rc.d $startdir/pkg/usr/man/man8
|
|
|
|
# install with root set on $startdir/pkg
|
|
make DESTDIR=$startdir/pkg install || return 1
|
|
|
|
# delete init script provided and use an arch compatible one
|
|
rm -f $startdir/pkg/etc/rc.d/rc.p3scan
|
|
install -D -m755 -g root -o root $startdir/src/rc.p3scan $startdir/pkg/etc/rc.d/p3scan
|
|
|
|
# BUG?: make absolute link a relative one
|
|
(
|
|
cd $startdir/pkg/etc/p3scan
|
|
ln -sf p3scan-en.mail p3scan.mail
|
|
)
|
|
|
|
# BUG: fix .conf file (the license has C style comments, they should be conf-style comments)
|
|
sed -ri 's|^[/ ]\*/?|# |g' $startdir/pkg/etc/p3scan/p3scan.conf
|
|
}
|
|
|