185 lines
4.0 KiB
Bash
185 lines
4.0 KiB
Bash
name='qmk-cli'
|
|
version='1.1.8'
|
|
release='3'
|
|
desc='CLI tool for customizing supported mechanical keyboards'
|
|
desc_ru='Утилита командной строки для настройки механических клавиатур'
|
|
homepage='https://github.com/qmk/qmk_cli'
|
|
maintainer='Evgeny Khramov <xpamych@yandex.ru>'
|
|
maintainer_ru='Евгений Храмов <xpamych@yandex.ru>'
|
|
architectures=('amd64')
|
|
license=('MIT')
|
|
provides=('qmk')
|
|
conflicts=('qmk' 'qmk-git')
|
|
|
|
deps=(
|
|
'arm-none-eabi-binutils-cs'
|
|
'arm-none-eabi-gcc-cs'
|
|
'arm-none-eabi-newlib'
|
|
'avr-binutils'
|
|
'avr-gcc'
|
|
'avr-libc'
|
|
'avrdude'
|
|
'clang'
|
|
'dfu-programmer'
|
|
'dfu-util'
|
|
'diffutils'
|
|
'flake8'
|
|
'gcc'
|
|
'git'
|
|
'libusb'
|
|
'python3-dotty-dict'
|
|
'python3-hidapi'
|
|
'python3-hjson'
|
|
'python3-jsonschema'
|
|
'python3-milc'
|
|
'python3-pyusb'
|
|
'unzip'
|
|
'wget'
|
|
'zip'
|
|
)
|
|
deps_alt=(
|
|
'arm-none-eabi-binutils'
|
|
'arm-none-eabi-gcc'
|
|
'arm-none-eabi-newlib'
|
|
'avr-binutils'
|
|
'avr-gcc'
|
|
'avr-libc'
|
|
'avrdude'
|
|
'clang'
|
|
'dfu-programmer'
|
|
'dfu-util'
|
|
'diffutils'
|
|
'python3-module-flake8'
|
|
'gcc'
|
|
'git'
|
|
'libusb'
|
|
'python3-module-dotty-dict'
|
|
'python3-module-hidapi'
|
|
'python3-module-hjson'
|
|
'python3-module-jsonschema'
|
|
'python3-module-milc'
|
|
'python3-module-pyusb'
|
|
'unzip'
|
|
'wget'
|
|
'zip'
|
|
)
|
|
deps_arch=(
|
|
'arm-none-eabi-binutils'
|
|
'arm-none-eabi-gcc'
|
|
'arm-none-eabi-newlib'
|
|
'avr-binutils'
|
|
'avr-gcc'
|
|
'avr-libc'
|
|
'avrdude'
|
|
'clang'
|
|
'dfu-programmer'
|
|
'dfu-util'
|
|
'diffutils'
|
|
'python-flake8'
|
|
'gcc'
|
|
'git'
|
|
'libusb'
|
|
'python-dotty-dict'
|
|
'python-hidapi'
|
|
'python-hjson'
|
|
'python-jsonschema'
|
|
'python-milc'
|
|
'python-pyusb'
|
|
'unzip'
|
|
'wget'
|
|
'zip'
|
|
)
|
|
deps_debian=(
|
|
'gcc-arm-none-eabi'
|
|
'binutils-arm-none-eabi'
|
|
'libnewlib-arm-none-eabi'
|
|
'avr-libc'
|
|
'gcc-avr'
|
|
'binutils-avr'
|
|
'avrdude'
|
|
'clang'
|
|
'dfu-programmer'
|
|
'dfu-util'
|
|
'diffutils'
|
|
'flake8'
|
|
'gcc'
|
|
'git'
|
|
'libusb-1.0-0'
|
|
'python3-dotty-dict'
|
|
'python3-hidapi'
|
|
'python3-hjson'
|
|
'python3-jsonschema'
|
|
'python3-milc'
|
|
'python3-usb'
|
|
'unzip'
|
|
'wget'
|
|
'zip'
|
|
)
|
|
deps_fedora=("${deps[@]}")
|
|
deps_redos=("${deps_fedora[@]}")
|
|
deps_rhel=("${deps_fedora[@]}")
|
|
deps_rosa=("${deps_fedora[@]}")
|
|
deps_alpine=(
|
|
'arm-none-eabi-binutils'
|
|
'arm-none-eabi-gcc'
|
|
'arm-none-eabi-newlib'
|
|
'avr-binutils'
|
|
'avr-gcc'
|
|
'avr-libc'
|
|
'avrdude'
|
|
'clang'
|
|
'dfu-programmer'
|
|
'dfu-util'
|
|
'diffutils'
|
|
'py3-flake8'
|
|
'gcc'
|
|
'git'
|
|
'libusb'
|
|
'py3-dotty-dict'
|
|
'py3-hidapi'
|
|
'py3-hjson'
|
|
'py3-jsonschema'
|
|
'py3-milc'
|
|
'py3-pyusb'
|
|
'unzip'
|
|
'wget'
|
|
'zip'
|
|
)
|
|
build_deps=('python3' 'python3-build' 'python3-pip')
|
|
|
|
build_deps_alt=('python3' 'python3-module-build' 'python3-module-pip')
|
|
build_deps_arch=('python' 'python-build' 'python-pip')
|
|
build_deps_debian=('python3' 'python3-build' 'python3-pip')
|
|
build_deps_fedora=("${build_deps[@]}")
|
|
build_deps_redos=("${build_deps_fedora[@]}")
|
|
build_deps_rhel=("${build_deps_fedora[@]}")
|
|
build_deps_rosa=("${build_deps_fedora[@]}")
|
|
build_deps_alpine=('python3' 'py3-build' 'py3-pip')
|
|
|
|
sources=("git+https://github.com/qmk/qmk_cli.git"
|
|
"https://raw.githubusercontent.com/qmk/qmk_firmware/master/util/udev/50-qmk.rules")
|
|
checksums=('SKIP'
|
|
'SKIP')
|
|
|
|
build() {
|
|
cd "${srcdir}/qmk_cli"
|
|
python -m build --skip-dependency-check --wheel
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/qmk_cli"
|
|
PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps dist/*.whl
|
|
python -O -m compileall "${pkgdir}"
|
|
|
|
install-license ./LICENSE ${name}/LICENSE
|
|
install -d "${pkgdir}/usr/lib/udev/rules.d"
|
|
install -Dm644 "${srcdir}/50-qmk.rules" "${pkgdir}/usr/lib/udev/rules.d/50-qmk.rules"
|
|
}
|
|
|
|
files() {
|
|
files-find-bin
|
|
files-find "./usr/lib/python3.*/site-packages/qmk*"
|
|
echo ./usr/lib/udev/rules.d/50-qmk.rules
|
|
files-find-share-license qmk-cli
|
|
}
|