summaryrefslogtreecommitdiff
path: root/pcr/libsrs2/PKGBUILD
blob: 5971778e47b6baa9717a746cc1c7d3e5864b4136 (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
# Maintainer: Luke Shumaker <lukeshu@parabola.nu>

pkgbase=libsrs2
pkgname=(libsrs2 libsrs2-python libsrs2-perl)
pkgver=1.0.18
pkgrel=2
pkgdesc="Implementation of the Sender Rewriting Scheme (SRS) for SMTP forwarding"
arch=('i686' 'x86_64' 'armv7h')
url="http://www.libsrs2.org/"
license=('GPL2' 'BSD3')
makedepends=(python perl-mail-srs)
source=("http://www.libsrs2.org/srs/$pkgbase-$pkgver.tar.gz")
sha1sums=('db9452e5207bb573eca4b3409c201f1e0275d300')


build() {
  cd "${srcdir}/${pkgbase}-${pkgver}"
  CFLAGS="$CFLAGS -fPIC" ./configure --prefix=/usr
  make -j1

  cd "${srcdir}/${pkgbase}-${pkgver}/perl"
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

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

  cd "${srcdir}/${pkgbase}-${pkgver}/perl"
  make test
}

package_libsrs2() {
  cd "${srcdir}/${pkgbase}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" COPYING LICENSE.*
}

package_libsrs2-python() {
  provides=(python-libsrs2)
  depends=(libsrs2 python)

  cd "${srcdir}/${pkgbase}-${pkgver}/python"
  python setup.py install --root="$pkgdir/" --optimize=1

  cd ..
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" COPYING LICENSE.*
}

package_libsrs2-perl() {
  license=('GPL' 'PerlArtistic')
  provides=(perl-mail-srs-xs)
  depends=(libsrs2 perl-mail-srs)

  cd "${srcdir}/${pkgbase}-${pkgver}/perl"
  make DESTDIR="${pkgdir}" install
}

# vim:set ts=2 sw=2 et: