summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJack Chen2021-01-21 22:44:10 +0800
committerJack Chen2021-01-21 22:46:00 +0800
commit6779f26c285542e86d10656a9eff3445eda4c1bb (patch)
treeaee7dfe6535ad93913d4c432933224ca58a382af /PKGBUILD
downloadaur-6779f26c285542e86d10656a9eff3445eda4c1bb.tar.gz
init commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9418fa392b7c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Jack Chen <redchenjs@live.com>
+
+pkgname=picotool-git
+pkgver=r1.d54bf53
+pkgrel=1
+pkgdesc="Tool for interacting with a RP2040 device in BOOTSEL mode, or with a RP2040 binary"
+arch=('x86_64')
+url="https://github.com/raspberrypi/picotool"
+license=('MIT')
+depends=('gcc-libs' 'libusb')
+makedepends=('git' 'cmake')
+provides=('picotool')
+conflicts=('picotool')
+source=(
+ "git+https://github.com/raspberrypi/picotool"
+ "git+https://github.com/raspberrypi/pico-sdk"
+)
+sha512sums=(
+ 'SKIP'
+ 'SKIP'
+)
+
+pkgver() {
+ cd "$srcdir/picotool"
+
+ ( 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/picotool"
+
+ mkdir -p build && cd build
+ PICO_SDK_PATH="$srcdir/pico-sdk" cmake ..
+ make
+}
+
+package() {
+ cd "$srcdir/picotool"
+
+ install -Dm755 build/picotool "$pkgdir/usr/bin/picotool"
+ install -Dm644 clipp/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}