desktop/syncthing/PKGBUILD
2015-08-02 14:36:49 +02:00

58 lines
2.4 KiB
Bash

# Contributions from Arch Linux: https://www.archlinux.org/packages/community/x86_64/syncthing/
pkgname=syncthing
pkgver=0.11.8
pkgrel=2
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=('93942f9f22f3893099bdea4fd57ead9863713bbaf0b28ce8dd6c2239016845918589f1b33c3afc11813f47ec8f69b2ed56c20d8743c6cfd4410ef52bbc03a602'
'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"
}