blob: a16cf7bbfc2946f5da7d5249f2f6c89e7bdd279f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# $Id: PKGBUILD 91076 2013-05-18 18:46:51Z bpiotrowski $
# Maintainer: Sébastien Luttringer
pkgname=opensmtpd
pkgver=5.3.2p1
pkgrel=1
pkgdesc='Free implementation of the server-side SMTP protocol'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.opensmtpd.org/'
license=('custom')
depends=('libevent')
provides=('smtp-server' 'smtp-forwarder')
conflicts=('smtp-server' 'smtp-forwarder')
backup=('etc/smtpd.conf' 'etc/aliases' 'etc/virtual' 'etc/secrets')
install=opensmtpd.install
source=("http://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz"
'smtpd.service'
'smtpd.socket')
md5sums=('8fc513dd632461f70e433103d75dbf50'
'a278f272d97a9fe5a8aac784a7c98d67'
'c2c01e9ca78df3f65efe40a7c0e17ee0')
build() {
cd $pkgname-$pkgver
./bootstrap
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/usr/bin \
--libexecdir=/usr/bin \
--with-maildir=/var/spool/mail \
--with-privsep-path=/var/empty \
--with-sock-dir=/run \
--with-privsep-user=mail \
--with-filter-user=mail \
--with-queue-user=mail \
--with-pam
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir/" install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
cd "$pkgdir"
# working directory
install -dm711 var/spool/smtpd
# license
install -Dm644 "$srcdir/smtpd.service" usr/lib/systemd/system/smtpd.service
install -Dm644 "$srcdir/smtpd.socket" usr/lib/systemd/system/smtpd.socket
# remove duplicate hardlink into a subfolder
rm -r usr/bin/opensmtpd
# empty aliases file
install -Dm644 /dev/null "$pkgdir/etc/aliases"
install -Dm644 /dev/null "$pkgdir/etc/virtual"
install -Dm640 /dev/null "$pkgdir/etc/secrets"
# fake sendmail binary (used to be smtp-forwarder)
# use hardlink as upstream does...
cd "$pkgdir/usr/bin"
ln smtpctl "$pkgdir/usr/bin/sendmail"
# symlink binary from usr/bin to usr/sbin (waiting /usr merge)
install -dm755 "$pkgdir/usr/sbin"
for _p in *; do
ln -s "../bin/$_p" "$pkgdir/usr/sbin/$_p"
done
}
# vim:set ts=2 sw=2 et:
|