blob: a64528b9d0b810babc12bdf82aa69c4e4eab8a58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# $Id$
# Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgname=crda
pkgver=3.18
pkgrel=1
pkgdesc="Central Regulatory Domain Agent for wireless networks"
arch=(x86_64)
url="http://wireless.kernel.org/en/developers/Regulatory/CRDA"
license=('custom')
depends=('wireless-regdb' 'libnl' 'libgcrypt' 'systemd' 'iw')
makedepends=('python2-m2crypto')
install=crda.install
source=(https://kernel.org/pub/software/network/crda/${pkgname}-${pkgver}.tar{.xz,.sign}
set-wireless-regdom
0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
0001-Makefile-Don-t-run-ldconfig.patch
keysUnused.patch)
validpgpkeys=('E4053F8D0E7C4B9A0A20AB27DC553250F8FE7407') #Luis R. Rodriguez
prepare() {
cd "${srcdir}"/${pkgname}-${pkgver}
sed 's|^#!/usr/bin/env python|#!/usr/bin/python2|' -i utils/key2pub.py
patch -p1 -i "${srcdir}"/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
patch -p1 -i "${srcdir}"/0001-Makefile-Don-t-run-ldconfig.patch
patch -p1 -i "${srcdir}"/keysUnused.patch
}
build() {
cd "${srcdir}"/${pkgname}-${pkgver}
make
}
package() {
# Install crda, regdbdump and udev rules
cd "${srcdir}"/${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" UDEV_RULE_DIR=/usr/lib/udev/rules.d/ SBINDIR=/usr/bin/ install
# Adjust paths in udev rule file
sed 's|/sbin/crda|/usr/bin/crda|' -i "${pkgdir}"/usr/lib/udev/rules.d/85-regulatory.rules
# This rule automatically sets the regulatory domain when cfg80211 is loaded
echo 'ACTION=="add" SUBSYSTEM=="module", DEVPATH=="/module/cfg80211", RUN+="/usr/bin/set-wireless-regdom"' >> "${pkgdir}"/usr/lib/udev/rules.d/85-regulatory.rules
install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/crda/LICENSE
install -D -m755 "${srcdir}"/set-wireless-regdom "${pkgdir}"/usr/bin/set-wireless-regdom
}
md5sums=('0431fef3067bf503dfb464069f06163a'
'SKIP'
'65c93f2ff2eb1b29d9e9fa102ae2dd45'
'0fac1d7753cc60866709c6d82f8a6fb2'
'63c1829bba4e1d97336bb59cda80f330'
'63434b3e5fa28bb574cc78e169740d1f')
|