summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/tinc/PKGBUILD40
-rw-r--r--pcr/tinc/tinc.install20
-rw-r--r--pcr/tinc/tincd.conf2
-rw-r--r--pcr/tinc/tincd.rcd48
-rw-r--r--pcr/tinc/tincd@.service10
5 files changed, 53 insertions, 67 deletions
diff --git a/pcr/tinc/PKGBUILD b/pcr/tinc/PKGBUILD
index 87d3415e9..3612d8814 100644
--- a/pcr/tinc/PKGBUILD
+++ b/pcr/tinc/PKGBUILD
@@ -1,33 +1,39 @@
+# $Id: PKGBUILD 116886 2014-08-05 08:18:32Z tredaelli $
+# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
+# Contributor: helios
+# Contributor: Lothar Gesslein
+# Contributor: Dominik George <nik@naturalnet.de>
+
pkgname=tinc
-pkgver=1.0.16
-pkgrel=3
+pkgver=1.0.24
+pkgrel=2
pkgdesc="VPN (Virtual Private Network) daemon"
-arch=(i686 x86_64 mips64el)
+arch=('i686' 'x86_64' 'mips64el')
url="http://www.tinc-vpn.org/"
license=('GPL')
-depends=('lzo2' 'zlib' 'openssl')
-backup=(etc/conf.d/tincd.conf)
-source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz
- tincd.conf
- tincd.rcd)
-md5sums=('f1c7ed94878725fb2cf4efb02bf160da'
- 'd4a42b4a474448c64dc8f5100480f569'
- '89a91a80c1dee4b365958bd9e6242d5a')
+depends=('lzo' 'openssl')
+install=tinc.install
+source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz{,.sig}
+ tincd@.service)
+md5sums=('14a91eb2e85bdc0451a815612521b708'
+ 'SKIP'
+ '112327da32fdb56ab779fe004712235f')
build() {
cd "$srcdir/$pkgname-$pkgver"
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR="$pkgdir" install
-
- install -d $pkgdir/etc/{tinc,rc.d,conf.d}
+ 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.rcd $pkgdir/etc/rc.d/tincd
- install -Dm755 $srcdir/tincd.conf $pkgdir/etc/conf.d/tincd.conf
+ install -Dm644 "$srcdir/tincd@.service" "$pkgdir/usr/lib/systemd/system/tincd@.service"
}
diff --git a/pcr/tinc/tinc.install b/pcr/tinc/tinc.install
new file mode 100644
index 000000000..1b804fd8d
--- /dev/null
+++ b/pcr/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/pcr/tinc/tincd.conf b/pcr/tinc/tincd.conf
deleted file mode 100644
index e86139b44..000000000
--- a/pcr/tinc/tincd.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-NETNAME=yournetname
-OPTIONS="-R -U nobody -L"
diff --git a/pcr/tinc/tincd.rcd b/pcr/tinc/tincd.rcd
deleted file mode 100644
index 16f39f8ca..000000000
--- a/pcr/tinc/tincd.rcd
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-daemon_name=tincd
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/${daemon_name}.conf
-
-PIDFILE=/var/run/tinc.${NETNAME}
-[ -f "${PIDFILE}" ] && PID=$(<${PIDFILE})
-
-case "$1" in
- start)
- stat_busy "Starting ${daemon_name}"
- [ -z "$PID" ] && \
- /usr/sbin/tincd -n ${NETNAME} \
- ${OPTIONS} \
- --pidfile=${PIDFILE} &> /dev/null
-
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon ${daemon_name}
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping ${daemon_name}"
- [ ! -z "$PID" ] && /usr/sbin/tincd -n ${NETNAME} -k
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon ${daemon_name}
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 3
- $0 start
- ;;
- reload)
- [ ! -z "$PID" ] && /usr/sbin/tincd -n ${NETNAME} -k HUP
- ;;
- *)
- echo "usage: $0 {start|stop|restart|reload}"
-esac
-exit 0
diff --git a/pcr/tinc/tincd@.service b/pcr/tinc/tincd@.service
new file mode 100644
index 000000000..069bf4570
--- /dev/null
+++ b/pcr/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