blob: 453078ce0357ece64df0e8a81a5f3b8eca4571a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer: Kevin MacMartin <prurigro@gmail.com>
# Contributor: Iiridayn
# Contributor: hucsmn
_binname=stdiscosrv
_pkgname=syncthing
pkgname=$_pkgname-discosrv
epoch=1
pkgver=1.1.3
pkgrel=1
pkgdesc='Discover server for the syncthing P2P synchronization utility'
url='http://syncthing.net'
license=('MIT')
install=$pkgname.install
depends=('glibc')
makedepends=('go')
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
source=(
"https://github.com/$_pkgname/$_pkgname/archive/v$pkgver.tar.gz"
"$pkgname.service"
"$pkgname.tmpfiles.conf"
)
sha512sums=(
'43dff52336c19a9a8ce39413a9288d0f500d633589e0f3ff3989ad38d9c6fe6af5b01b27b3143e6beb0841e1e6bc6c590f4859530720e2730cdf214130c99a3a'
'f67a6051a1bbe9d3b562caaaecfc4829afa25cfddc5d5dd70dc8170bddc9d938fd85ab89b1c198f074f323d8e385d9fa8bc3a9bfe53594629dbfbf984c2e7015'
'28b0bb6a6f2fa536ec8cb887cfebf4706be25af5e29da39e2e3776daeeeb48f75fb5be255472920355948d8905830342866e89299facd626ddf8a658d84faf27'
)
prepare() {
rm -rf src
install -d src/github.com/$_pkgname
mv $_pkgname-$pkgver src/github.com/$_pkgname/$_pkgname
cd src/github.com/$_pkgname/$_pkgname
go mod vendor
}
build() {
export GOPATH="$srcdir"
cd src/github.com/$_pkgname/$_pkgname/cmd/stdiscosrv
go build -x -i -v -ldflags -w
}
package() {
# Install systemd service and tmpfiles config
install -Dm644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 $pkgname.tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
# Install license and list of authors
cd src/github.com/$_pkgname/$_pkgname
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 AUTHORS "$pkgdir/usr/share/licenses/$pkgname/AUTHORS"
# Install the man page
install -Dm644 man/$_binname.1 "$pkgdir/usr/share/man/man1/$pkgname.1"
# Install the binary
install -Dm755 cmd/$_binname/$_binname "$pkgdir/usr/bin/$pkgname"
}
|