summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/librevpn/PKGBUILD113
1 files changed, 47 insertions, 66 deletions
diff --git a/pcr/librevpn/PKGBUILD b/pcr/librevpn/PKGBUILD
index 5383c62f7..49189831a 100644
--- a/pcr/librevpn/PKGBUILD
+++ b/pcr/librevpn/PKGBUILD
@@ -1,86 +1,67 @@
-# Maintainer: Márcio Silva <coadde@hyperbola.info>
+# Maintainer: Luke Shumaker <lukeshu@lukeshu.com>
-_pkgname=lvpn
pkgname=librevpn
-pkgver=0.0.3
+pkgver=1.0.0rc
pkgrel=1
-pkgdesc='Free Virtual Network with tinc2dot and generate-ipv6-address'
+pkgdesc='Free Tinc-based Virtual Private Network'
url=http://$pkgname.org.ar/
-license=("AGPL3:($_pkgname, tinc2dot)" 'MIT:(generate-ipv6-address)')
-arch=(x86_64 i686)
+license=('AGPL3' 'MIT') # AGPL3+, but the vendored generate-ipv6-address is MIT
+arch=(x86_64 i686 armv7h)
depends=(avahi bash tinc)
+makedepends=(pandoc)
optdepends=(
- 'graphviz: for graph and tinc2dot'
- 'libnatpmp: (AUR)'
- miniupnpc
- networkmanager
- 'python2: for avahi-publish-alias'
- python2-bottle
- 'ruby: for graph'
- sudo
+ #'python2-bottle: for `etc/keyserver`'
+ 'graphviz: for `lvpn graph` and `lvpn tinc2dot`'
+ 'libnatpmp: for `lvpn install-script port-forwarding`'
+ 'miniupnpc: for `lvpn install-script port-forwarding`'
+ 'networkmanager: for automatic reload on network-up'
+ 'openssh: for `lvpn push`'
+ 'python2: for `lvpn avahi-publish-alias`'
+ 'rsync: for `lvpn install`'
+ 'ruby: for `lvpn graph`'
+ 'smtp-forwarder: for `lvpn send-email`'
+ 'sudo: for `lvpn d3`, for priv-sep in other commands'
)
-source=(http://repo.hackcoop.com.ar/$pkgname.git/snapshot/$pkgname-$pkgver.tar.xz)
-sha512sums=(96a0de4e35d1fd45652c4b7ee25d7335d9b3816065b48e978274845c328b68a03623abf812119af34f1856bd05170cac8ad59f233fc3dcd63ea6c84c89a80968)
+options=(emptydirs)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/LibreVPN/$pkgname/archive/$pkgver.tar.gz")
+sha512sums=('253263df36b9a38671e01e8742ecbe783ff33e02e94f25c4a0d2c1a8843a6543e46a3fc63020379101d22ce6e5bd49fc80ba142be5dee51f737d7e62ac45ecdf')
-build() {
- cd $srcdir/$pkgname-$pkgver
+prepare() {
+ cd $pkgname-$pkgver
- msg "BUGFIX: Fixing Makefile with sed:"
- msg " * Removing generate-ipv6-address, natpmp and upnpc build softwares"
- msg " * Fixing wrong man-pages patch"
- msg " * Removing useless pacman-scripts (or lvpn) patch (TEXTDOMAIN)"
- sed -i '\|generate-ipv6-address|d;\|natpmp|d;\|upnpc|d;
- s|/share/man1|/share/man/man1|;
- s|$(TARGET)$(TEXTDOMAINDIR)/$(TEXTDOMAIN)|$(TARGET)$(TEXTDOMAINDIR)|;
- ' Makefile
+ # remove pre-compiled binary files
+ find -name '*.pyc' -delete
+ rm -f -- bin/*-generate-ipv6-address bin/natpmpc bin/upnpc
+ # remove other generated files
+ find doc -name '*.1' -delete
+ rm lvpn
+}
- msg "Building '$pkgname'"
- make PREFIX=/usr NETWORK=lvpn
+build() (
+ cd $pkgname-$pkgver
- msg "Building 'generate-ipv6-address'"
- cd etc/generate-ipv6-address-0.1
- sed -i 's|`uname -m`-||;s|/man/man8|/share/man/man8|' Makefile
+ unset TEXTDOMAIN TEXTDOMAINDIR
make PREFIX=/usr
-}
+)
-package() {
- cd $srcdir/$pkgname-$pkgver
- make PREFIX=$pkgdir/usr TEXTDOMAINDIR=$pkgdir/usr/share/locale install
+package() (
+ cd $pkgname-$pkgver
- msg 'Installing scripts files'
- msg 'Note: graph scrip conflicts with plotutils on /usr/bin'
- install -vm755 bin/avahi-publish-alias $pkgdir/usr/bin
- install -vm755 bin/graph $pkgdir/usr/bin/$_pkgname-graph
- install -vm755 bin/tinc2dot $pkgdir/usr/bin # tinc2dot 0.2.1 script
- install -vm755 bin/cronjob $pkgdir/usr/bin/fauno-cronjob # fauno script
+ unset TEXTDOMAIN TEXTDOMAINDIR
+ make PREFIX=/usr TARGET="$pkgdir" install
- msg 'BUGFIX: Installing doc files'
- _doc=(es)
- for _md in ${_doc[@]};do
- install -vd $pkgdir/usr/share/{doc,$_pkgname/doc/$_md}
- install -vm644 doc/$_md/*.markdown $pkgdir/usr/share/$_pkgname/doc/$_md
- ln -vs ../$_pkgname/doc $pkgdir/usr/share/doc/$_pkgname
- done
+ install -Dm644 etc/generate-ipv6-address-0.1/generate-ipv6-address.man "$pkgdir"/usr/share/man/man8/generate-ipv6-address.8
+ install -d "$pkgdir"/etc/NetworkManager/dispatcher.d
- msg 'BUGFIX: Installing locale files'
- _locales=(en)
- for _po in ${_locales[@]}; do
- install -vd $pkgdir/usr/share/locale/$_po/LC_MESSAGES
- msgfmt -o $pkgdir/usr/share/locale/$_po/LC_MESSAGES/$_pkgname.mo locale/$_po.po
+ local cmd
+ for cmd in avahi-publish-alias graph tinc2dot; do
+ install -Dm755 bin/$cmd "$pkgdir"/usr/lib/lvpn/lvpn-$cmd
done
- #msg 'BUGFIX: Removing useless pacman-scripts dir'
- #rmdir -v $pkgdir/usr/share/locale/pacman-scripts
-
- msg 'BUGFIX: Creating NetworkManager dir, due which fail without NetworkManager software'
- install -d $pkgdir/etc/NetworkManager/dispatcher.d
-
- msg 'Installing license files'
- install -vDm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/COPYING
-
- msg 'Installing "generate-ipv6-address" files'
- cd etc/generate-ipv6-address-0.1
- make PREFIX=$pkgdir/usr TEXTDOMAINDIR=$pkgdir/usr/share/locale install
-}
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ sed -n '/Copyright/,/\*\//p' \
+ < etc/generate-ipv6-address-0.1/generate-ipv6-address.c \
+ > "$pkgdir/usr/share/licenses/$pkgname/LICENSE.generate-ipv6-address.txt"
+)
# vim:set ts=2 sw=2 et: