Add namecoin backend package
This commit is contained in:
parent
7b19bf7312
commit
65b8f9dfdf
@ -1,4 +1,4 @@
|
||||
TARGETS = bitcoin zcash bcash ethereum bgold dash litecoin dogecoin
|
||||
TARGETS = bitcoin zcash bcash ethereum bgold dash litecoin dogecoin namecoin
|
||||
IMAGE = blockbook-backend-build-deb
|
||||
NO_CACHE = false
|
||||
|
||||
|
||||
13
contrib/backends/namecoin/Makefile
Normal file
13
contrib/backends/namecoin/Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
NAMECOIN_VERSION := 0.13.99
|
||||
|
||||
all:
|
||||
wget https://namecoin.org/files/namecoin-core-${NAMECOIN_VERSION}-name-tab-beta1-notreproduced/namecoin-${NAMECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||
tar -xf namecoin-${NAMECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||
mv namecoin-${NAMECOIN_VERSION} namecoin
|
||||
rm namecoin/bin/namecoin-qt
|
||||
rm namecoin/bin/test_namecoin*
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf namecoin
|
||||
rm -f namecoin-${NAMECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||
@ -0,0 +1 @@
|
||||
/opt/coins/nodes/namecoin/namecoin.conf
|
||||
1
contrib/backends/namecoin/debian/backend-namecoin.dirs
Normal file
1
contrib/backends/namecoin/debian/backend-namecoin.dirs
Normal file
@ -0,0 +1 @@
|
||||
/opt/coins/data/namecoin/backend
|
||||
@ -0,0 +1,2 @@
|
||||
namecoin/* /opt/coins/nodes/namecoin
|
||||
namecoin.conf /opt/coins/nodes/namecoin
|
||||
10
contrib/backends/namecoin/debian/backend-namecoin.logrotate
Normal file
10
contrib/backends/namecoin/debian/backend-namecoin.logrotate
Normal file
@ -0,0 +1,10 @@
|
||||
/opt/coins/data/namecoin/backend/debug.log
|
||||
/opt/coins/data/namecoin/backend/db.log
|
||||
{
|
||||
rotate 7
|
||||
daily
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
20
contrib/backends/namecoin/debian/backend-namecoin.postinst
Normal file
20
contrib/backends/namecoin/debian/backend-namecoin.postinst
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
|
||||
configure)
|
||||
if ! id -u namecoin &> /dev/null
|
||||
then
|
||||
useradd --system -M -U namecoin -s /bin/false
|
||||
fi
|
||||
|
||||
if [ "$(stat -c '%U' /opt/coins/data/namecoin/backend)" != "namecoin" ]
|
||||
then
|
||||
chown -R namecoin:namecoin /opt/coins/data/namecoin/backend
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
47
contrib/backends/namecoin/debian/backend-namecoin.service
Normal file
47
contrib/backends/namecoin/debian/backend-namecoin.service
Normal file
@ -0,0 +1,47 @@
|
||||
# It is not recommended to modify this file in-place, because it will
|
||||
# be overwritten during package upgrades. If you want to add further
|
||||
# options or overwrite existing ones then use
|
||||
# $ systemctl edit namecoin.service
|
||||
# See "man systemd.service" for details.
|
||||
|
||||
# Note that almost all daemon options could be specified in
|
||||
# /opt/coins/nodes/namecoin/namecoin.conf
|
||||
|
||||
[Unit]
|
||||
Description=Namecoin daemon (mainnet)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/coins/nodes/namecoin/bin/namecoind -datadir=/opt/coins/data/namecoin/backend -conf=/opt/coins/nodes/namecoin/namecoin.conf -pid=/run/namecoind/namecoin.pid
|
||||
# Creates /run/namecoind owned by namecoin
|
||||
RuntimeDirectory=namecoind
|
||||
User=namecoin
|
||||
Type=forking
|
||||
PIDFile=/run/namecoind/namecoin.pid
|
||||
Restart=on-failure
|
||||
|
||||
# Resource limits
|
||||
LimitNOFILE=500000
|
||||
|
||||
# Hardening measures
|
||||
####################
|
||||
|
||||
# Provide a private /tmp and /var/tmp.
|
||||
PrivateTmp=true
|
||||
|
||||
# Mount /usr, /boot/ and /etc read-only for the process.
|
||||
ProtectSystem=full
|
||||
|
||||
# Disallow the process and all of its children to gain
|
||||
# new privileges through execve().
|
||||
NoNewPrivileges=true
|
||||
|
||||
# Use a new /dev namespace only populated with API pseudo devices
|
||||
# such as /dev/null, /dev/zero and /dev/random.
|
||||
PrivateDevices=true
|
||||
|
||||
# Deny the creation of writable and executable memory mappings.
|
||||
# MemoryDenyWriteExecute=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
5
contrib/backends/namecoin/debian/changelog
Normal file
5
contrib/backends/namecoin/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
namecoin (0.13.99-satoshilabs1) unstable; urgency=medium
|
||||
|
||||
* Initial build
|
||||
|
||||
-- Martin Bohm <martin.bohm@satoshilabs.com> Mon, 18 Jun 2018 11:12:13 +0200
|
||||
1
contrib/backends/namecoin/debian/compat
Normal file
1
contrib/backends/namecoin/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
||||
11
contrib/backends/namecoin/debian/control
Normal file
11
contrib/backends/namecoin/debian/control
Normal file
@ -0,0 +1,11 @@
|
||||
Source: namecoin
|
||||
Section: satoshilabs
|
||||
Priority: optional
|
||||
Maintainer: martin.bohm@satoshilabs.com
|
||||
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
|
||||
Standards-Version: 3.9.5
|
||||
|
||||
Package: backend-namecoin
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
|
||||
Description: Satoshilabs packaged namecoin server
|
||||
11
contrib/backends/namecoin/debian/rules
Executable file
11
contrib/backends/namecoin/debian/rules
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
DH_VERBOSE = 1
|
||||
|
||||
%:
|
||||
dh $@ --with=systemd
|
||||
|
||||
override_dh_systemd_start:
|
||||
dh_systemd_start --no-start
|
||||
|
||||
override_dh_installinit:
|
||||
19
contrib/backends/namecoin/namecoin.conf
Normal file
19
contrib/backends/namecoin/namecoin.conf
Normal file
@ -0,0 +1,19 @@
|
||||
daemon=1
|
||||
server=1
|
||||
nolisten=1
|
||||
rpcuser=rpc
|
||||
rpcpassword=rpc
|
||||
rpcport=8039
|
||||
txindex=1
|
||||
whitelist=127.0.0.1
|
||||
upnp=0
|
||||
discover=0
|
||||
|
||||
zmqpubhashtx=tcp://127.0.0.1:38339
|
||||
zmqpubhashblock=tcp://127.0.0.1:38339
|
||||
|
||||
rpcworkqueue=1100
|
||||
maxmempool=2000
|
||||
dbcache=1000
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user