Add mercurial as build dependency, make handling of go library dependencies elegant
This commit is contained in:
		
							
								
								
									
										26
									
								
								PKGBUILD
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								PKGBUILD
									
									
									
									
									
								
							| @@ -2,33 +2,31 @@ | |||||||
|  |  | ||||||
| pkgname=go-asink-git | pkgname=go-asink-git | ||||||
| pkgver=0.1 | pkgver=0.1 | ||||||
| pkgrel=3 | pkgrel=5 | ||||||
| pkgdesc="An open source Dropbox clone" | pkgdesc="An open source Dropbox clone" | ||||||
| arch=('x86_64' 'i686') | arch=('x86_64' 'i686') | ||||||
| url="https://github.com/aclindsa/asink" | url="https://github.com/aclindsa/asink" | ||||||
| license=('GPL') | license=('GPL') | ||||||
| makedepends=('go' 'git' 'sqlite') | makedepends=('go' 'git' 'mercurial' 'sqlite') | ||||||
| options=('!strip' '!emptydirs') | options=('!strip' '!emptydirs') | ||||||
| source=("asink::git+https://github.com/aclindsa/asink#branch=master" | source=("tmpfiles_asink.conf") | ||||||
| 	"tmpfiles_asink.conf") | sha256sums=('a3ffee66244aaf41546f98f090990dbe2d4fce1bbd15f8721035484313b9d073') | ||||||
| sha256sums=('SKIP' |  | ||||||
| 	'a3ffee66244aaf41546f98f090990dbe2d4fce1bbd15f8721035484313b9d073') |  | ||||||
|  |  | ||||||
| build() { | build() { | ||||||
| 	source /etc/profile.d/go.sh | 	source /etc/profile.d/go.sh | ||||||
| 	GOPATH="$srcdir:$GOPATH"  | 	GOPATH="$srcdir:$GOPATH"  | ||||||
| 	go get -d code.google.com/p/gopass github.com/mattn/go-sqlite3 code.google.com/p/goconf/conf code.google.com/p/go.crypto/openpgp github.com/howeyc/fsnotify github.com/jlaffaye/goftp |  | ||||||
|  | 	#get go dependencies | ||||||
|  | 	go get -d github.com/aclindsa/asink/asink | ||||||
|  | 	go get -d github.com/aclindsa/asink/asinkd | ||||||
|  |  | ||||||
| 	cd $srcdir | 	cd $srcdir | ||||||
| 	if [ ! -d "src/asink" ]; then |  | ||||||
| 		ln -s ../asink src/asink |  | ||||||
| 	fi |  | ||||||
|  |  | ||||||
| 	if [ ! -d "bin" ]; then | 	if [ ! -d "bin" ]; then | ||||||
| 		mkdir bin | 		mkdir bin | ||||||
| 	fi | 	fi | ||||||
| 	go build -o bin/asink asink/asink |  | ||||||
| 	go build -o bin/asinkd asink/asinkd | 	go build -o bin/asink github.com/aclindsa/asink/asink | ||||||
|  | 	go build -o bin/asinkd github.com/aclindsa/asink/asinkd | ||||||
| } | } | ||||||
|  |  | ||||||
| package() { | package() { | ||||||
| @@ -38,7 +36,7 @@ package() { | |||||||
| 	install -Dm755 asink "$pkgdir/usr/bin/asink" | 	install -Dm755 asink "$pkgdir/usr/bin/asink" | ||||||
| 	install -Dm755 asinkd "$pkgdir/usr/bin/asinkd" | 	install -Dm755 asinkd "$pkgdir/usr/bin/asinkd" | ||||||
|  |  | ||||||
| 	cd $srcdir/src/asink | 	cd $srcdir/src/github.com/aclindsa/asink | ||||||
| 	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | 	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | ||||||
| 	install -Dm644 example_config "$pkgdir/etc/asink/example_config" | 	install -Dm644 example_config "$pkgdir/etc/asink/example_config" | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user