summaryrefslogtreecommitdiff
path: root/community/tinc/PKGBUILD
blob: 43fab3af7bdcdde39040177e5bc5c3fc77869466 (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
# $Id: PKGBUILD 68908 2012-04-05 15:23:32Z tredaelli $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: helios
# Contributor: Lothar Gesslein

pkgname=tinc
pkgver=1.0.18
pkgrel=1
pkgdesc="VPN (Virtual Private Network) daemon"
arch=('i686' 'x86_64')
url="http://www.tinc-vpn.org/"
license=('GPL')
depends=('lzo2' 'openssl')
backup=(etc/conf.d/tincd.conf)
install=tinc.install
source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz{,.sig}
        tincd.rc tincd.conf)
md5sums=('9352d53e892df4127e839f54a0e8af2a'
         '1c219383bff7cc57024a9a25cd7fca5d'
         '64bb53748d9051255f243003f0d511f5'
         '7c0276d4812cc5d3cc18142562a3aa82')

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

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

package() {
  cd "$srcdir/$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 -Dm755 "$srcdir/tincd.rc" "$pkgdir/etc/rc.d/tincd"
  install -Dm644 "$srcdir/tincd.conf" "$pkgdir/etc/conf.d/tincd.conf"
}