48 lines
2.1 KiB
Text
48 lines
2.1 KiB
Text
# Maintainer: Thomas Bächler <thomas@archlinux.org>
|
|
|
|
pkgname=crda
|
|
pkgver=4.14
|
|
pkgrel=4
|
|
pkgdesc="Central Regulatory Domain Agent for wireless networks"
|
|
arch=(x86_64)
|
|
url="https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA"
|
|
license=('custom')
|
|
depends=('wireless-regdb' 'libnl' 'libgcrypt' 'systemd' 'iw')
|
|
makedepends=('python-m2crypto')
|
|
install=crda.install
|
|
source=("https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/crda-$pkgver.tar.gz"
|
|
set-wireless-regdom
|
|
0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
|
|
0001-Makefile-Don-t-run-ldconfig.patch
|
|
crda-4.14-python-3.patch)
|
|
sha256sums=('5a8f35bb8b27474f466b0e75d451ba917433d8aab1889678a64d9c4e72a8b8c2'
|
|
'603ce97da5cce3f5337e99007ce04e2f295bb33a36b308794884011f7bcabaf3'
|
|
'96b2068b27202f8bc78009869520e396cb3f3ac7a826efef06d0fc41047f2520'
|
|
'ff52990cf9295e5cebcf07ebbf2a96e225d97088573edcc898b29ce33a0fb663'
|
|
'95057c7a1c8f2be8b70785356162b86831ba9f198fc43c411267ca97ddb68ed9')
|
|
validpgpkeys=('E4053F8D0E7C4B9A0A20AB27DC553250F8FE7407') #Luis R. Rodriguez
|
|
prepare() {
|
|
cd "${srcdir}"/${pkgname}-${pkgver}
|
|
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}"/crda-4.14-python-3.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
|
|
}
|