summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorK. Hampf2016-02-08 22:20:35 +0200
committerK. Hampf2016-02-08 22:20:35 +0200
commitb7e7b7b27cda4889c50e280e5c470ae5e316fda5 (patch)
treef84540bcb60349cf108e931bd845cb73a3d26f56 /PKGBUILD
parentbc9f497914bf03210a31b104ef21dded8f85a7da (diff)
downloadaur-b7e7b7b27cda4889c50e280e5c470ae5e316fda5.tar.gz
Updated PKGBUILD following VCS package guidelines
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD65
1 files changed, 23 insertions, 42 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 083003169872..da9fdc28a686 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,60 +1,41 @@
# Maintainer: Lukas Sabota <lukas@lwsabota.com>
-pkgbase=g13
-pkgname=$pkgbase-git
-pkgver=20150903
-pkgrel=2
+# Contributor: K. Hampf <khampf@users.sourceforge.net>
+
+pkgbase="g13"
+pkgname="g13-git"
+pkgver=20160120
+pkgrel=1
pkgdesc="Userspace driver for the Logitech G13 Keyboard"
arch=('x86_64' 'i686')
url="https://github.com/ecraven/g13"
license=('unknown')
-groups=()
depends=('boost-libs')
makedepends=('git' 'boost')
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=()
-install=
-source=()
-noextract=()
-
-_gitroot="https://github.com/ecraven/g13"
-
+source=("${pkgname}::git://github.com/ecraven/g13")
+sha256sums=('SKIP')
pkgver() {
- cd $pkgbase
- git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ cd "${pkgname}"
+ local desc=$(git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
+ if [ -z "$desc" ]; then
+ # date of last commit as YYYYMMDD
+ git log -1 --date=format:%Y%m%d --format=%cd
+ fi
}
build() {
- cd "$srcdir"
- msg "Connecting to GIT server...."
-
- if [ -d $pkgbase ] ; then
- cd $pkgbase && git pull origin
- msg "The local files are updated."
- else
- git clone $_gitroot $pkgbase
- fi
-
- msg "GIT checkout done or server timeout"
- msg "Starting make..."
-
- rm -rf "$srcdir/$pkgbase-build"
- git clone "$srcdir/$pkgbase" "$srcdir/$pkgbase-build"
- cd "$srcdir/$pkgbase-build"
-
- #
- # BUILD HERE
- #
-
+ cd "${pkgname}"
make
}
package() {
- cd "$srcdir/$pkgbase-build"
- mkdir -p ${pkgdir}/usr/bin
- cp g13d ${pkgdir}/usr/bin
+ cd "${pkgname}"
+ install -d -m755 "${pkgdir}/usr/bin"
+ install -D -m755 g13d "${pkgdir}/usr/bin"
+ install -D -m755 pbm2lpbm "${pkgdir}/usr/bin"
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgname}"
+ install -D -m644 README.md g13.png g13.svg "${pkgdir}/usr/share/doc/${pkgname}"
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgname}/examples"
+ install -D -m644 91-g13.rules clock.sh *.lpbm *.bind "${pkgdir}/usr/share/doc/${pkgname}/examples"
}