aboutsummaryrefslogtreecommitdiffstats
path: root/testing/syncthing-inotify
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2017-08-09 23:30:24 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2017-08-09 23:30:24 +0200
commit49a8caa541860beb46de8bd16cb14f853d67ab12 (patch)
tree4f49c052c8c3449aad5f550c4aad909b7b539972 /testing/syncthing-inotify
parentd349d7186c6c2f2b912ecb054e6657b2eb373e13 (diff)
downloadaports-49a8caa541860beb46de8bd16cb14f853d67ab12.tar.bz2
aports-49a8caa541860beb46de8bd16cb14f853d67ab12.tar.xz
testing/syncthing-inotify: new aport
Diffstat (limited to 'testing/syncthing-inotify')
-rw-r--r--testing/syncthing-inotify/APKBUILD42
-rw-r--r--testing/syncthing-inotify/syncthing-inotify.initd21
2 files changed, 63 insertions, 0 deletions
diff --git a/testing/syncthing-inotify/APKBUILD b/testing/syncthing-inotify/APKBUILD
new file mode 100644
index 0000000000..9dc51d1aba
--- /dev/null
+++ b/testing/syncthing-inotify/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=syncthing-inotify
+pkgver=0.8.7
+pkgrel=0
+pkgdesc="File watcher intended for use with Syncthing"
+url="https://github.com/syncthing/syncthing-inotify"
+arch="all"
+license="MPL-2.0"
+depends="syncthing"
+makedepends="go"
+install=""
+subpackages=""
+source="syncthing-inotify-$pkgver.tar.gz::https://github.com/syncthing/syncthing-inotify/archive/v$pkgver.tar.gz
+ $pkgname.initd
+ "
+builddir="$srcdir/src/github.com/$pkgname"
+
+prepare() {
+ mkdir -p ${builddir%/*}
+ mv "$srcdir"/$pkgname-$pkgver "$builddir"/
+ cd "$builddir"
+ default_prepare
+}
+
+build() {
+ cd "$builddir"
+ export GOPATH="$srcdir"
+ go build -v -ldflags "-w -X main.Version=$pkgver"
+}
+
+check() {
+ "$builddir"/$pkgname -version > /dev/null
+}
+
+package() {
+ install -Dm755 "$builddir"/$pkgname "$pkgdir"/usr/bin/$pkgname
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+sha512sums="d6970ef97b84b9aaeea153e756ee6424f3851bea742fb56274d7d0b92d0851f7abf7c8f27202106db5c71aaaacebdb99376765267816294b8501c1a95237f901 syncthing-inotify-0.8.7.tar.gz
+686852c7ce89e9a066d5d7b9433471a66184ab59ecba2a6946e605b638d309715188488a1ec29b22f6d8292da9c05fc8726fa93ccd5565de48be236741316604 syncthing-inotify.initd"
diff --git a/testing/syncthing-inotify/syncthing-inotify.initd b/testing/syncthing-inotify/syncthing-inotify.initd
new file mode 100644
index 0000000000..64589eafef
--- /dev/null
+++ b/testing/syncthing-inotify/syncthing-inotify.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+
+name=$RC_SVCNAME
+command=/usr/bin/syncthing-inotify
+command_args="${SYNCTHING_INOTIFY_ARGS}"
+command_user="${SYNCTHING_INOTIFY_USER:-syncthing}"
+pidfile=/run/${RC_SVCNAME}.pid
+command_background=yes
+start_stop_daemon_args="--stdout /var/log/$RC_SVCNAME/${RC_SVCNAME}.log --stderr /var/log/$RC_SVCNAME/${RC_SVCNAME}.log"
+
+depend() {
+ use logger dns
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory --owner $command_user --mode 0775 \
+ /var/log/$RC_SVCNAME
+}
+