blob: 656ed6b3645cb1e1817bc661dc4ca52b3032db14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Maintainer: Jan Holthuis <holthuis.jan@googlemail.com>
pkgname=libcmmk-git
_pkgname=libcmmk
pkgver=r65.9894101
pkgrel=2
pkgdesc="An unofficial LED control API for Coolermaster Masterkey keyboards"
arch=(i686 x86_64)
url="https://github.com/chmod222/libcmmk"
license=('GPL')
depends=(libusb)
makedepends=(cmake)
install="${pkgname}.install"
source=("git+https://github.com/chmod222/libcmmk.git")
sha256sums=('SKIP')
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)"
)
}
build() {
cd "$srcdir/$_pkgname"
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_BINDIR=bin \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_INCLUDEDIR=include/libcmmk \
..
make
}
package() {
cd "$srcdir/$_pkgname/build"
make DESTDIR="$pkgdir/" install
cd "$srcdir/$_pkgname"
install -d "$pkgdir/usr/share/doc/$_pkgname"
install -Dm755 "contrib/etc/udev/rules.d/20-coolermaster.rules" "$pkgdir/usr/share/doc/$_pkgname"
install -Dm755 "extra/reference/CoolerMaster LED Table.xls" "$pkgdir/usr/share/doc/$_pkgname"
install -Dm755 "PROTOCOL.md" "$pkgdir/usr/share/doc/$_pkgname"
install -Dm755 "README.md" "$pkgdir/usr/share/doc/$_pkgname"
}
# vim: set ts=2 sw=2 et:
|