# Contributions from Arch Linux: https://www.archlinux.org/packages/community/x86_64/syncthing/ pkgname=syncthing pkgver=0.12.2 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.png") sha512sums=('ad42fb47c04d7d138976f3d1d71f5cecd979336430086a14201055a6c7cede4514f6fc379e37d9e2fad3324d3f4fa31f9cfb97af4b00e4676523c63b2ef89e34' 'dafadb0c87b1f5b20c337cc0171f254586cc195304ad9b471392247537be06a98cac29575649109a176aa66ea8cee2809a051557352b86a117151e868d8392b3' '121613768221627bb1d2e1ea8621f5ac5d2bc82a990c9f81bdc834d1348f122dbd5396b4ef3c6a7845ea492187d377dbed096683b942c64ef6c6218c28188868' '3f93800b022a0e1d1d2b462cf1dfbc1f38a4e91ebba2b8b9a95b764617bf3303fdac91c2ceb1df3b5431523a556f3e482cf491e57e76983766aab381f96e3368') 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.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png" }