# Maintainer: Akaash Suresh pkgname=qmk-git pkgver=0.0.31.r0.g120ce55 pkgrel=1 pkgdesc="CLI tool for customizing supported mechanical keyboards." arch=('any') url="https://github.com/qmk/qmk_cli" license=('MIT') _branch=qmk_cli depends=( 'arm-none-eabi-binutils' 'arm-none-eabi-gcc' 'arm-none-eabi-newlib' 'avrdude' 'avr-binutils' 'avr-libc' 'python-appdirs' 'python-argcomplete' 'python-colorama' 'flake8' 'avr-gcc' 'clang' 'dfu-programmer' 'dfu-util' 'diffutils' 'gcc' 'git' 'libusb-compat' 'unzip' 'wget' 'zip' ) makedepends=('python-setuptools' 'python' 'python-pip') source=('git+https://github.com/qmk/qmk_cli.git') sha256sums=('SKIP') pkgver() { cd "$_branch" echo $(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g') } build() { pip install --no-deps --target="deps" yapf hjson cd "$_branch" python setup.py build } package() { sitepackages=$(python -c "import site; print(site.getsitepackages()[0])") cd "$_branch" python setup.py install --root="$pkgdir/" --optimize=1 --skip-build cp -r $srcdir/deps/* $pkgdir/"$sitepackages" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }