[arch-commits] Commit in syncthing/trunk (4 files)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Sun Jun 19 10:26:39 UTC 2016


    Date: Sunday, June 19, 2016 @ 10:26:39
  Author: bpiotrowski
Revision: 180447

upgpkg: syncthing 0.13.7-2

provide relaysrv in split package

Added:
  syncthing/trunk/syncthing-relaysrv.install
  syncthing/trunk/syncthing-relaysrv.sysusers
  syncthing/trunk/syncthing-relaysrv.tmpfiles
Modified:
  syncthing/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   69 ++++++++++++++++++++++++++++--------------
 syncthing-relaysrv.install  |    4 ++
 syncthing-relaysrv.sysusers |    2 +
 syncthing-relaysrv.tmpfiles |    1 
 4 files changed, 53 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-06-19 10:04:11 UTC (rev 180446)
+++ PKGBUILD	2016-06-19 10:26:39 UTC (rev 180447)
@@ -5,57 +5,65 @@
 # Contributor: Kevin MacMartin <prurigro at gmail.com>
 # Contributor: korjjj <korjjj+aur at gmail.com>
 
-pkgname=syncthing
+pkgname=('syncthing' 'syncthing-relaysrv')
 pkgver=0.13.7
-pkgrel=1
-pkgdesc="Open Source Continuous Replication / Cluster Synchronization Thing"
+pkgrel=2
 arch=('i686' 'x86_64')
 url="http://syncthing.net/"
 license=('MPL')
 depends=('glibc')
 makedepends=('git' 'go' 'godep' 'inetutils' 'sed')
-install=$pkgname.install
-source=($pkgname-$pkgver::git+https://github.com/syncthing/syncthing.git#tag=v${pkgver})
-sha1sums=('SKIP')
+options=('!strip')
+source=(git+https://github.com/syncthing/syncthing.git#tag=v${pkgver}
+        syncthing-relaysrv.sysusers
+        syncthing-relaysrv.tmpfiles)
+sha1sums=('SKIP'
+          'bee6e3592cef0a607058192381e0bab46b744e23'
+          '5fed57ce9faa850af5fabebb76294d35b023c00b')
 
 prepare() {
+  cd "${srcdir}/${pkgbase}/cmd/relaysrv"
+  sed -i -e 's|/usr/bin/relaysrv|/usr/bin/syncthing-relaysrv|' \
+    etc/linux-systemd/syncthing-relaysrv.service
+
   cd "${srcdir}"
   install -d "src/github.com/syncthing"
-  mv "${pkgname}-${pkgver}" "src/github.com/syncthing/${pkgname}"
+  mv "${pkgbase}" "src/github.com/syncthing/${pkgbase}"
 }
 
 build() {
   export GOPATH="${srcdir}" GOROOT_FINAL="/usr/bin"
-  cd "${srcdir}/src/github.com/syncthing/${pkgname}"
-  if [ ${CARCH}" == "i686" ] ; then
-      go run build.go -no-upgrade -goarch 386 build
-  elif [ ${CARCH}" == "x86_64" ] ; then
-      go run build.go -no-upgrade -goarch amd64 build
-  else
-      go run build.go -no-upgrade build
-  fi
+  cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
+  go run build.go -no-upgrade build
+  go run build.go -no-upgrade build relaysrv
 }
 
 check() {
   export GOPATH="${srcdir}" GOROOT_FINAL="/usr/bin"
-  cd "${srcdir}/src/github.com/syncthing/${pkgname}"
+  cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
   if [ "${CARCH}" == "x86_64" ] ; then
     go run build.go -no-upgrade test
   fi
 }
 
-package() {
-  cd "${srcdir}/src/github.com/syncthing/${pkgname}"
+package_syncthing() {
+  pkgdesc="Open Source Continuous Replication / Cluster Synchronization Thing"
+  install=$pkgname.install
+
+  cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
   install -Dm755 ${pkgname} "${pkgdir}/usr/bin/${pkgname}"
   install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
-  install -Dm644 "etc/linux-systemd/system/${pkgname}-resume.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}-resume.service"
-  install -Dm644 "etc/linux-systemd/system/${pkgname}@.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service"
-  install -Dm644 "etc/linux-systemd/user/${pkgname}.service" "${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
+  install -Dm644 "etc/linux-systemd/system/${pkgname}-resume.service" \
+    "${pkgdir}/usr/lib/systemd/system/${pkgname}-resume.service"
+  install -Dm644 "etc/linux-systemd/system/${pkgname}@.service" \
+    "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service"
+  install -Dm644 "etc/linux-systemd/user/${pkgname}.service" \
+    "${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
 
-# license
+  # license
   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 
-# man pages
+  # man pages
   cd "${srcdir}/src/github.com/syncthing/${pkgname}/man"
   for file in $(find . -name '*.1' -print); do
     install -Dm644 $file "${pkgdir}"/usr/share/man/man1/$file
@@ -67,3 +75,18 @@
     install -Dm644 $file "${pkgdir}"/usr/share/man/man7/$file
   done
 }
+
+package_syncthing-relaysrv() {
+  pkgdesc='Relay server for Syncthing'
+  install=${pkgname}.install
+
+  cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
+  install -Dm755 relaysrv "${pkgdir}"/usr/bin/${pkgname}
+
+  install -Dm644 cmd/relaysrv/etc/linux-systemd/${pkgname}.service \
+    "${pkgdir}"/usr/lib/systemd/system/${pkgname}.service
+  install -Dm644 "${srcdir}/${pkgname}.tmpfiles" \
+    "$pkgdir/usr/lib/tmpfiles.d/${pkgname}.conf"
+  install -Dm644 "${srcdir}/${pkgname}.sysusers" \
+    "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+}

Added: syncthing-relaysrv.install
===================================================================
--- syncthing-relaysrv.install	                        (rev 0)
+++ syncthing-relaysrv.install	2016-06-19 10:26:39 UTC (rev 180447)
@@ -0,0 +1,4 @@
+post_install (){
+  systemd-sysusers syncthing-relaysrv.conf
+  systemd-tmpfiles --create syncthing-relaysrv.conf
+}

Added: syncthing-relaysrv.sysusers
===================================================================
--- syncthing-relaysrv.sysusers	                        (rev 0)
+++ syncthing-relaysrv.sysusers	2016-06-19 10:26:39 UTC (rev 180447)
@@ -0,0 +1,2 @@
+u syncthing-relaysrv - "Syncthing relay server"
+g syncthing-relaysrv -

Added: syncthing-relaysrv.tmpfiles
===================================================================
--- syncthing-relaysrv.tmpfiles	                        (rev 0)
+++ syncthing-relaysrv.tmpfiles	2016-06-19 10:26:39 UTC (rev 180447)
@@ -0,0 +1 @@
+d /var/lib/syncthing-relaysrv 0700 syncthing-relaysrv syncthing-relaysrv -



More information about the arch-commits mailing list