archrelease: copy trunk to extra-x86_64
[arch-packages.git] / wireless-regdb / trunk / PKGBUILD
blobb05efa0987f852fea280e0c5eaefe262750ffa40
1 # Maintainer: Thomas Bächler <thomas@archlinux.org>
3 pkgname=wireless-regdb
4 pkgver=2023.05.03
5 pkgrel=1
6 pkgdesc="Central Regulatory Domain Database"
7 arch=('any')
8 url="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb"
9 license=('custom')
10 depends=('bash' 'iw')
11 replaces=('crda')
12 provides=('crda')
13 conflicts=('crda')
14 backup=(etc/conf.d/wireless-regdom)
15 source=(https://www.kernel.org/pub/software/network/wireless-regdb/${pkgname}-${pkgver}.tar.{xz,sign}
16         wireless-regdom
17         set-wireless-regdom
18         85-regulatory.rules)
19 sha256sums=('f254d08ab3765aeae2b856222e11a95d44aef519a6663877c71ef68fae4c8c12'
20             'SKIP'
21             '192428fd959806705356107bffc97b8b379854e79bd013c4ee140e5202326e2b'
22             '603ce97da5cce3f5337e99007ce04e2f295bb33a36b308794884011f7bcabaf3'
23             'f5055dfe7584757a11b419836320bcdcd1d3d1e5caf26e20c63a0c64779f3376')
24 validpgpkeys=('2ABCA7498D83E1D32D51D3B5AB4800A62DB9F73A') #Seth Forshee <seth.forshee@canonical.com>
26 package() {
27   install -Dm644 wireless-regdom -t "${pkgdir}"/etc/conf.d
28   install -Dm644 85-regulatory.rules -t "${pkgdir}"/usr/lib/udev/rules.d
29   install -Dm755 set-wireless-regdom -t "${pkgdir}"/usr/bin
31   cd ${pkgname}-${pkgver}
32   make install DESTDIR="${pkgdir}" MANDIR=usr/share/man FIRMWARE_PATH=usr/lib/firmware
34   for dom in $(grep ^country db.txt | cut -d' ' -f2 | sed 's|:||g'); do
35     echo "#WIRELESS_REGDOM=\"${dom}\"" >> "${pkgdir}"/etc/conf.d/wireless-regdom.tmp
36   done
37   sort -u "${pkgdir}"/etc/conf.d/wireless-regdom.tmp >> "${pkgdir}"/etc/conf.d/wireless-regdom
38   rm "${pkgdir}"/etc/conf.d/wireless-regdom.tmp
40   install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"