summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Trigaux2018-01-02 14:49:57 +0100
committerMartin Trigaux2018-01-02 14:49:57 +0100
commite62063a2a897e00306a84769431510ac44bb0810 (patch)
treece47de8bd8bad60ea8c1073d1072b75235c47282
downloadaur-e62063a2a897e00306a84769431510ac44bb0810.tar.gz
publish Ardor package
based on nxt scripts
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD38
-rw-r--r--ardor.install15
-rw-r--r--ardor.service11
4 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..56817e3ac44
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = ardor
+ pkgdesc = The Ardor Reference Software Client for use with the Ardor Blockchain Platform.
+ pkgver = 2.0.10
+ pkgrel = 1
+ url = https://www.ardorplatform.org
+ install = ardor.install
+ arch = any
+ license = MIT/GPL
+ makedepends = unzip
+ depends = jre8-openjdk
+ source = https://bitbucket.org/Jelurida/ardor/downloads/ardor-client-2.0.10.zip
+ source = ardor.service
+ sha256sums = c7190aa9575c13205f18a206ad62528135a5efecfee7eccf9968e7844e8946d4
+ sha256sums = 7b044d914d07f31d97746d9e5438dbcfedcd2e81e8acadb4c96dd315f2ce4862
+
+pkgname = ardor
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..76fb3d7f051
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Martin Trigaux <me@mart-e.be>
+pkgname=ardor
+pkgver=2.0.10
+pkgrel=1
+pkgdesc="The Ardor Reference Software Client for use with the Ardor Blockchain Platform."
+arch=()
+url="https://www.ardorplatform.org"
+license=('MIT/GPL')
+arch=(any)
+makedepends=(unzip)
+depends=('jre8-openjdk')
+install=$pkgname.install
+source=(
+ https://bitbucket.org/Jelurida/ardor/downloads/ardor-client-$pkgver.zip
+ ardor.service
+)
+sha256sums=(
+ 'c7190aa9575c13205f18a206ad62528135a5efecfee7eccf9968e7844e8946d4'
+ '7b044d914d07f31d97746d9e5438dbcfedcd2e81e8acadb4c96dd315f2ce4862'
+)
+
+package() {
+ mkdir -p $pkgdir/opt/$pkgname
+ mkdir -p $pkgdir/usr/bin
+ cp -rf $pkgname $pkgdir/opt
+
+ echo "#!/bin/sh" > $pkgdir/usr/bin/ardor
+ echo "cd /opt/ardor && bash run.sh" >> $pkgdir/usr/bin/ardor
+ echo "#!/bin/sh" > $pkgdir/usr/bin/ardor-tor
+ echo "cd /opt/ardor && bash run-tor.sh" >> $pkgdir/usr/bin/ardor-tor
+
+ install -Dm644 "${srcdir}"/ardor.service "${pkgdir}"/usr/lib/systemd/system/ardor.service
+
+ chmod 755 $pkgdir/usr/bin/ardor
+ chmod 755 $pkgdir/usr/bin/ardor-tor
+ mkdir nxt_db
+ chmod 777 -R $pkgdir/opt/ardor
+}
diff --git a/ardor.install b/ardor.install
new file mode 100644
index 00000000000..83f2c4437c9
--- /dev/null
+++ b/ardor.install
@@ -0,0 +1,15 @@
+note() {
+ printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
+}
+
+pre_upgrade() {
+ rm /opt/ardor/lib/*
+}
+
+post_install() {
+ note "Use 'sudo systemctl enable ardor' to automatically start Ardor at system launch"
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/ardor.service b/ardor.service
new file mode 100644
index 00000000000..379cb7ec4cc
--- /dev/null
+++ b/ardor.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Ardor per-user service
+
+[Service]
+Type=forking
+ExecStart=/opt/ardor/start.sh
+ExecStop=/opt/ardor/stop.sh
+Restart=on-abort
+
+[Install]
+WantedBy=default.target