summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHexchain Tong2015-10-08 14:45:05 +0800
committerHexchain Tong2015-10-08 14:46:14 +0800
commit268afab95a1e88684c747d519cf4eecb6ef6c8d6 (patch)
tree814f6e697f0121b0d395267c874a54645dc82e9e
parente0f8bd45674687fc86a0efbf97ef0c6e867755b7 (diff)
downloadaur-268afab95a1e88684c747d519cf4eecb6ef6c8d6.tar.gz
Fix PKGBUILD
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD33
-rw-r--r--tinc-pre.install17
3 files changed, 38 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4f8c40c6a06..8bfd698eeb0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
pkgbase = tinc-pre
pkgdesc = VPN (Virtual Private Network) daemon (Pre-release)
pkgver = 1.1pre11
- pkgrel = 2
+ pkgrel = 3
url = http://www.tinc-vpn.org/
+ install = tinc-pre.install
arch = i686
arch = x86_64
license = GPL
depends = lzo2
- depends = zlib
depends = openssl
optdepends = wxpython: gui support
provides = tinc-pre
conflicts = tinc
source = http://www.tinc-vpn.org/packages/tinc-1.1pre11.tar.gz
- md5sums = e9cc2971927d31e703f0c2b1791a4edf
+ sha256sums = 942594563d3aef926a2d04e9ece90c16daf1c700e99e3b91ff749e8377fbf757
pkgname = tinc-pre
diff --git a/PKGBUILD b/PKGBUILD
index 326ec143c43..526e947e25c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,34 @@
+# Maintainer: Hexchain Tong <i at hexchain dot org>
+
pkgname=tinc-pre
pkgver=1.1pre11
-pkgrel=2
+pkgrel=3
pkgdesc="VPN (Virtual Private Network) daemon (Pre-release)"
arch=(i686 x86_64)
url="http://www.tinc-vpn.org/"
license=('GPL')
-depends=('lzo2' 'zlib' 'openssl')
+depends=('lzo2' 'openssl')
optdepends=('wxpython: gui support')
provides=('tinc-pre')
conflicts=('tinc')
+install="${pkgname}.install"
source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz)
-md5sums=('e9cc2971927d31e703f0c2b1791a4edf')
-package() {
-cd "$startdir/src/tinc-$pkgver"
+build() {
+ cd "$srcdir/tinc-$pkgver"
-./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
---sbindir=/usr/bin
-make
-make DESTDIR="$pkgdir" install
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin
+ make
+}
+
+package() {
+ cd "$srcdir/tinc-$pkgver"
+ make DESTDIR="$pkgdir" install
-mkdir -p $pkgdir/etc/tinc/
-tar xzvf doc/sample-config.tar.gz -C $pkgdir/etc/tinc/
+ mkdir -p "$pkgdir/etc/tinc/"
+ install -Dm644 "$srcdir/tinc-$pkgver/doc/sample-config.tar.gz" -t "$pkgdir/usr/share/doc/tinc-pre/"
-sed 's,#!/usr/bin/python,#!/usr/bin/python2,' $pkgdir/usr/bin/tinc-gui >
-$pkgdir/usr/bin/tinc-gui2
-mv $pkgdir/usr/bin/tinc-gui2 $pkgdir/usr/bin/tinc-gui
-chmod +x $pkgdir/usr/bin/tinc-gui
+ sed -i 's,#!/usr/bin/env python,#!/usr/bin/env python2,' "$pkgdir/usr/bin/tinc-gui"
}
+sha256sums=('942594563d3aef926a2d04e9ece90c16daf1c700e99e3b91ff749e8377fbf757')
diff --git a/tinc-pre.install b/tinc-pre.install
new file mode 100644
index 00000000000..7d5dea46349
--- /dev/null
+++ b/tinc-pre.install
@@ -0,0 +1,17 @@
+infodir=/usr/share/info
+file=tinc.info
+
+post_install() {
+ [[ -x /usr/bin/install-info ]] || return 0
+ install-info $infodir/$file.gz $infodir/dir
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [[ -x /usr/bin/install-info ]] || return 0
+ install-info --delete $infodir/$file.gz $infodir/dir
+}
+