summaryrefslogtreecommitdiff
path: root/community/tinc/PKGBUILD
blob: b12aaaa85f1df7716f48be260492c1233d90477c (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
# $Id: PKGBUILD 96041 2013-08-19 11:44:18Z tredaelli $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: helios
# Contributor: Lothar Gesslein
# Contributor: Dominik George <nik@naturalnet.de>

pkgname=tinc
pkgver=1.0.22
pkgrel=1
pkgdesc="VPN (Virtual Private Network) daemon"
arch=('i686' 'x86_64')
url="http://www.tinc-vpn.org/"
license=('GPL')
depends=('lzo2' 'openssl')
install=tinc.install
source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz{,.sig}
        tincd@.service)
md5sums=('cc1346150715bd56070695af85ab39f4'
         'SKIP'
         '112327da32fdb56ab779fe004712235f')

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

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin
  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 -Dm644 "$srcdir/tincd@.service" "$pkgdir/usr/lib/systemd/system/tincd@.service"
}