summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorredfish2018-01-24 01:55:36 -0500
committerredfish2018-01-24 01:55:36 -0500
commit934ab40664342e5b8e9efaed0f77fd978c501fb1 (patch)
tree2a749d8ca7e9912458047adc1e80068aac4b0abc
downloadaur-934ab40664342e5b8e9efaed0f77fd978c501fb1.tar.gz
XD v0.1.0pre2
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD40
-rw-r--r--xd.install9
-rw-r--r--xd.service12
5 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d885b7dbf48c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by mksrcinfo v8
+# Wed Jan 24 06:50:24 UTC 2018
+pkgbase = xd-torrent-git
+ pkgdesc = Standalone I2P BitTorrent Client written in GO
+ pkgver = v0.1.0.pre2
+ pkgrel = 1
+ url = https://github.com/majestrate/XD
+ install = xd.install
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = go>=1.6
+ depends = i2pd>=2.17.0.r49
+ provides = xd-torrent
+ conflicts = xd-torrent
+ backup = etc/xd.conf
+ source = git://github.com/majestrate/XD.git
+ source = xd.service
+ md5sums = SKIP
+ md5sums = 7f87ea2d6fc76aee8821efc5709a0115
+
+pkgname = xd-torrent-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..21a09ecbe79b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+.*.swp
+.*.swo
+
+src/
+pkg/
+*.tar.xz
+XD/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c0fedec88f39
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: redfish <redfish at galactica dot pw>
+
+pkgname='xd-torrent-git'
+_gitname='XD'
+pkgver=v0.1.0.pre2
+pkgrel=1
+arch=('any')
+url="https://github.com/majestrate/XD"
+depends=('go>=1.6' 'i2pd>=2.17.0.r49')
+makedepends=('git')
+license=('MIT')
+pkgdesc="Standalone I2P BitTorrent Client written in GO"
+provides=(xd-torrent)
+conflicts=(xd-torrent)
+source=("git://github.com/majestrate/XD.git"
+ "xd.service")
+md5sums=('SKIP'
+ '7f87ea2d6fc76aee8821efc5709a0115')
+install="xd.install"
+backup=("etc/xd.conf")
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+ echo $(git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
+}
+
+build() {
+ cd "$srcdir/$_gitname"
+ make
+}
+
+package() {
+ cd "$srcdir/$_gitname"
+
+ install -D -m755 "XD" "$pkgdir/usr/bin/XD"
+ install -D -m644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ #install -D -m644 "xd.conf" "$pkgdir/etc/xd.conf"
+ install -D -m644 "$srcdir/xd.service" "$pkgdir/usr/lib/systemd/system/xd.service"
+}
diff --git a/xd.install b/xd.install
new file mode 100644
index 000000000000..17daff4945f6
--- /dev/null
+++ b/xd.install
@@ -0,0 +1,9 @@
+post_install() {
+ getent passwd xd &>/dev/null || {
+ echo -n ">>> Creating xd-torrent user... "
+ useradd --system --user-group -m --home /var/lib/xd xd
+ echo "done"
+ } # NOTE: we do not autoremove user due to security concerns (Arch policy)
+
+ sudo -u xd XD --genconf /etc/xd.conf
+}
diff --git a/xd.service b/xd.service
new file mode 100644
index 000000000000..54057e937517
--- /dev/null
+++ b/xd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Standalone I2P BitTorrent Client
+
+[Service]
+User=xd
+Group=xd
+WorkingDirectory=~
+ExecStart=/usr/bin/XD /etc/xd.conf
+#Restart=on-failure
+
+[Install]
+WantedBy=default.target