summaryrefslogtreecommitdiff
path: root/community/libmilter/PKGBUILD
blob: 3154cc8b98a0ddb31428a63034d2b8bc623ea6e3 (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
# $Id: PKGBUILD 56914 2011-10-16 12:39:57Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: mutantmonkey <mutantmonkey@gmail.com>

pkgname=libmilter
pkgver=8.14.4
pkgrel=3
pkgdesc="libmilter"
arch=(i686 x86_64)
url="http://www.postfix.org/MILTER_README.html"
license=('custom:Sendmail open source license')
source="ftp://ftp.sendmail.org/pub/sendmail/sendmail.${pkgver}.tar.gz"
md5sums=('1b23d5000c8e7bfe82ec1a27f2f5fdc5')

build(){
  cd "${srcdir}/sendmail-${pkgver}"

  # From http://www.j-chkmail.org/wiki/doku.php/doc/installation/start#libmilter
  cat >> devtools/Site/site.config.m4 <<EOF
dnl
dnl Enable libmilter with a pool of workers
APPENDDEF(\`conf_libmilter_ENVDEF',\`-D_FFR_WORKERS_POOL=1 -DMIN_WORKERS=4')
dnl
dnl Use poll instead of select
APPENDDEF(\`conf_libmilter_ENVDEF',\`-DSM_CONF_POLL=1')
dnl Enable IPv6
APPENDDEF(\`conf_libmilter_ENVDEF',\`-DNETINET6=1')
dnl
dnl Include our CFLAGS
APPENDDEF(\`conf_libmilter_ENVDEF',\`${CFLAGS}')
dnl
dnl Add -fPIC
APPENDDEF(\`conf_libmilter_ENVDEF',\`-fPIC')
dnl
EOF

  cd libmilter
  ./Build
}

package(){
  cd "${srcdir}/sendmail-${pkgver}/libmilter"
  mkdir -p "${pkgdir}/usr/lib"
  ./Build DESTDIR="${pkgdir}" install
  install -Dm0644 ../LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
  chown -R root:root $pkgdir
}