summaryrefslogtreecommitdiff
path: root/community/opendkim/PKGBUILD
blob: 99255fa97e73849cfd87daa7f3fb5e2df80a965f (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
# $Id: PKGBUILD 72633 2012-06-18 09:23:25Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Thomas Jost <schnouki@schnouki.net>

pkgname=opendkim
pkgver=2.6.0
pkgrel=1
pkgdesc="An open source implementation of the DKIM sender authentication system. Based on a fork of dkim-milter."
arch=(i686 x86_64)
url="http://www.opendkim.org/"
license=('BSD' 'custom:Sendmail')
depends=("db" "openssl")
makedepends=("libmilter")
options=(!libtool)
backup=(etc/conf.d/opendkim)
install=opendkim.install
source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.gz
        opendkim.conf
        opendkim.rc)
md5sums=('ad4eb5131642cadd778dc26ed7daacf0'
         '3e2bb1058ac0662f01e675aa6ac7ee8f'
         '093f5c098a45cc68753f97e45a5b374c')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr --with-db
  make
}

check() {
  cd "$srcdir/$pkgname-$pkgver"
  make check
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install

  # Sample configuration
  mkdir -p "$pkgdir/etc/opendkim"
  mv "$pkgdir/usr/share/doc/opendkim/opendkim.conf.sample" "$pkgdir/etc/opendkim/opendkim.conf.sample"
  chmod 0700 "$pkgdir/etc/opendkim"
  chmod 0600 "$pkgdir/etc/opendkim/opendkim.conf.sample"

  # Init script
  install -Dm644 "$srcdir/opendkim.conf" "$pkgdir/etc/conf.d/opendkim"
  install -Dm755 "$srcdir/opendkim.rc" "$pkgdir/etc/rc.d/opendkim"

  # Remove empty dirs
  rmdir "$pkgdir/usr/share/man/man1" "$pkgdir/usr/share/man/man3"

  # License
  mkdir -p "$pkgdir/usr/share/licenses/opendkim"
  for f in LICENSE LICENSE.Sendmail; do
    ln -s ../../doc/opendkim/$f "$pkgdir/usr/share/licenses/opendkim/$f"
  done
}