mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-18 23:22:24 +01:00
62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
|
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=syncthing
|
|
pkgver=1.0.1
|
|
pkgrel=0
|
|
pkgdesc="Open Source Continuous File Synchronization"
|
|
url="https://syncthing.net/"
|
|
arch="all !armhf !armv7 !s390x"
|
|
license="MPL-2.0"
|
|
pkgusers="$pkgname"
|
|
pkggroups="$pkgname"
|
|
makedepends="go"
|
|
install="$pkgname.pre-install"
|
|
subpackages="$pkgname-utils $pkgname-openrc"
|
|
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
|
|
only-test-with-race-when-provided.patch
|
|
$pkgname.initd
|
|
"
|
|
|
|
builddir="$srcdir/src/github.com/$pkgname/$pkgname"
|
|
|
|
prepare() {
|
|
mkdir -p ${builddir%/*}
|
|
mv "$srcdir"/$pkgname-$pkgver "$builddir"/
|
|
cd "$builddir"
|
|
default_prepare
|
|
}
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
export GOPATH="$srcdir"
|
|
go run build.go -no-upgrade -version=v$pkgver
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
export GOPATH="$srcdir"
|
|
go run build.go -no-upgrade test
|
|
}
|
|
|
|
package() {
|
|
install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname
|
|
install -D -m755 $builddir/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
|
|
install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
|
}
|
|
|
|
utils() {
|
|
pkgdesc="Syncthing utilities"
|
|
for i in $(ls $builddir/bin); do
|
|
if ! [ "$i" = "$pkgname" ]; then
|
|
install -Dm 755 $builddir/bin/$i $subpkgdir/usr/bin/$i
|
|
fi
|
|
done
|
|
}
|
|
|
|
sha512sums="7f9fd48e00fae2f0913eb9eeddadaad1d5d7559164a24020706e70411f8ec43420192c4c9422699be6faa1641a382d5b8627038ca9a5dad38ee0e189970efbb7 syncthing-1.0.1.tar.gz
|
|
3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch
|
|
7fe49210180827c28f3ee9a1a95da3884dbef34de9bdc643f4455c9a056adba81f16c1c6ac059e83bee360aea091ace98b8a6f4c4b26a32c450f61f15206d3f5 syncthing.initd"
|