jobcore/wireless-regdb/PKGBUILD-arch

42 lines
1.7 KiB
Text
Raw Normal View History

2022-03-20 13:19:37 +01:00
# Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgname=wireless-regdb
pkgver=2024.01.23
pkgrel=1
2022-03-20 13:19:37 +01:00
pkgdesc="Central Regulatory Domain Database"
arch=('any')
url="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb"
license=('LicenseRef-custom')
2022-04-01 01:05:56 +02:00
depends=('bash' 'iw')
replaces=('crda')
provides=('crda')
conflicts=('crda')
2022-04-01 01:05:56 +02:00
backup=(etc/conf.d/wireless-regdom)
2022-03-20 13:19:37 +01:00
source=(https://www.kernel.org/pub/software/network/wireless-regdb/${pkgname}-${pkgver}.tar.{xz,sign}
2022-04-01 01:05:56 +02:00
wireless-regdom
set-wireless-regdom
85-regulatory.rules)
sha256sums=('c8a61c9acf76fa7eb4239e89f640dee3e87098d9f69b4d3518c9c60fc6d20c55'
2022-03-20 13:19:37 +01:00
'SKIP'
2022-04-01 01:05:56 +02:00
'192428fd959806705356107bffc97b8b379854e79bd013c4ee140e5202326e2b'
'603ce97da5cce3f5337e99007ce04e2f295bb33a36b308794884011f7bcabaf3'
'f5055dfe7584757a11b419836320bcdcd1d3d1e5caf26e20c63a0c64779f3376')
validpgpkeys=('B3F2469D78D78BD09D366F37C94035C21B4F2AEB') #Chen-Yu Tsai <wens@kernel.org>
2022-03-20 13:19:37 +01:00
package() {
2022-04-01 01:05:56 +02:00
install -Dm644 wireless-regdom -t "${pkgdir}"/etc/conf.d
install -Dm644 85-regulatory.rules -t "${pkgdir}"/usr/lib/udev/rules.d
install -Dm755 set-wireless-regdom -t "${pkgdir}"/usr/bin
cd ${pkgname}-${pkgver}
make install DESTDIR="${pkgdir}" MANDIR=usr/share/man FIRMWARE_PATH=usr/lib/firmware
for dom in $(grep ^country db.txt | cut -d' ' -f2 | sed 's|:||g'); do
2022-03-20 13:19:37 +01:00
echo "#WIRELESS_REGDOM=\"${dom}\"" >> "${pkgdir}"/etc/conf.d/wireless-regdom.tmp
done
sort -u "${pkgdir}"/etc/conf.d/wireless-regdom.tmp >> "${pkgdir}"/etc/conf.d/wireless-regdom
rm "${pkgdir}"/etc/conf.d/wireless-regdom.tmp
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}