desktop/syncthing/PKGBUILD
2016-02-14 23:38:45 +01:00

59 lines
2.1 KiB
Bash

# Contributions from Arch Linux: https://www.archlinux.org/packages/community/x86_64/syncthing/
pkgname=syncthing
pkgver=0.12.19
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")
sha256sums=('d6d7aacc52724f80d589929667555156aa5a7705e3851ab5579d3b5d4eab0896'
'47913f9d2df6d1e240cbc7ecf04be7fb597ec6382052960a237d1230436b5932'
'd240ae741cf30f4e6559d16a50c62da928557a0c8567600875a770d15e53daf4'
'3457341a4089cc4ebe1835c352eaa35486f2c8be793c6a9e5e1d0891dc06e320')
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"
}