summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD38
-rw-r--r--nxt.install20
-rw-r--r--nxt.service10
4 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f4edbf81e52e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = nxt-git
+ pkgdesc = The Nxt Reference Software Client for use with the Nxt Cryptocurrency.
+ pkgver = 1.5.12.r5.g5bbafe1
+ pkgrel = 1
+ url = http://nxt.org
+ install = nxt.install
+ arch = any
+ license = MIT/GPL
+ makedepends = java-environment-openjdk=8
+ depends = bash
+ depends = java-runtime-openjdk=8
+ optdepends = flashplugin: for add to clipboard support
+ source = nxt-git::git+https://bitbucket.org/JeanLucPicard/nxt.git
+ source = nxt.service
+ source = nxt.install
+ sha256sums = SKIP
+ sha256sums = 293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7
+ sha256sums = b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca
+
+pkgname = nxt-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..18944f3981c0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: David Parrish <daveparrish@gmail.com>
+
+pkgname=nxt-git
+pkgver=1.5.12.r5.g5bbafe1
+pkgrel=1
+pkgdesc="The Nxt Reference Software Client for use with the Nxt Cryptocurrency."
+arch=('any')
+url="http://nxt.org"
+license=('MIT/GPL')
+depends=('bash' 'java-runtime-openjdk=8')
+makedepends=('java-environment-openjdk=8')
+optdepends=('flashplugin: for add to clipboard support')
+source=("${pkgname}::git+https://bitbucket.org/JeanLucPicard/nxt.git"
+ "nxt.service"
+ "nxt.install")
+sha256sums=('SKIP'
+ '293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7'
+ 'b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca')
+install='nxt.install'
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "${pkgname}"
+ ./compile.sh
+}
+
+package() {
+ # Copy to /opt/nxt
+ install -dm755 "$pkgdir/opt/nxt"
+ cp -r "${pkgname}"/* "$pkgdir"/opt/nxt/
+
+ # Copy service file
+ install -Dm644 nxt.service "$pkgdir/usr/lib/systemd/system/nxt.service"
+}
diff --git a/nxt.install b/nxt.install
new file mode 100644
index 000000000000..d7c64c3d3746
--- /dev/null
+++ b/nxt.install
@@ -0,0 +1,20 @@
+post_install() {
+ getent passwd nxt &>/dev/null || {
+ echo -n ">>> Creating nxt user... "
+ useradd --system --user-group --home /opt/nxt nxt
+ echo "done"
+ }
+ chown -R nxt:nxt /opt/nxt
+}
+
+post_upgrade() {
+ chown -R nxt:nxt /opt/nxt
+}
+
+pre_remove() {
+ getent passwd nxt &>/dev/null && {
+ echo -n ">>> Removing nxt user... "
+ userdel nxt
+ echo "done"
+ }
+}
diff --git a/nxt.service b/nxt.service
new file mode 100644
index 000000000000..d897342cd201
--- /dev/null
+++ b/nxt.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=NXT
+After=network.target
+
+[Service]
+User=nxt
+ExecStart=/usr/bin/bash -c 'cd /opt/nxt/; ./run.sh'
+
+[Install]
+WantedBy=multi-user.target