diff options
Diffstat (limited to 'pcr/librevpn-git/PKGBUILD')
-rw-r--r-- | pcr/librevpn-git/PKGBUILD | 183 |
1 files changed, 58 insertions, 125 deletions
diff --git a/pcr/librevpn-git/PKGBUILD b/pcr/librevpn-git/PKGBUILD index 6efa1f9a2..5d0837af0 100644 --- a/pcr/librevpn-git/PKGBUILD +++ b/pcr/librevpn-git/PKGBUILD @@ -1,145 +1,78 @@ -# Maintainer: Márcio Silva <coadde@hyperbola.info> +# Maintainer: Luke Shumaker <lukeshu@lukeshu.com> - _branch=master -#_branch=feature/empaquetable - -if [[ $_branch == master ]]; then - # committer Nicolás Reynolds <fauno@endefensadelsl.org> 2013-07-30 17:16:33 (GMT) - _srcver=20130730 - _commit=fb7d07789398d7b68ed437db75c68a24b0c17905 - _sha512sums=4dc77346fe6294d3bcfc47ead15f722bee628daf2a28d3fef9a15960038395140ee98918a4502ed1ed186bedbe2a83d9e68a202323523c8461476776bd3fdb2b -fi - -if [[ $_branch == feature/empaquetable ]]; then - # committer Nicolás Reynolds <fauno@endefensadelsl.org> 2013-07-29 02:41:53 (GMT) - _srcver=20130729 - _commit=5ee3d723da187d85f8b789998f98c8aebec843f7 - _sha512sums=f4c62b6bda67ce97eff9b35223f6c8d03c813e0151e81289006d8303e3296ed6346c2fb2b3835309d0902d9ea2ea73d4536636f544039ada5ae3d737600b0ebc -fi - -_srcname=lvpn _pkgname=librevpn +_pkgver=3ab83095b7c844877451ced0d6140162725c2b7f pkgname=$_pkgname-git -pkgver=$_srcver -pkgrel=3 -pkgdesc='Free Virtual Network with tinc2dot and generate-ipv6-address' +pkgver=20160404 + +provides=("$_pkgname=1.0.0rc") +conflicts=("$_pkgname") + +pkgrel=2.1 +pkgdesc='Free Tinc-based Virtual Private Network' url=http://$_pkgname.org.ar/ -license=('AGPL3:(lvpn, 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 - '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`' + 'postfix: for `lvpn install-mail-server`' + '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' ) -provides=($_pkgname) -conflicts=($_pkgname) -source=($_srcname-$_commit.tar.xz::http://repo.hackcoop.com.ar/$_pkgname.git/snapshot/$_commit.tar.xz) -sha512sums=($_sha512sums) +options=(emptydirs) +source=("$_pkgname-$_pkgver.tar.gz::https://github.com/LibreVPN/$_pkgname/archive/$_pkgver.tar.gz") +md5sums=('65e11fbdc9108d9fe025cabad6f66668') -build() { - cd $srcdir/$_commit +prepare() { + cd $_pkgname-$_pkgver - if [[ $_branch == feature/empaquetable ]]; then - sed -i '\|generate-ipv6-address|d;\|natpmp|d;\|upnpc|d' Makefile - sed -i '\|LVPN_DIR=| s|${PWD}|/usr/share/lvpn|' $_srcname.in - sed -i 's|${LVPN_DIR}/bin|/usr/bin|; - s|$(uname -m)-||; - ' lib/common - make PREFIX=/usr - fi + # 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 - cd $srcdir/$_commit/etc/generate-ipv6-address-0.1 - sed -i 's|`uname -m`-||;s|/man/man8|/share/man/man8|' Makefile - make PREFIX=/usr + sed -i '/BEADLE/s/HOSTS/BEADLE/' lvpn.in } -package() { - cd $srcdir/$_commit - - if [[ $_branch == feature/empaquetable ]]; then - make PREFIX=$pkgdir/usr TEXTDOMAINDIR=$pkgdir/usr/share/locale install - - msg 'Installing scripts files' - install -vm755 bin/avahi-publish-alias $pkgdir/usr/share/$_srcname - install -vm755 bin/graph $pkgdir/usr/share/$_srcname # conflicts with plotutils on /usr/bin - install -vm755 bin/tinc2dot $pkgdir/usr/share/$_srcname # tinc2dot 0.2.1 script - install -vm755 bin/cronjob $pkgdir/usr/share/$_srcname/fauno-cronjob # fauno script - - msg 'Removing dirs' - rmdir -v $pkgdir/usr/share/locale/pacman-scripts - - msg 'Fixing beagle patch' - rmdir -v $pkgdir/usr/share/$_srcname/beadle - ln -vs hosts $pkgdir/usr/share/$_srcname/beadle +build() ( + cd $_pkgname-$_pkgver - msg 'Adding doc patch' - install -vd $pkgdir/usr/share/doc - ln -vs ../$_srcname $pkgdir/usr/share/doc/$_srcname - - msg '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/$_srcname.mo locale/$_po.po - done - fi - - if [[ $_branch == master ]]; then - cd $srcdir/$_commit - - msg 'Fixing patchs with sed' - sed -i '\|LVPN=| s|$(readlink -f $0)|lvpn|; - \|LVPN_DIR=| s|$(dirname "$LVPN")|/usr/share/lvpn|; - \|LVPN_BIN=| s|${LVPN_DIR}|/usr|; - \|LVPN_LIBDIR=| s|${LVPN_DIR}/lib|/usr/lib/lvpn|; - ' $_srcname - sed -i 's|${LVPN_DIR}/bin|/usr/bin|; - s|$(uname -m)-||; - ' lib/{common,lvpn-init} - - msg 'Copying doc, hosts and lib dirs' - install -vd $pkgdir/usr/{lib,share/$_srcname} - cp -va doc $pkgdir/usr/share/$_srcname - cp -va hosts $pkgdir/usr/share/$_srcname - cp -va lib $pkgdir/usr/lib/$_srcname - - msg 'Installing scripts files' - install -vd $pkgdir/usr/bin - install -vm755 $_srcname $pkgdir/usr/bin - install -vm755 bin/avahi-publish-alias $pkgdir/usr/share/$_srcname - install -vm755 bin/graph $pkgdir/usr/share/$_srcname # conflicts with plotutils on /usr/bin - install -vm755 bin/tinc2dot $pkgdir/usr/share/$_srcname # tinc2dot 0.2.1 script - install -vm755 bin/cronjob $pkgdir/usr/share/$_srcname/fauno-cronjob # fauno script - - msg 'Fixing beagle patch' - ln -vs hosts $pkgdir/usr/share/$_srcname/beadle + unset TEXTDOMAIN TEXTDOMAINDIR + make PREFIX=/usr +) - msg 'Adding doc patch' - install -vd $pkgdir/usr/share/doc - ln -vs ../$_srcname $pkgdir/usr/share/doc/$_srcname +package() ( + cd $_pkgname-$_pkgver - msg '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/$_srcname.mo locale/$_po.po - done - fi + unset TEXTDOMAIN TEXTDOMAINDIR + make PREFIX=/usr TARGET="$pkgdir" install - msg 'Creating dirs' - install -d $pkgdir/{usr/share/$_srcname/nodos,etc/{logrotate.d,NetworkManager/dispatcher.d}} + 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/logrotate.d + install -d "$pkgdir"/etc/NetworkManager/dispatcher.d + ln -sT hosts $pkgdir/usr/share/lvpn/beadle - msg 'Installing license files' - install -vDm644 LICENSE $pkgdir/usr/share/licenses/$_srcname/COPYING + local cmd + for cmd in avahi-publish-alias graph tinc2dot; do + install -Dm755 bin/$cmd "$pkgdir"/usr/lib/lvpn/lvpn-$cmd + done - 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: |