pkg-qca-swiss-army-knife/PKGBUILD
2024-04-30 02:46:48 +08:00

45 lines
1.2 KiB
Bash

# Maintainer: Jami Kettunen <jami.kettunen@protonmail.com>
# Maintainer: BigfootACA <bigfoot@classfun.cn>
pkgname="qca-swiss-army-knife"
pkgdesc="Qualcomm Atheros swiss army knife"
pkgver=r274.e9a0327
pkgrel=2
arch=("aarch64" "armv7" "x86_64")
url="https://github.com/qca/qca-swiss-army-knife"
license=("custom")
groups=("qcom-icnss-wlan")
depends=("libpciaccess")
optdepends=("python" "perl")
makedepends=("git" "make" "gcc")
source=("git+https://gitea.classfun.cn:4443/mirrors/qca-swiss-army-knife.git")
md5sums=('SKIP')
pkgver() {
cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
pushd "$srcdir/$pkgname/tools/edump"
./autogen.sh
./configure --prefix=/usr
make
popd
pushd "$srcdir/$pkgname/tools/halregdump"
make
popd
pushd "$srcdir/$pkgname/tools/initvals"
make
popd
}
package() {
mkdir -pv "$pkgdir/usr/bin"
make -C "$srcdir/$pkgname/tools/edump" DESTDIR="$pkgdir/" install
cp -av "$srcdir/$pkgname/tools/halregdump/hal-reg-dump" "$pkgdir/usr/bin/"
cp -av "$srcdir/$pkgname/tools/initvals/initvals" "$pkgdir/usr/bin/"
cp -av "$srcdir/$pkgname/tools/scripts"/ath*/* "$pkgdir/usr/bin/"
install -Dm644 "$srcdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}