diff options
author | redfish | 2018-02-05 12:11:10 -0500 |
---|---|---|
committer | redfish | 2018-02-05 12:11:10 -0500 |
commit | 94389754e727d729ab6e92fc5e6c12fdbb02f680 (patch) | |
tree | 42de1dc5ca38c713954f9a12a5865ae736b55b28 | |
download | aur-94389754e727d729ab6e92fc5e6c12fdbb02f680.tar.gz |
gostcoin PKGBUILD
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 77 | ||||
-rw-r--r-- | gostcoin.install | 13 | ||||
-rw-r--r-- | gostcoind.conf | 11 | ||||
-rw-r--r-- | gostcoind.service | 21 |
6 files changed, 160 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b9d301a21af9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +# Generated by mksrcinfo v8 +# Mon Feb 5 17:09:58 UTC 2018 +pkgbase = gostcoin-git + pkgdesc = Coin based on GOST R 34.10 and GOST R 34.11-2012 with I2P support + pkgver = v0.8.5.10.r44.g90ce779 + pkgrel = 1 + url = http://gostcoin.i2p + install = gostcoin.install + arch = i686 + arch = x86_64 + arch = armv7h + arch = aarch64 + license = MIT + makedepends = boost + makedepends = cmake + depends = boost-libs + depends = openssl-1.0 + depends = i2pd + backup = etc/gostcoind.conf + source = gostcoin::git+https://github.com/GOSTSec/gostcoin + source = gostcoind.service + source = gostcoind.conf + md5sums = SKIP + md5sums = 5fd2ff66d55bdfcba99755bb7c88b7f0 + md5sums = a2811c45f7bdbb9dc66775f6f897631e + +pkgname = gostcoind-git + provides = gostcoind + conflicts = gostcoind + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ffb5db69085c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.*.swp +.*.swo + +*.tar.xz +gostcoin/ + +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6c725446e3c4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: redfish <redfish@galactica.pw> + +#_BUILD_QT_GUI=1 # comment out to unset + +pkgbase=gostcoin-git +pkgname=('gostcoind-git') +if [ ! -z "$_BUILD_QT_GUI" ] +then +pkgname+=('gostcoin-qt-git') +fi + +pkgver=v0.8.5.10.r44.g90ce779 +pkgrel=1 +pkgdesc="Coin based on GOST R 34.10 and GOST R 34.11-2012 with I2P support" +arch=('i686' 'x86_64' 'armv7h' 'aarch64') +url="http://gostcoin.i2p" +license=('MIT') +makedepends=('boost' 'cmake') + +depends=('boost-libs' 'openssl-1.0' 'i2pd') +if [ ! -z "$_BUILD_QT_GUI" ] +then +depends+=('qt5-base') +fi + +source=("${pkgbase%%-git}::git+https://github.com/GOSTSec/gostcoin" + "gostcoind.service" + "gostcoind.conf") +backup=("etc/gostcoind.conf") +install="${pkgbase%%-git}.install" + + +pkgver() { + cd ${pkgbase%%-git} + echo $(git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g') +} + +build() { + cd $srcdir/${pkgbase%%-git}/src + + make \ + OPENSSL_INCLUDE_PATH=/usr/include/openssl-1.0 \ + OPENSSL_LIB_PATH=/usr/lib/openssl-1.0 \ + -f makefile.unix +} + +package_gostcoind-git(){ + cd $srcdir/${pkgbase%%-git} + + provides=('gostcoind') + conflicts=('gostcoind') + + install -Dm755 $srcdir/${pkgbase%%-git}/src/gostcoind "$pkgdir/usr/bin/gostcoind" + install -Dm0644 $srcdir/gostcoind.service $pkgdir/usr/lib/systemd/system/gostcoind.service + install -Dm0644 $srcdir/gostcoind.conf $pkgdir/etc/gostcoind.conf + + install -Dm644 $srcdir/${pkgbase%%-git}/COPYING $pkgdir/${_share_dest}/licenses/${pkgbase%%-git}/LICENSE +} + +package_gostcoin-qt-git(){ + cd $srcdir/${pkgbase%%-git} + + provides=('gostcoin-qt') + conflicts=('gostcoin-qt') + + qmake DEFINES+=BOOST_ASIO_ENABLE_OLD_SERVICES \ + OPENSSL_INCLUDE_PATH=/usr/include/openssl-1.0 \ + OPENSSL_LIB_PATH=/usr/lib/openssl-1.0 \ + + make + + install -Dm755 $srcdir/${pkgbase%%-git}/src/qt/gostcoin-qt "$pkgdir/usr/bin/gostcoin-qt" +} + +md5sums=('SKIP' + '5fd2ff66d55bdfcba99755bb7c88b7f0' + 'a2811c45f7bdbb9dc66775f6f897631e') diff --git a/gostcoin.install b/gostcoin.install new file mode 100644 index 000000000000..bcea5684eefc --- /dev/null +++ b/gostcoin.install @@ -0,0 +1,13 @@ +USER=gostcoin +HOME=/var/lib/gostcoin + +post_install() { + getent passwd ${USER} &>/dev/null || { + echo -n ">>> Creating ${USER} user... " + useradd --system --user-group -m --home ${HOME} ${USER} + echo "done" + } # user not removed on uninstall by Arch policy: no unowned directories + + echo ">>> You must enable [sam] in /etc/i2p/i2pd.conf and set port in /etc/gostcoind.conf" + echo ">>> To start gostcoin daemon: systemctl start gostcoind" +} diff --git a/gostcoind.conf b/gostcoind.conf new file mode 100644 index 000000000000..f79cf0723da5 --- /dev/null +++ b/gostcoind.conf @@ -0,0 +1,11 @@ +# See 'gostcoind --help' for a list of options + +i2p=1 +onlynet=i2p + +# samhost=127.0.0.1 +# samport=7656 + +# Required to be set if running in daemon mode +rpcuser=gostcoinrpc +rpcpassword=ididnoteditthedefaultconfig diff --git a/gostcoind.service b/gostcoind.service new file mode 100644 index 000000000000..f51c4aa75ed5 --- /dev/null +++ b/gostcoind.service @@ -0,0 +1,21 @@ +[Unit] +Description=Coin based on GOST R 34.10 and GOST R 34.11-2012 with I2P support +After=network.target +Wants=i2pd.target + +[Service] +User=gostcoin +Group=gostcoin +RuntimeDirectory=gostcoind +RuntimeDirectoryMode=0700 +WorkingDirectory=~ +Type=simple +ExecStart=/usr/bin/gostcoind -daemon -conf=/etc/gostcoind.conf -datadir=/var/lib/gostcoin -pid=/var/run/gostcoind/gostcoind.pid +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/var/run/gostcoind/gostcoind.pid + +### Uncomment, if auto restart needed +#Restart=on-failure + +[Install] +WantedBy=multi-user.target |