desktop/syncthing/PKGBUILD

49 lines
2.2 KiB
Bash
Raw Normal View History

# Contributions from ArchLinux: https://www.archlinux.org/packages/community/x86_64/syncthing/
pkgname=syncthing
2015-05-11 04:11:52 +08:00
pkgver=0.11.3
pkgrel=1
pkgdesc="Open Source Continuous Replication / Cluster Synchronization Thing"
url="http://syncthing.net/"
license=('GPL3')
arch=('x86_64')
screenshot='http://syncthing.net/screenshot.jpg'
depends=('glibc')
2015-05-09 00:03:55 +08:00
makedepends=('go' 'inetutils' 'sed')
source=("$pkgname-$pkgver::https://github.com/syncthing/syncthing/archive/v${pkgver}.tar.gz"
"syncthing.1"
2015-05-09 00:03:55 +08:00
"syncthing.desktop"
"https://upload.wikimedia.org/wikipedia/commons/8/83/SyncthingAugustLogo.png")
2015-05-11 04:11:52 +08:00
sha512sums=('1a223abf96120411bab7c59bee6a8cdd85d19377b42db4f9bb4929b4332ad1afd3297f797b93a1f0563b4bcd91d8fa5354ab5d1789e463c701997c58bcfd78b1'
2015-05-09 00:03:55 +08:00
'dafadb0c87b1f5b20c337cc0171f254586cc195304ad9b471392247537be06a98cac29575649109a176aa66ea8cee2809a051557352b86a117151e868d8392b3'
'121613768221627bb1d2e1ea8621f5ac5d2bc82a990c9f81bdc834d1348f122dbd5396b4ef3c6a7845ea492187d377dbed096683b942c64ef6c6218c28188868'
'3f93800b022a0e1d1d2b462cf1dfbc1f38a4e91ebba2b8b9a95b764617bf3303fdac91c2ceb1df3b5431523a556f3e482cf491e57e76983766aab381f96e3368')
install=${pkgname}.install
prepare() {
cd "${srcdir}"
mkdir -p "src/github.com/syncthing"
mv "${pkgname}-${pkgver}" "src/github.com/syncthing/${pkgname}"
}
build() {
export GOPATH="${srcdir}"
cd "${srcdir}/src/github.com/syncthing/${pkgname}"
go run build.go -no-upgrade build
}
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"
# Desktop icon
install -Dm644 "${srcdir}/${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop"
2015-05-09 00:03:55 +08:00
install -Dm644 "../../../../SyncthingAugustLogo.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png"
}