You are not logged in.
Looking for feedback for my PKGBUILD for https://github.com/dlbeer/mspdebug. There's a package in the AUR already for it, but it's for the releases and not the latest commit, which is more updated and fixed an issue for me.
pkgname='mspdebug-git'
pkgrel=1
pkgver=r827.a1a06e7
pkgdesc="Free debugger for MSP430 MCUs"
arch=('x86_64')
url="https://github.com/dlbeer/mspdebug"
license=('GPL')
depends=('libusb' 'readline')
conflicts=('mspdebug')
source=("$pkgname-$pkgver::git+https://github.com/dlbeer/mspdebug.git")
pkgver() {
cd "$pkgname-$pkgver"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build(){
cd "$pkgname-$pkgver"
make
}
package(){
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" PREFIX="/usr" install
}
sha256sums=('SKIP')
Offline
Missing makdepends on git. Fails to build in a clean chroot using libusb, replacing with libusb-compat it does build.
Formatting minor gripe by convention the checksums go just after the source entry.
Offline
The repo has tags, the pkgver should use them.
Missing provides array.
You really, REALLY should not be renaming the source dir like that. It will keep cloning the upstream repo over and over instead of updating it, and I don't even know how it will handle it when the pkgver changes on a single run.
Offline
I don't even know how it will handle it when the pkgver changes on a single run.
==> Starting pkgver()...
==> Updated version: mspdebug-git r827.a1a06e7-1
==> Starting build()...
/startdir/PKGBUILD: line 18: cd: mspdebug-git-r827.a1a06e7: No such file or directory
Offline
The repo has tags, the pkgver should use them.
The last tag is from 2017 though, and there have been a lot of commits since then. Should I still use that tag?
Offline
I re-read the PKGBUILD guidelines for VCS and I think I understand what you mean now. Here's an updated PKGBUILD:
# Maintainer: Supreme <criteria32 at gmail dot com>
pkgname='mspdebug-git'
pkgrel=1
pkgver=v0.25.r76.ga1a06e7
pkgdesc="Free debugger for MSP430 MCUs"
arch=('x86_64')
url="https://github.com/dlbeer/mspdebug"
license=('GPL')
depends=('libusb-compat' 'readline')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/dlbeer/mspdebug.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-git}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build(){
cd "$srcdir/${pkgname%-git}"
make
}
package(){
cd "$srcdir/${pkgname%-git}"
make DESTDIR="$pkgdir" PREFIX="/usr" install
}
Last edited by Supreme (2021-11-24 20:39:43)
Offline
==> ERROR: conflicts contains invalid characters: '${%}'
==> ERROR: provides contains invalid characters: '${%}'
String substitution needs double quotes.
Offline
Yeah just caught that lol
Offline