diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-01 14:36:06 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-01 14:36:18 +0200 |
commit | 2faf2ed81e07194fe82325bea6a73c9df6153362 (patch) | |
tree | 929791ccf85cdfc470aa1d5e46114c592d1ca25a /community/syncthing13 | |
parent | 0a9b332b7e1ee8855c47688142e374b637bbbcef (diff) | |
download | aports-2faf2ed81e07194fe82325bea6a73c9df6153362.tar.bz2 aports-2faf2ed81e07194fe82325bea6a73c9df6153362.tar.xz |
community/syncthing13: new aport
Diffstat (limited to 'community/syncthing13')
-rw-r--r-- | community/syncthing13/APKBUILD | 57 | ||||
-rw-r--r-- | community/syncthing13/syncthing.confd | 1 | ||||
-rw-r--r-- | community/syncthing13/syncthing.initd | 13 | ||||
-rw-r--r-- | community/syncthing13/syncthing13.pre-install | 6 |
4 files changed, 77 insertions, 0 deletions
diff --git a/community/syncthing13/APKBUILD b/community/syncthing13/APKBUILD new file mode 100644 index 0000000000..ddd3c66774 --- /dev/null +++ b/community/syncthing13/APKBUILD @@ -0,0 +1,57 @@ +# Contributor: Łukasz Jendrysik <scadu@yandex.com> +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=syncthing13 +_realname=syncthing +pkgver=0.13.10 +pkgrel=0 +pkgdesc="Open Source Continuous File Synchronization" +url="http://syncthing.net/" +arch="all" +license="MPLv2" +pkgusers="$_realname" +pkggroups="$_realname" +depends="" +depends_dev="" +makedepends="godep go" +install="$pkgname.pre-install" +subpackages="" +options="!strip" +source="$_realname-$pkgver.tar.gz::https://github.com/syncthing/syncthing/archive/v$pkgver.tar.gz + $_realname.confd + $_realname.initd" + +_builddir="$srcdir/src/github.com/$_realname" +prepare() { + default_prepare + mkdir -p "$_builddir" + ln -s "$srcdir"/$_realname-$pkgver "$_builddir"/$_realname || return 1 +} + +build() { + cd "$_builddir"/$_realname + GOPATH="$srcdir" go run build.go -no-upgrade -version=v$pkgver +} + +package() { + mkdir -p "$pkgdir"/usr/bin || return 1 + install -d -o $_realname -g $_realname \ + "$pkgdir"/var/lib/$_realname || return 1 + mv "$_builddir"/$_realname/bin/* \ + "$pkgdir"/usr/bin || return 1 + install -D -m755 "$srcdir"/$_realname.initd \ + "$pkgdir"/etc/init.d/$_realname || return 1 + install -D -m644 "$srcdir"/$_realname.confd \ + "$pkgdir"/etc/conf.d/$_realname || return 1 +} + +md5sums="3eb6d3e9fa73d2c29347d8192ab2185c syncthing-0.13.10.tar.gz +c4923d6df4d3e51274869c09ea46a3e1 syncthing.confd +760e26e5ea2f1dce8ce149a45f5e99bb syncthing.initd" +sha256sums="a86c7948afabc6e7b07f217d5200fb1e36cde5bb13373d99cc67d5dc991ce3be syncthing-0.13.10.tar.gz +da396f944d7b5b2e4f5a7a9a3a7b31529cf359ef7ebecec4c48383d0c8b6821e syncthing.confd +4d7c1de71cfc415d716471f32fdbb1693597f0209167e4c4ea302478481ab9b3 syncthing.initd" +sha512sums="199c38644a7e5d43777ca2e497d5304d8e77485d21aeed9a00efc74dd98bfb0c473dd0bf3230b8e1e9742315915419f198bb8d0a9b294d2f6fe918b6e0175812 syncthing-0.13.10.tar.gz +b19cc3d802caa33f4d06852de590d2d984c12cf27d0540162cd7195da4f3f149c83c72e7a10f385b32b27fff6f39d33698e7402442a3f32a9da136c5d19059ae syncthing.confd +21fa7b0090e579ad0f02bb8cc9a78736eb99811613823bf12d477262da2281543d07b47ae0888e2e3876a687bf4cab3c89405447373a9c5ab2915989c5f9dce8 syncthing.initd" diff --git a/community/syncthing13/syncthing.confd b/community/syncthing13/syncthing.confd new file mode 100644 index 0000000000..ffa341f9eb --- /dev/null +++ b/community/syncthing13/syncthing.confd @@ -0,0 +1 @@ +syncthing_args="-no-browser" diff --git a/community/syncthing13/syncthing.initd b/community/syncthing13/syncthing.initd new file mode 100644 index 0000000000..a34c28ed0d --- /dev/null +++ b/community/syncthing13/syncthing.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run + +name=syncthing +command=/usr/bin/$name +command_args=$syncthing_args +start_stop_daemon_args="--background --user $name --group $name" + +depend() { + use logger dns + need net + after firewall +} + diff --git a/community/syncthing13/syncthing13.pre-install b/community/syncthing13/syncthing13.pre-install new file mode 100644 index 0000000000..685d7ed629 --- /dev/null +++ b/community/syncthing13/syncthing13.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S syncthing 2>/dev/null +adduser -S -D -H -h /var/lib/syncthing -s /sbin/nologin -G syncthing -g syncthing syncthing 2>/dev/null + +exit 0 |