DragonProbe/host/arch/PKGBUILD

50 lines
1.4 KiB
Bash
Raw Normal View History

2021-06-28 21:08:00 +00:00
# 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")
2021-06-30 06:14:22 +00:00
provides=("$_pkgbase")
conflicts=("$_pkgbase")
2021-06-28 21:08:00 +00:00
depends=("udev" "python" "python-pyserial")
2021-06-30 06:14:22 +00:00
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
}
2021-06-28 21:08:00 +00:00
build() {
2021-06-30 06:14:22 +00:00
cd repo
export CFLAGS= CPPFLAGS= CXXFLAGS=
./scripts/configure_dev.sh
cd cmake-build
ninja
cd ../host
2021-06-28 21:08:00 +00:00
python -m compileall dbctl.py
python -m compileall -o 2 dbctl.py
}
package() {
2021-06-30 06:14:22 +00:00
cd repo
2021-06-28 21:08:00 +00:00
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"
2021-06-30 06:14:22 +00:00
install -Dm755 host/dbctl.py "$pkgdir/usr/lib/dragnbus/dbctl.py"
install -Dm644 -t "$pkgdir/usr/lib/dragnbus/__pycache__/" host/__pycache__/*
2021-06-28 21:08:00 +00:00
ln -s "/usr/lib/dragnbus/dbctl.py" "$pkgdir/usr/bin/dbctl"
2021-06-30 06:14:22 +00:00
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"
2021-06-28 21:08:00 +00:00
}