summaryrefslogtreecommitdiff
path: root/pcr/zeronet-git/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/zeronet-git/PKGBUILD')
-rw-r--r--pcr/zeronet-git/PKGBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/pcr/zeronet-git/PKGBUILD b/pcr/zeronet-git/PKGBUILD
new file mode 100644
index 000000000..1d3481821
--- /dev/null
+++ b/pcr/zeronet-git/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Luke R. <g4jc@openmailbox.org> GPG: rsa4096/3EAE8697
+# Maintainer (Arch): redfish <redfish at galactica dot pw>
+# Contributor: Lothar_m <lothar_m at riseup dot net>
+
+pkgname='zeronet-git'
+_gitname='ZeroNet'
+_gitroot='https://github.com/HelloZeroNet/ZeroNet.git'
+pkgver=0.5.0
+pkgrel=1
+arch=('any')
+url="https://zeronet.io/"
+depends=('python2>=2.7.10'
+ 'python2-gevent'
+ 'python2-msgpack'
+ )
+optdepends=('tor>=0.2.7.6: anonymity')
+makedepends=('git')
+license=('GPL2')
+pkgdesc="Decentralized websites using Bitcoin crypto and the BitTorrent network."
+provides=(zeronet)
+conflicts=(zeronet)
+source=("git+https://github.com/HelloZeroNet/ZeroNet.git"
+ "zeronet.conf"
+ "zeronet.service")
+sha512sums=('SKIP'
+ '5366a15c596854a14b344480a7c8e2d7a62311d336f72915e04d73d40419dc0690d4451ab0a2f673fb7f60e4ce2651de469bc64bc4b35ba1855dbba9a1d24a6c'
+ '8c2ff5e00e425aeb28da2b25e2ac43ebbe27aa966a983423e3ae717caecd2458473a1e993797df6f90394415afa769eadffc3dfdd76b5b486a70f3a698b7fcd5')
+install="zeronet.install"
+backup=("etc/zeronet.conf")
+options=(!strip)
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+
+ # Extract version and revision from src/Config.py and append commit
+ echo -n $(grep -oP '(?<=self.version = ").+(?=")' src/Config.py).r$(grep -oP '(?<=self.rev = )\w+$' src/Config.py).g$(git rev-parse --short HEAD)
+}
+
+package() {
+ cd "$srcdir/$_gitname"
+
+ mkdir -p "$pkgdir/opt/zeronet"
+ mkdir -p "$pkgdir/var/lib/zeronet"
+ mkdir -p "$pkgdir/var/log/zeronet"
+
+ # There is no setup.py shipped, so brute-force copy
+ cp -a "$srcdir/$_gitname/." "$pkgdir/opt/zeronet/"
+
+ install -D -m644 "$srcdir/zeronet.conf" "$pkgdir/etc/zeronet.conf"
+ ## Fix TOR connection by using default ports
+ echo "tor_controller = 127.0.0.1:9051" >> $pkgdir/etc/zeronet.conf
+ echo "tor_proxy = 127.0.0.1:9050" >> $pkgdir/etc/zeronet.conf
+ install -D -m644 "$srcdir/zeronet.service" "$pkgdir/usr/lib/systemd/system/zeronet.service"
+
+ # install license
+ install -D -m644 "$srcdir/$_gitname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}