summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/librevpn/PKGBUILD132
1 files changed, 132 insertions, 0 deletions
diff --git a/pcr/librevpn/PKGBUILD b/pcr/librevpn/PKGBUILD
new file mode 100644
index 000000000..ec05fc552
--- /dev/null
+++ b/pcr/librevpn/PKGBUILD
@@ -0,0 +1,132 @@
+# 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=1
+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
+options=(!emptydirs)
+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
+ 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 '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 '\|${_srcname^^}_BIN=| s|${${_srcname^^}_DIR}|/usr|;
+ \|${_srcname^^}_LIBDIR=| s|${${_srcname^^}_DIR}/lib|/usr/lib/$_srcname|;
+ \|${_srcname^^}_HOSTS=| s|${${_srcname^^}_DIR}|/usr/share/$_srcname|;
+ ' $_srcname
+
+ 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 '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: