diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-12-27 15:31:12 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-12-27 15:31:12 -0300 |
commit | c01746a7e37c4b32614f76bb559225eebf43bfba (patch) | |
tree | 5f8dea61f2d01442bfe907f74b2ade9a9d0c6864 /pcr/discosrv/PKGBUILD | |
parent | fdc76cbb11a88e25a37a006550ffd3186e6238e4 (diff) |
discosrv is the discovery server for syncthing
Diffstat (limited to 'pcr/discosrv/PKGBUILD')
-rw-r--r-- | pcr/discosrv/PKGBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pcr/discosrv/PKGBUILD b/pcr/discosrv/PKGBUILD new file mode 100644 index 000000000..13b169a8b --- /dev/null +++ b/pcr/discosrv/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer : fauno <fauno@parabola.nu> + +_pkgname=discosrv +pkgname=${_pkgname}-git +pkgver=2014.12.27 +pkgrel=1 +pkgdesc="Discovery server for syncthing" +url="https://github.com/syncthing/discosrv" +license=('GPL3' 'custom:BSD1' 'custom:BSD3' 'Apache') +arch=('i686' 'x86_64') +depends=('glibc') +makedepends=('git' 'go' 'godep') +install=${_pkgname}.install +source=(https://repo.parabola.nu/other/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig} + ${_pkgname}.service) +md5sums=('4ddae1dd5cb4745953e97d7537ad36c3' + 'SKIP' + '511efdc439b909da5cc7e3037b2a4391') + +mksource() { + set -o pipefail + mkdir -p "${pkgname}-${pkgver}" + export GOPATH="${srcdir}/${pkgname}-${pkgver}" + + go get -d github.com/syncthing/discosrv +} + +build() { + export GOPATH="${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${pkgname}-${pkgver}/src/github.com/syncthing/${_pkgname}" + go build +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}/src/github.com/syncthing/${_pkgname}" + install -D -m 755 ${_pkgname} "${pkgdir}/usr/bin/${_pkgname}" + + for license in "${srcdir}/${pkgname}-${pkgver}"/src/*/*/*/LICENSE; do + local dir="$(dirname "${license}")" + install -Dm 644 "${license}" "${pkgdir}/usr/share/licenses/${pkgname}/${dir##*/}/LICENSE" + done + + install -dm750 --owner nobody --group nobody ${pkgdir}/var/discosrv + install -Dm644 ${srcdir}/${_pkgname}.service ${pkgdir}/usr/lib/systemd/system/${_pkgname}.service +} |