diff options
author | Dylan Cali | 2013-10-04 00:24:07 -0500 |
---|---|---|
committer | Alexander Görtz | 2015-06-10 08:45:56 +0200 |
commit | 9f8f112a1634e2526f873657f4987a20401c3150 (patch) | |
tree | 20b9828d184f0f4e179833cc79bfd3af2009295b | |
parent | bcf5be8de3b6247c5b545a62c22562e7d64555f9 (diff) | |
download | aur-9f8f112a1634e2526f873657f4987a20401c3150.tar.gz |
vcs pkg guidelines now recommend pkgver function for date
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 52 |
3 files changed, 32 insertions, 37 deletions
@@ -1,15 +1,18 @@ pkgbase = google-authenticator-libpam-git pkgdesc = PAM module for google authenticator app - pkgver = 20131003 + pkgver = r150.f0d1574 pkgrel = 1 - url = https://code.google.com/p/google-authenticator/ - arch = any + url = https://github.com/google/google-authenticator + arch = i686 + arch = x86_64 license = APACHE makedepends = git depends = pam optdepends = qrencode: scannable QR codes for google auth phone app provides = google-authenticator-libpam conflicts = google-authenticator-libpam + source = google-authenticator-libpam-git::git+https://github.com/google/google-authenticator.git + md5sums = SKIP pkgname = google-authenticator-libpam-git diff --git a/.gitignore b/.gitignore index 8a65d5ec354b..147a00f036a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -pkg/ -src/ -*.pkg.tar.xz -*.src.tar.gz +* +!LICENSE +!PKGBUILD +!README.md @@ -1,47 +1,39 @@ # Maintainer: Dylan Cali <calid1984@gmail.com> +# Contributer: Alexander Görtz <aur@nyloc.de> pkgname='google-authenticator-libpam-git' -pkgver=20131003 + +pkgver=r150.f0d1574 +pkgver() { + cd "$srcdir/$pkgname" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + pkgrel=1 pkgdesc='PAM module for google authenticator app' -arch=('any') -url="https://code.google.com/p/google-authenticator/" +arch=('i686' 'x86_64') +url='https://github.com/google/google-authenticator' license=('APACHE') depends=('pam') makedepends=('git') optdepends=('qrencode: scannable QR codes for google auth phone app') provides=('google-authenticator-libpam') conflicts=('google-authenticator-libpam') - -_gitrepo='google-authenticator' -_gitbuild="${_gitrepo}-build" +source=("$pkgname"::'git+https://github.com/google/google-authenticator.git') +md5sums=(SKIP) build() { - - msg "Checking out latest source from $url" - - if [ -d "$_gitrepo" ] - then - cd "$_gitrepo" && git pull - cd "$srcdir" - else - # google code doesn't support shallow clones (yet) - git clone https://code.google.com/p/google-authenticator/ - fi - - rm -rf "$_gitbuild" - mkdir "$_gitbuild" - - cd "$_gitrepo" - find -mindepth 1 -maxdepth 1 -not -name '.git*' -print0 \ - | xargs -0 cp -rt "../$_gitbuild" - - cd "../$_gitbuild/libpam" - make + cd "${srcdir}/${pkgname}/libpam" + ./bootstrap.sh + ./configure --prefix=/usr + make } + package() { - cd "$srcdir/$_gitbuild/libpam" - install -D -m755 pam_google_authenticator.so "$pkgdir/usr/lib/security/pam_google_authenticator.so" - install -D -m755 google-authenticator "$pkgdir/usr/bin/google-authenticator" + cd "${srcdir}/${pkgname}/libpam" + make DESTDIR="${pkgdir}/" install } |