summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Chen2021-01-21 22:44:10 +0800
committerJack Chen2021-01-21 22:46:00 +0800
commit6779f26c285542e86d10656a9eff3445eda4c1bb (patch)
treeaee7dfe6535ad93913d4c432933224ca58a382af
downloadaur-6779f26c285542e86d10656a9eff3445eda4c1bb.tar.gz
init commit
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD45
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1b714032fa09
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = picotool-git
+ pkgdesc = Tool for interacting with a RP2040 device in BOOTSEL mode, or with a RP2040 binary
+ pkgver = r1.d54bf53
+ pkgrel = 1
+ url = https://github.com/raspberrypi/picotool
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cmake
+ depends = gcc-libs
+ depends = libusb
+ provides = picotool
+ conflicts = picotool
+ source = git+https://github.com/raspberrypi/picotool
+ source = git+https://github.com/raspberrypi/pico-sdk
+ sha512sums = SKIP
+ sha512sums = SKIP
+
+pkgname = picotool-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..62514e8a2fb9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*
+.*
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"
+}