summaryrefslogtreecommitdiff
path: root/community/tinc
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/tinc
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/tinc')
-rw-r--r--community/tinc/PKGBUILD39
-rw-r--r--community/tinc/tinc.install20
-rw-r--r--community/tinc/tincd@.service10
3 files changed, 69 insertions, 0 deletions
diff --git a/community/tinc/PKGBUILD b/community/tinc/PKGBUILD
new file mode 100644
index 000000000..d27feb7d8
--- /dev/null
+++ b/community/tinc/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 92047 2013-05-31 00:34:01Z seblu $
+# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
+# Contributor: helios
+# Contributor: Lothar Gesslein
+# Contributor: Dominik George <nik@naturalnet.de>
+
+pkgname=tinc
+pkgver=1.0.21
+pkgrel=2
+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=('d7bc9ca38672c9da08d74ff2a3e8e36d'
+ '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"
+}
diff --git a/community/tinc/tinc.install b/community/tinc/tinc.install
new file mode 100644
index 000000000..1b804fd8d
--- /dev/null
+++ b/community/tinc/tinc.install
@@ -0,0 +1,20 @@
+infodir=/usr/share/info
+filelist=(tinc.info.gz)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/community/tinc/tincd@.service b/community/tinc/tincd@.service
new file mode 100644
index 000000000..069bf4570
--- /dev/null
+++ b/community/tinc/tincd@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tinc daemon for net %i
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/tincd -n %i
+
+[Install]
+WantedBy=multi-user.target