jobcore/wireless-regdb/PKGBUILD-arch
2024-07-06 09:09:50 +03:00

41 lines
1.9 KiB
Text

# Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgname=wireless-regdb
pkgver=2024.07.04
pkgrel=1
pkgdesc="Central Regulatory Domain Database"
arch=('any')
url="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb"
license=('LicenseRef-custom')
depends=('bash' 'iw')
replaces=('crda')
provides=('crda')
conflicts=('crda')
backup=(etc/conf.d/wireless-regdom)
source=(https://www.kernel.org/pub/software/network/wireless-regdb/${pkgname}-${pkgver}.tar.{xz,sign}
wireless-regdom
set-wireless-regdom
85-regulatory.rules)
b2sums=('ee9c35dd5eb337fa6139db5a7d4c416a0526e8daa378d08ff48f4bb19cae902a393b4c83dc879206a5ff4570aaacbc421aeb5b8ef7683e811926d46916b1623b'
'SKIP'
'4d470f76ba0ac3c9c25425cd2ce5c9cb93292e565ab3038e975aa837abaad83325f1340cef8ca73150a07f8e77cd542a485e35daef8c403d48c93814f1ccacea'
'0d245faf594f9051a9941fd5e1b6c02fd0668cf4241ca8bdaa2b2e56a805d5d013db59191b0899745f842974fe978ad4add1cad21c7f5a71bc58968c5d1c4be2'
'50ff5e8d21db396f57b29677e65970f35433399a2268b22099a48d9dc45817734b544699e1efc6b0e4f4fa95e191e101b25226b4df02f6b7fa75f5036c94d2c0')
validpgpkeys=('B3F2469D78D78BD09D366F37C94035C21B4F2AEB') #Chen-Yu Tsai <wens@kernel.org>
package() {
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
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"
}