summaryrefslogtreecommitdiff
path: root/pcr/librevpn-git/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-11 01:21:34 -0700
committerroot <root@rshg054.dnsready.net>2013-08-11 01:21:34 -0700
commit18a41d682d6e91e0d28fce23eb75292f477bd620 (patch)
treebce8f660d7d0b6541cadbc49bf1bac2434e4c0c6 /pcr/librevpn-git/PKGBUILD
parent0ade1da67addf154d93c6a6399b0a3d5a18a3336 (diff)
Sun Aug 11 01:21:31 PDT 2013
Diffstat (limited to 'pcr/librevpn-git/PKGBUILD')
-rw-r--r--pcr/librevpn-git/PKGBUILD145
1 files changed, 145 insertions, 0 deletions
diff --git a/pcr/librevpn-git/PKGBUILD b/pcr/librevpn-git/PKGBUILD
new file mode 100644
index 000000000..551a984e2
--- /dev/null
+++ b/pcr/librevpn-git/PKGBUILD
@@ -0,0 +1,145 @@
+# Maintainer: Márcio Silva <coadde@lavabit.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
+pkgname=$_pkgname-git
+pkgver=$_srcver
+pkgrel=3
+pkgdesc='Free Virtual Network with tinc2dot and generate-ipv6-address'
+url=http://$_pkgname.org.ar/
+license=('AGPL3:(lvpn, tinc2dot)' 'MIT:(generate-ipv6-address)')
+arch=(mips64el x86_64 i686)
+depends=(avahi bash tinc)
+optdepends=(
+ 'graphviz: for graph and tinc2dot'
+ 'libnatpmp: (AUR)'
+ miniupnpc
+ 'python2: for avahi-publish-alias'
+ python2-bottle
+ 'ruby: for graph'
+ sudo
+)
+provides=($_pkgname)
+conflicts=$_pkgname
+source=$_srcname-$_commit.tar.xz::http://repo.hackcoop.com.ar/$_pkgname.git/snapshot/$_commit.tar.xz
+sha512sums=$_sha512sums
+
+build() {
+ cd $srcdir/$_commit
+
+ 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
+
+ cd $srcdir/$_commit/etc/generate-ipv6-address-0.1
+ sed -i 's|`uname -m`-||;s|/man/man8|/share/man/man8|' Makefile
+ make PREFIX=/usr
+}
+
+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
+
+ 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
+
+ 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
+
+ msg 'Creating dirs'
+ install -d $pkgdir/{usr/share/$_srcname/nodos,etc/{logrotate.d,NetworkManager/dispatcher.d}}
+
+ msg 'Installing license files'
+ install -vDm644 LICENSE $pkgdir/usr/share/licenses/$_srcname/COPYING
+
+ msg 'Installing "generate-ipv6-address" files'
+ cd etc/generate-ipv6-address-0.1
+ make PREFIX=$pkgdir/usr TEXTDOMAINDIR=$pkgdir/usr/share/locale install
+}
+
+# vim:set ts=2 sw=2 et: