-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
47 lines (41 loc) · 1.49 KB
/
PKGBUILD
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
pkgname=syncthing
pkgver=1.29.0
pkgrel=1
pkgdesc="An open source continuous file synchronization"
url="http://syncthing.net/"
arch=('x86_64')
license=('MPL2')
makedepends=('go')
github_src="src/github.com/syncthing"
source=("https://github.com/syncthing/syncthing/archive/v${pkgver}.tar.gz")
md5sums=('f24cd02aea938f061016c5bd7eaa7d06')
install=syncthing.install
prepare() {
install -d ${github_src}
mv ${pkgname}-${pkgver} ${github_src}/${pkgname}
cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
}
build() {
export GOPATH=${srcdir}
export PATH=$PATH:$GOROOT/bin
cd ${github_src}/${pkgname}
go run build.go -version v${pkgver} -no-upgrade
}
package(){
cd ${srcdir}/${github_src}/${pkgname}
install -Dm755 bin/${pkgname} ${pkgdir}/usr/bin/${pkgname}
install -Dm644 etc/linux-systemd/system/${pkgname}@.service ${pkgdir}/usr/lib/systemd/system/${pkgname}@.service
install -Dm644 etc/linux-systemd/user/${pkgname}.service ${pkgdir}/usr/lib/systemd/user/${pkgname}.service
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
cd man
local file file1 file2
for file in $(find . -name '*.1' -print); do
install -Dm644 $file ${pkgdir}/usr/share/man/man1/${file}
done
for file1 in $(find . -name '*.5' -print); do
install -Dm644 $file ${pkgdir}/usr/share/man/man5/${file1}
done
for file2 in $(find . -name '*.7' -print); do
install -Dm644 $file ${pkgdir}/usr/share/man/man7/${file2}
done
}