summaryrefslogtreecommitdiff
path: root/pcr/librevpn
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
parent0ade1da67addf154d93c6a6399b0a3d5a18a3336 (diff)
Sun Aug 11 01:21:31 PDT 2013
Diffstat (limited to 'pcr/librevpn')
-rw-r--r--pcr/librevpn/PKGBUILD165
1 files changed, 53 insertions, 112 deletions
diff --git a/pcr/librevpn/PKGBUILD b/pcr/librevpn/PKGBUILD
index 551a984e2..71a3a2f7c 100644
--- a/pcr/librevpn/PKGBUILD
+++ b/pcr/librevpn/PKGBUILD
@@ -1,141 +1,82 @@
# 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
+_pkgname=lvpn
+pkgname=librevpn
+pkgver=0.0.3
+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)')
+url=http://$pkgname.org.ar/
+license=("AGPL3:($_pkgname, tinc2dot)" 'MIT:(generate-ipv6-address)')
arch=(mips64el x86_64 i686)
depends=(avahi bash tinc)
optdepends=(
'graphviz: for graph and tinc2dot'
'libnatpmp: (AUR)'
miniupnpc
+ networkmanager
'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
+source=http://repo.hackcoop.com.ar/$pkgname.git/snapshot/$pkgname-$pkgver.tar.xz
+sha512sums=96a0de4e35d1fd45652c4b7ee25d7335d9b3816065b48e978274845c328b68a03623abf812119af34f1856bd05170cac8ad59f233fc3dcd63ea6c84c89a80968
build() {
- cd $srcdir/$_commit
+ cd $srcdir/$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
+ 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
- cd $srcdir/$_commit/etc/generate-ipv6-address-0.1
+ msg "Building '$pkgname'"
+ make PREFIX=/usr NETWORK=lvpn
+
+ msg "Building 'generate-ipv6-address'"
+ cd 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
+ cd $srcdir/$pkgname-$pkgver
+ make PREFIX=$pkgdir/usr TEXTDOMAINDIR=$pkgdir/usr/share/locale install
- msg 'Creating dirs'
- install -d $pkgdir/{usr/share/$_srcname/nodos,etc/{logrotate.d,NetworkManager/dispatcher.d}}
+ 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
+
+ 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
+
+ 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
+ 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/$_srcname/COPYING
+ install -vDm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/COPYING
msg 'Installing "generate-ipv6-address" files'
cd etc/generate-ipv6-address-0.1