|
|
|
name=syncthing
|
|
|
|
version=0.14.32
|
|
|
|
update_url="https://github.com/$name/$name/releases"
|
|
|
|
|
|
|
|
dlextract "https://github.com/$name/$name/releases/download/v$version/$name-source-v$version.tar.gz" \
|
|
|
|
'3f5a4a413624572d9191e7032f480f3b'
|
|
|
|
extrafile 'syncthing-browser.desktop'
|
|
|
|
header_end
|
|
|
|
|
|
|
|
# Set up a GOPATH for all the included libraries
|
|
|
|
mkdir -p "src/github.com/$name/"
|
|
|
|
mv -T "$name" "src/github.com/$name/$name"
|
|
|
|
export GOPATH="$PWD"
|
|
|
|
|
|
|
|
cd "src/github.com/$name/$name"
|
|
|
|
|
|
|
|
# Do shared linking against the go libraries
|
|
|
|
sed -i -e 's/"install", "-v", "-ldflags"/"install", "-linkshared", "-v", "-ldflags"/' build.go
|
|
|
|
|
|
|
|
go run build.go -no-upgrade
|
|
|
|
|
|
|
|
# Install program
|
|
|
|
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" bin/syncthing
|
|
|
|
|
|
|
|
# Install manpages
|
|
|
|
for file in man/syncthing.1 man/*.5 man/*.7; do
|
|
|
|
num="$(echo "$file" | cut -d '.' -f 2)"
|
|
|
|
install -Dm644 -t "$dir_install/$dir_prefix/$dir_mandir/man$num" "$file"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install desktop
|
|
|
|
install -Dm644 -t "$dir_install/$dir_prefix/$dir_datadir/applications" ../../../../syncthing-browser.desktop
|
|
|
|
|
|
|
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:
|