DragonProbe/host/arch/PKGBUILD

50 lines
1.4 KiB
Bash

# Maintainer haskal <haskal@awoo.systems>
_pkgbase=dragnbus
pkgname=$_pkgbase-git
pkgver=0.0.1
pkgrel=1
pkgdesc="dragnbus host tools"
arch=("any")
url="https://git.lain.faith/sys64738/DapperMime-JTAG"
license=("GPL")
provides=("$_pkgbase")
conflicts=("$_pkgbase")
depends=("udev" "python" "python-pyserial")
makedepends=("raspberry-pico-sdk" "ninja")
optdepends=("picotool: for flashing the firmware on the CLI")
source=("repo::git+file://$PWD/../../")
sha256sums=(SKIP)
prepare() {
cd repo
git submodule init
git submodule update CMSIS_5
}
build() {
cd repo
export CFLAGS= CPPFLAGS= CXXFLAGS=
./scripts/configure_dev.sh
cd cmake-build
ninja
cd ../host
python -m compileall dbctl.py
python -m compileall -o 2 dbctl.py
}
package() {
cd repo
install -dm755 "$pkgdir/usr/share/licenses/dragnbus/"
install -dm755 "$pkgdir/usr/bin/"
ln -s /usr/share/licenses/common/GPL3/license.txt \
"$pkgdir/usr/share/licenses/dragnbus/license.txt"
install -Dm755 host/dbctl.py "$pkgdir/usr/lib/dragnbus/dbctl.py"
install -Dm644 -t "$pkgdir/usr/lib/dragnbus/__pycache__/" host/__pycache__/*
ln -s "/usr/lib/dragnbus/dbctl.py" "$pkgdir/usr/bin/dbctl"
install -Dm644 host/10-dragnbus.rules "$pkgdir/usr/lib/udev/rules.d/10-dragnbus.rules"
install -Dm644 cmake-build/repo.uf2 "$pkgdir/usr/share/dragnbus/dragnbus.uf2"
}