summaryrefslogtreecommitdiff
path: root/pcr/tinc-pre/PKGBUILD
blob: 869a5e8f9f9f1af9167f9a010f88e33f64abf223 (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
# Maintainer: Márcio Silva <coadde@parabola.nu>
# Maintainer (Arch): Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor (Arch): helios
# Contributor (Arch): Lothar Gesslein
# Contributor (Arch): Dominik George <nik@naturalnet.de>

_pkgname=tinc
pkgname=tinc-pre
pkgver=1.1pre11
pkgrel=2
pkgdesc='VPN (Virtual Private Network) daemon (Pre-release)'
arch=('i686' 'x86_64' 'armv7h')
url="http://www.tinc-vpn.org/"
license=('GPL')
depends=('lzo2' 'openssl')
optdepends=('wxpython: gui support')
provides=('tinc-pre')
conflicts=('tinc')
install=tinc.install
source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz{,.sig}
        tincd@.service)
md5sums=('e9cc2971927d31e703f0c2b1791a4edf'
         'SKIP'
         '8fe22441f4bd4abaa5d87bbd7886deff')
validpgpkeys=('D62BDD168EFBE48BC60E8E234A6084B9C0D71F4A')

build() {
  cd "$_pkgname-$pkgver"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin
  make
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install

  install -dm755 "$pkgdir"/usr/share/tinc/examples
  tar xozvf doc/sample-config.tar.gz -C $pkgdir/usr/share/tinc/examples
  find "$pkgdir"/usr/share/tinc/examples -type f -exec chmod 644 {} +
  find "$pkgdir"/usr/share/tinc/examples -type d -exec chmod 755 {} +

  install -Dm644 "$srcdir/tincd@.service" "$pkgdir/usr/lib/systemd/system/tincd@.service"

  sed -e 's,#!/usr/bin/python,#!/usr/bin/python2,' -i $pkgdir/usr/bin/tinc-gui
}