44 lines
2.3 KiB
Text
44 lines
2.3 KiB
Text
|
# Maintainer: Thomas Bächler <thomas@archlinux.org>
|
||
|
|
||
|
pkgname=wireless-regdb
|
||
|
pkgver=2022.02.18
|
||
|
pkgrel=1
|
||
|
pkgdesc="Central Regulatory Domain Database"
|
||
|
arch=('any')
|
||
|
url="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb"
|
||
|
backup=(etc/conf.d/wireless-regdom)
|
||
|
license=('custom')
|
||
|
depends=('sh')
|
||
|
makedepends=('crda')
|
||
|
source=(https://www.kernel.org/pub/software/network/wireless-regdb/${pkgname}-${pkgver}.tar.{xz,sign}
|
||
|
crda.conf.d)
|
||
|
sha256sums=('8828c25a4ee25020044004f57374bb9deac852809fad70f8d3d01770bf9ac97f'
|
||
|
'SKIP'
|
||
|
'192428fd959806705356107bffc97b8b379854e79bd013c4ee140e5202326e2b')
|
||
|
validpgpkeys=('2ABCA7498D83E1D32D51D3B5AB4800A62DB9F73A') #Seth Forshee <seth.forshee@canonical.com>
|
||
|
|
||
|
package() {
|
||
|
# Install and verify regulatory.bin file
|
||
|
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/regulatory.bin "${pkgdir}"/usr/lib/crda/regulatory.bin
|
||
|
# This creates a depend/makedepend loop:
|
||
|
# crda depends on wireless-regdb (but strictly doesn't makedepend on it)
|
||
|
# wireless-regdb makedepends on crda
|
||
|
if ! /usr/bin/regdbdump "${pkgdir}"/usr/lib/crda/regulatory.bin > /dev/null; then
|
||
|
return 1
|
||
|
fi
|
||
|
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/sforshee.key.pub.pem "${pkgdir}"/usr/lib/crda/pubkeys/sforshee.key.pub.pem
|
||
|
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/wireless-regdb/LICENSE
|
||
|
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/regulatory.bin.5 "${pkgdir}"/usr/share/man/man5/regulatory.bin.5
|
||
|
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/regulatory.db "${pkgdir}"/usr/lib/firmware/regulatory.db
|
||
|
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/regulatory.db.p7s "${pkgdir}"/usr/lib/firmware/regulatory.db.p7s
|
||
|
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/regulatory.db.5 "${pkgdir}"/usr/share/man/man5/regulatory.db.5
|
||
|
install -D -m644 "${srcdir}"/crda.conf.d "${pkgdir}"/etc/conf.d/wireless-regdom
|
||
|
for dom in $(grep ^country "${srcdir}"/${pkgname}-${pkgver}/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"
|
||
|
}
|