Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PKGBUILD for AUR on Archlinux #1

Merged
merged 1 commit into from
Dec 16, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: pcarrier

pkgname=gauth
pkgver=1.0
pkgrel=1
pkgdesc="Local laptop/desktop Google Authenticator written in go"
arch=('x86_64' 'i686')
url="https://github.com/pcarrier/gauth"
license=('MIT')
depends=('go')
makedepends=('mercurial')
options=('!strip' '!emptydirs')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

_gourl=github.com/pcarrier/gauth

build() {
GOPATH="$srcdir" go get -fix -v -x ${_gourl}/...
}

check() {
GOPATH="$GOPATH:$srcdir" go test -v -x ${_gourl}/...
}

package() {
mkdir -p "$pkgdir/usr/bin"
install -p -m755 "$srcdir/bin/"* "$pkgdir/usr/bin"

mkdir -p "$pkgdir/$GOPATH"
cp -Rv --preserve=timestamps "$srcdir/"{src,pkg} "$pkgdir/$GOPATH"

# Package license (if available)
for f in LICENSE COPYING LICENSE.* COPYING.*; do
if [ -e "$srcdir/src/$_gourl/$f" ]; then
install -Dm644 "$srcdir/src/$_gourl/$f" \
"$pkgdir/usr/share/licenses/$pkgname/$f"
fi
done
}

# vim:set ts=2 sw=2 et: