pkg-xrock/PKGBUILD
BigfootACA b1d857c283
Some checks failed
gitea/pkg-xrock/pipeline/head There was a failure building this commit
Initial commit
2024-03-13 09:54:23 +08:00

39 lines
1.0 KiB
Bash

# Maintainer: taotieren <admin@taotieren.com>
# Maintainer: BigfootACA <bigfoot@classfun.cn>
pkgname=xrock
pkgver=1.0.4.r5.gbb62b28
pkgrel=11
epoch=
pkgdesc="The low level tools for rockchip SOC with maskrom and loader mode support."
arch=(x86_64 aarch64 armv7 riscv64)
url="https://github.com/xboot/xrock"
license=('MIT')
depends=('libusb')
makedepends=('git' 'gcc')
optdepends=()
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
pkgver(){
cd "${srcdir}/${pkgname%-git}"
git describe --long --tags | sed 's/^v//g' | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare(){
git -C "${srcdir}/${pkgname%-git}" clean -dfx
}
build(){
cd "${srcdir}/${pkgname%-git}"
make
}
package(){
install -Dm0755 "${srcdir}/${pkgname%-git}/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}"
install -Dm0644 "${srcdir}/${pkgname%-git}/99-xrock.rules" "${pkgdir}/etc/udev/rules.d/99-xrock.rules"
install -Dm0644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}