Advertisement
khampf

g13-git-20160120-1/PKBUILD

Feb 7th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.14 KB | None | 0 0
  1. # Maintainer: Lukas Sabota <lukas@lwsabota.com>
  2. # Contributor: K. Hampf <khampf@users.sourceforge.net>
  3.  
  4. pkgname="g13-git"
  5. pkgver=20160120
  6. pkgrel=1
  7. pkgdesc="Userspace driver for the Logitech G13 Keyboard"
  8. arch=('x86_64' 'i686')
  9. url="https://github.com/ecraven/g13"
  10. license=('unknown')
  11. depends=('boost-libs')
  12. makedepends=('git' 'boost')
  13. source=("${pkgname}::git://github.com/ecraven/g13")
  14. sha256sums=('SKIP')
  15.  
  16. pkgver() {
  17.   cd "${pkgname}"
  18.   local desc=$(git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
  19.   if [ -z "$desc" ]; then
  20.     # date of last commit as YYYYMMDD
  21.     git log -1 --date=format:%Y%m%d --format=%cd
  22.   fi
  23. }
  24.  
  25. build() {
  26.   cd "${pkgname}"
  27.   make
  28. }
  29.  
  30. package() {
  31.   cd "${pkgname}"
  32.   install -d -m755 "${pkgdir}/usr/bin"
  33.   install -D -m755 g13d "${pkgdir}/usr/bin"
  34.   install -D -m755 pbm2lpbm "${pkgdir}/usr/bin"
  35.   install -d -m755 "${pkgdir}/usr/share/doc/${pkgname}"
  36.   install -D -m644 README.md g13.png g13.svg "${pkgdir}/usr/share/doc/${pkgname}"
  37.   install -d -m755 "${pkgdir}/usr/share/doc/${pkgname}/examples"
  38.   install -D -m644 91-g13.rules clock.sh *.lpbm *.bind "${pkgdir}/usr/share/doc/${pkgname}/examples"
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement