# Contributions from Arch Linux: https://www.archlinux.org/packages/community/x86_64/syncthing/ pkgname=syncthing pkgver=0.14.10 pkgrel=1 pkgdesc="Open Source Continuous Replication / Cluster Synchronization Thing" url="http://syncthing.net/" license=('MPLv2') arch=('x86_64') screenshot='http://syncthing.net/screenshot.jpg' depends=('glibc') makedepends=('go' 'inetutils' 'sed') source=("$pkgname-$pkgver::https://github.com/syncthing/syncthing/releases/download/v${pkgver}/syncthing-source-v${pkgver}.tar.gz" "syncthing.1" "syncthing.desktop" "syncthing.svg") sha256sums=('bed81f84ec0c11725ace01823707dd4d01ee015814e694201715f28d0be4f40d' '47913f9d2df6d1e240cbc7ecf04be7fb597ec6382052960a237d1230436b5932' 'd240ae741cf30f4e6559d16a50c62da928557a0c8567600875a770d15e53daf4' '483bbf0b23732b3b0dfb946be386e900ee7b6bfc14faede1fe4b74df6f2df0c6') install=${pkgname}.install prepare() { cd "${srcdir}" mkdir -p "src/github.com/syncthing" mv "${pkgname}" "src/github.com/syncthing/${pkgname}" } build() { export GOPATH="${srcdir}" cd "${srcdir}/src/github.com/syncthing/${pkgname}" go run build.go -no-upgrade build } check() { export GOPATH="${srcdir}" cd "${srcdir}/src/github.com/syncthing/${pkgname}" #go run build.go -no-upgrade test } package() { cd "${srcdir}/src/github.com/syncthing/${pkgname}" install -D -m 755 ${pkgname} "${pkgdir}/usr/bin/${pkgname}" install -D -m 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" install -D -m 644 "etc/linux-systemd/system/${pkgname}@.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service" install -D -m 644 "etc/linux-systemd/user/${pkgname}.service" "${pkgdir}/usr/lib/systemd/user/${pkgname}.service" install -D -m 644 "${srcdir}/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1" # license install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE # Desktop icon install -Dm644 "${srcdir}/${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop" install -Dm644 "../../../../syncthing.svg" "$pkgdir/usr/share/pixmaps/${pkgname}.svg" }