|
|
|
name=syncthing
|
|
|
|
version=0.14.38
|
|
|
|
update_url="https://github.com/$name/$name/releases"
|
|
|
|
|
|
|
|
# Go doesn't like being stripped
|
|
|
|
options="!strip,$options"
|
|
|
|
|
|
|
|
dlextract "https://github.com/$name/$name/releases/download/v$version/$name-source-v$version.tar.gz" \
|
|
|
|
'81dcfedbe10478f8bf6ea9b0ce38b84f'
|
|
|
|
extrafile 'syncthing-browser.desktop'
|
|
|
|
_
|
|
|
|
|
|
|
|
# Set up a fake GOPATH
|
|
|
|
mkdir -p ".gopath/src/github.com/$name/"
|
|
|
|
ln -rs "$name" ".gopath/src/github.com/$name/$name"
|
|
|
|
export GOPATH="$PWD/.gopath"
|
|
|
|
|
|
|
|
cd "$name"
|
|
|
|
|
|
|
|
go run build.go -no-upgrade build
|
|
|
|
|
|
|
|
# Install program
|
|
|
|
install -Dm755 -t "$dir_install/$dir_prefix/$dir_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_man/man$num" "$file"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install desktop
|
|
|
|
install -Dm644 -t "$dir_install/$dir_prefix/$dir_data/applications" ../syncthing-browser.desktop
|
|
|
|
|
|
|
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:
|