summaryrefslogtreecommitdiff
path: root/community/syncthing/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/syncthing/PKGBUILD')
-rw-r--r--community/syncthing/PKGBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/community/syncthing/PKGBUILD b/community/syncthing/PKGBUILD
new file mode 100644
index 000000000..94e201be5
--- /dev/null
+++ b/community/syncthing/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id:
+# Maintainer : Martin Wimpress <code@flexion.org>
+# Contributor: Sauyon Lee <sauyonl@sauyon.com>
+# Contributor: Kevin MacMartin <prurigro@gmail.com>
+# Contributor: korjjj <korjjj+aur@gmail.com>
+
+_pkgstamp=$(date +%s)
+pkgname=syncthing
+pkgver=0.8.14
+pkgrel=1
+pkgdesc="Open Source Continuous Replication / Cluster Synchronization Thing"
+url="http://syncthing.net/"
+license=('MIT')
+arch=('i686' 'x86_64')
+depends=('glibc')
+makedepends=('go' 'godep' 'inetutils' 'sed')
+source=("https://github.com/calmh/${pkgname}/archive/v${pkgver}.tar.gz"
+ "syncthing@.service"
+ "syncthing.1")
+sha1sums=('271d000777039687627ada6e632292b96cf7f89a'
+ '204cad3823306c793a14a17a23220e26199160d4'
+ '17be8b3f99c577e325765abc251f597e204d7711')
+install=${pkgname}.install
+
+prepare() {
+ cd "${srcdir}"
+ mkdir -p "src/github.com/calmh"
+ mv "${pkgname}-${pkgver}" "src/github.com/calmh/${pkgname}"
+ # Patch the build variables that require a git clone
+ sed -i -e "s/^version=.*/version=\"${pkgver}\"/" "${srcdir}/src/github.com/calmh/${pkgname}/build.sh"
+ sed -i -e "s/^date=.*/date=\"${_pkgstamp}\"/" "${srcdir}/src/github.com/calmh/${pkgname}/build.sh"
+}
+
+build() {
+ export GOPATH="${srcdir}"
+ cd "${srcdir}/src/github.com/calmh/${pkgname}"
+ ./build.sh
+}
+
+check() {
+ export GOPATH="${srcdir}"
+ cd "${srcdir}/src/github.com/calmh/${pkgname}"
+ ./build.sh test
+}
+
+package() {
+ cd "${srcdir}/src/github.com/calmh/${pkgname}"
+ install -D -m 755 syncthing "${pkgdir}/usr/bin/syncthing"
+ install -D -m 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+ install -D -m 644 "${srcdir}/${pkgname}@.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service"
+ install -D -m 644 "${srcdir}/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+}