diff options
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 65 | ||||
-rw-r--r-- | electrumx.conf | 49 | ||||
-rw-r--r-- | electrumx.service | 16 | ||||
-rw-r--r-- | electrumx.sysusers | 1 |
5 files changed, 164 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..84b18422ca28 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = electrumx-git + pkgdesc = Server implementation for the Electrum wallet (git version) + pkgver = 1.15.0.r1945.148df48 + pkgrel = 1 + url = https://github.com/spesmilo/electrumx + arch = any + license = MIT + makedepends = python-setuptools + makedepends = git + depends = leveldb + depends = python>=3.7 + depends = python-aiorpcx>=0.18.3 + depends = python-aiorpcx<0.19.0 + depends = python-attrs + depends = python-plyvel + depends = python-pylru + depends = python-aiohttp>=3.3.0 + depends = python-websockets + optdepends = bitcoin-daemon: Bitcoin core headless P2P node + optdepends = electrum: Bitcoin thin client + conflicts = electrumx + backup = etc/electrumx/electrumx.conf + source = git+https://github.com/spesmilo/electrumx.git + source = electrumx.conf + source = electrumx.service + source = electrumx.sysusers + sha256sums = SKIP + sha256sums = ca05f8e8cf01c5074376df75a6691c1aea74cf278244f86ac838900cad9547fb + sha256sums = ece0696dc82e0159d9a266834e6e9e1e518caa68e6f145d262b291e1fc09d67e + sha256sums = 761a21723d21348d598be96655e6de4827b2fcff93270895303e82670e0532f1 + +pkgname = electrumx-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f14185157d8a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Luis Aranguren <pizzaman@hotmail.com> +# Contributor: Steven Malis <smmalis37@gmail.com> +# Contributor: Andy Weidenbaum <archbaum@gmail.com> + +pkgname=electrumx-git +_pkgname=electrumx +pkgver=1.15.0.r1945.148df48 +pkgrel=1 +pkgdesc="Server implementation for the Electrum wallet (git version)" +arch=('any') +depends=('leveldb' + 'python>=3.7' + 'python-aiorpcx>=0.18.3' 'python-aiorpcx<0.19.0' + 'python-attrs' + 'python-plyvel' + 'python-pylru' + 'python-aiohttp>=3.3.0' + 'python-websockets' + ) +makedepends=('python-setuptools' 'git') +optdepends=('bitcoin-daemon: Bitcoin core headless P2P node' + 'electrum: Bitcoin thin client') +url="https://github.com/spesmilo/electrumx" +license=('MIT') +conflicts=('electrumx') +source=(git+https://github.com/spesmilo/$_pkgname.git + 'electrumx.conf' + 'electrumx.service' + 'electrumx.sysusers') +sha256sums=('SKIP' + 'ca05f8e8cf01c5074376df75a6691c1aea74cf278244f86ac838900cad9547fb' + 'ece0696dc82e0159d9a266834e6e9e1e518caa68e6f145d262b291e1fc09d67e' + '761a21723d21348d598be96655e6de4827b2fcff93270895303e82670e0532f1') +backup=('etc/electrumx/electrumx.conf') + +pkgver() { + cd "$srcdir/$_pkgname" + printf "%s.r%s.%s" "$(git for-each-ref refs/tags --sort=-authordate --format='%(refname:short)' --count=1)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$_pkgname" + python setup.py build +} + +package() { + install -D -m 644 "$srcdir/electrumx.sysusers" "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf" + + cd "$srcdir/$_pkgname" + + install -Dm 644 LICENCE -t "$pkgdir/usr/share/licenses/$_pkgname" + + install -dm 755 "$pkgdir/usr/share/doc/$_pkgname" + cp -dpr --no-preserve=ownership README.rst contrib docs/* "$pkgdir/usr/share/doc/$_pkgname" + + install -Dm 600 "$srcdir/electrumx.conf" -t "$pkgdir/etc/electrumx" + + install -Dm 644 "$srcdir/electrumx.service" -t "$pkgdir/usr/lib/systemd/system" + + python setup.py install --root="$pkgdir" --optimize=1 --skip-build + + mv "$pkgdir/usr/bin/electrumx_server" "$pkgdir/usr/bin/electrumx-server" + mv "$pkgdir/usr/bin/electrumx_rpc" "$pkgdir/usr/bin/electrumx-rpc" + mv "$pkgdir/usr/bin/electrumx_compact_history" "$pkgdir/usr/bin/electrumx-compact-history" +} diff --git a/electrumx.conf b/electrumx.conf new file mode 100644 index 000000000000..85593acb7748 --- /dev/null +++ b/electrumx.conf @@ -0,0 +1,49 @@ +#suggested /etc/electrumx.conf for systemd + +#REQUIRED + + #The folder to store the electrumx database + DB_DIRECTORY = /srv/electrumx + + #The linux user to run the server under + USERNAME = electrumx + + #The path to the electrumx binary + ELECTRUMX = /usr/bin/electrumx-server + + #Bitcoin Node RPC Credentials + #assumes https://aur.archlinux.org/packages/bitcoin-core/bitcoin.conf + #port is optional, defaults to COIN RPC default + DAEMON_URL = http://bitcoin:secret@127.0.0.1:8332/ + + #Which cryptocurrency to process + #See lib/coins.py + COIN = BitcoinSegwit + NET = mainnet + +#REQUIRED FOR PUBLIC VISIBILITY + + #Services to expose + #By default only expose unencrypted services + SERVICES = tcp://:50001,ws://:50003,rpc:// + + #For ssl support generate your own certificates and enable encrypted services + #SERVICES = tcp://:50001,ssl://:50002,ws://:50003,wss://:50004,rpc:// + + #Path to ssl cert and key for enabling ssl support + #See https://electrumx.readthedocs.io/en/latest/HOWTO.html#creating-a-self-signed-ssl-certificate + #SSL_CERTFILE = /etc/electrumx/server.cert + #SSL_KEYFILE = /etc/electrumx/server.pem + + #Services to announce to peers + #REPORT_SERVICES = + +#OPTIONAL VISIBILITY + + #BANNER_FILE = /path/to/banner + #DONATION_ADDRESS = + +#MISC + + #Set to anything non-empty to remove IP addresses from logs. + ANON_LOGS = yes diff --git a/electrumx.service b/electrumx.service new file mode 100644 index 000000000000..be79b9b735b6 --- /dev/null +++ b/electrumx.service @@ -0,0 +1,16 @@ +[Unit] +Description=ElectrumX Server +Wants=bitcoind.service +After=network.target bitcoind.service + +[Service] +EnvironmentFile=/etc/electrumx/electrumx.conf +ExecStart=/usr/bin/electrumx-server +ExecStop=/usr/bin/electrumx-rpc stop +User=electrumx +Group=electrumx +LimitNOFILE=infinity +TimeoutStopSec=30min + +[Install] +WantedBy=multi-user.target diff --git a/electrumx.sysusers b/electrumx.sysusers new file mode 100644 index 000000000000..1fd6186e3681 --- /dev/null +++ b/electrumx.sysusers @@ -0,0 +1 @@ +u electrumx - "ElectrumX daemon" /srv/electrumx |