Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2014 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/cc0a572dd98e3301955b to your computer and use it in GitHub Desktop.
Save anonymous/cc0a572dd98e3301955b to your computer and use it in GitHub Desktop.
stdin
# Description: Open source peer to peer file sync
# URL: http://syncthing.net
# Maintainer: Isak Andersson, contact at bitpuffin dot com
#
# Depends on: go git mercurial
name=syncthing
version=0.9.2
release=1
source=(
https://github.com/$name/$name/archive/v$version.tar.gz
$name.rc
)
oldgopath=$GOPATH
oldpath=$PATH
build() {
mkdir -p $SRC/src/github.com/$name
mv $name-$version $SRC/src/github.com/$name/$name
cd $SRC/src/github.com/$name/$name
export GOPATH=$SRC
export PATH=$SRC/bin:$PATH
#go get github.com/tools/godep
./build.sh setup
#./build.sh
godep go install ./cmd/syncthing
export GOPATH=$oldgopath
export PATH=$oldpath
install -D -m 755 $SRC/bin/$name $PKG/usr/bin/$name
install -D -m 755 $SRC/$name.rc $PKG/etc/rc.d/$name
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment