summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndy Weidenbaum2017-03-12 13:15:42 -0700
committerAndy Weidenbaum2017-03-12 13:15:42 -0700
commitf0ae7f250f3bf293bd033987643b072ec51f4402 (patch)
tree64dca3e0876bd971a81fac26d6edec32b117b490 /PKGBUILD
downloadaur-f0ae7f250f3bf293bd033987643b072ec51f4402.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6c524d1a484
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=electrumx
+pkgver=1.0
+pkgrel=1
+pkgdesc="Server implementation for the Electrum wallet"
+arch=('any')
+depends=('leveldb'
+ 'python'
+ 'python-aiohttp'
+ 'python-irc'
+ 'python-plyvel'
+ 'python-pylru')
+makedepends=('expect' 'openssl' 'python-setuptools')
+optdepends=('bitcoin-core: Bitcoin core headless P2P node'
+ 'electrum: Bitcoin thin client')
+url="https://github.com/kyuupichan/electrumx"
+license=('MIT')
+options=(!emptydirs)
+source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/kyuupichan/$pkgname/tar.gz/$pkgver
+ 'electrumx.conf'
+ 'electrumx.service')
+sha256sums=('ff29de5a0065696815256db41585bbcb00002cc7cafe3ea2f4a7d2823e109369'
+ '8ae619f49ecea09626ac038d2170aeee6d0422f0918d8ef04672a2e614c32fc8'
+ 'a70e6d2ff4e0eb8125ba2d52bcdaec96129068363e365d48a47961f47b9fc554')
+install=electrumx.install
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg2 'Building...'
+ python setup.py build
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg2 'Installing license...'
+ install -Dm 644 LICENCE -t "$pkgdir/usr/share/licenses/$pkgname"
+
+ msg2 'Installing documentation...'
+ install -dm 755 "$pkgdir/usr/share/doc/$pkgname"
+ cp -dpr --no-preserve=ownership README.rst docs/* samples \
+ "$pkgdir/usr/share/doc/$pkgname"
+
+ msg2 'Making essential directories...'
+ install -dm 700 "$pkgdir/etc/electrumx"
+ install -dm 755 "$pkgdir/srv/electrumx"
+
+ msg2 'Installing electrumx.conf...'
+ install -Dm 600 "$srcdir/electrumx.conf" -t "$pkgdir/etc/electrumx"
+
+ msg2 'Installing electrumx.service...'
+ install -Dm 644 "$srcdir/electrumx.service" \
+ -t "$pkgdir/usr/lib/systemd/system"
+
+ msg2 'Installing...'
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ msg2 'Renaming executables...'
+ mv "$pkgdir/usr/bin/electrumx_server.py" "$pkgdir/usr/bin/electrumx-server"
+ mv "$pkgdir/usr/bin/electrumx_rpc.py" "$pkgdir/usr/bin/electrumx-rpc"
+}