diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/crda/PKGBUILD | 19 | ||||
-rw-r--r-- | core/crda/crda.install | 15 | ||||
-rwxr-xr-x | core/crda/set-wireless-regdom | 5 |
3 files changed, 17 insertions, 22 deletions
diff --git a/core/crda/PKGBUILD b/core/crda/PKGBUILD index c22889fbf..4c26eb1a2 100644 --- a/core/crda/PKGBUILD +++ b/core/crda/PKGBUILD @@ -1,20 +1,21 @@ -# $Id: PKGBUILD 158615 2012-05-05 03:17:06Z allan $ +# $Id: PKGBUILD 165664 2012-08-28 11:02:19Z thomas $ # Maintainer: Thomas Bächler <thomas@archlinux.org> pkgname=crda pkgver=1.1.2 -pkgrel=3 +pkgrel=4 pkgdesc="Central Regulatory Domain Agent for wireless networks" arch=(i686 x86_64 'mips64el') url="http://wireless.kernel.org/en/developers/Regulatory/CRDA" license=('custom') -depends=('wireless-regdb' 'libnl' 'libgcrypt' 'udev' 'iw') +depends=('wireless-regdb' 'libnl' 'libgcrypt' 'systemd-tools' 'iw') makedepends=('python-m2crypto') install=crda.install source=(http://wireless.kernel.org/download/crda/${pkgname}-${pkgver}.tar.bz2 - crda.rc libnl32.patch) + set-wireless-regdom + libnl32.patch) md5sums=('5226f65aebacf94baaf820f8b4e06df4' - '014eef3f8655e9a130064ec6891317fc' + '65c93f2ff2eb1b29d9e9fa102ae2dd45' 'c1f7aff29f15a0364ae6f7905a1d4ae6') build() { @@ -27,11 +28,13 @@ build() { package() { # Install crda, regdbdump and udev rules cd "${srcdir}"/${pkgname}-${pkgver} - make DESTDIR="${pkgdir}" UDEV_RULE_DIR=/usr/lib/udev/rules.d/ install + 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+="/etc/rc.d/wireless-regdom start >/dev/null"' >> "${pkgdir}"/usr/lib/udev/rules.d/85-regulatory.rules + 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}"/crda.rc "${pkgdir}"/etc/rc.d/wireless-regdom + install -D -m755 "${srcdir}"/set-wireless-regdom "${pkgdir}"/usr/bin/set-wireless-regdom } diff --git a/core/crda/crda.install b/core/crda/crda.install index c18e15f71..9618a74ca 100644 --- a/core/crda/crda.install +++ b/core/crda/crda.install @@ -1,18 +1,5 @@ ## arg 1: the new package version post_install() { echo "Uncomment the right regulatory domain in /etc/conf.d/wireless-regdom." - echo "It will automatically be set when necessary." -} - -## arg 1: the new package version -## arg 2: the old package version -post_upgrade() { - # In an upgrade from 1.0.1-1 or older, the wireless-regdom file moves from the crda package - # to the new wireless-regdb package. If the user changed the file, it is save to overwrite the one - # from wireless-regdb by the user-defined one - if [ $(vercmp $2 1.0.1-2) -lt 0 ]; then - if [ -f /etc/conf.d/wireless-regdom.pacorig -a -n "$(grep -v ^# /etc/conf.d/wireless-regdom.pacorig 2>/dev/null | grep -v ^$)" ]; then - mv /etc/conf.d/wireless-regdom.pacorig /etc/conf.d/wireless-regdom - fi - fi + echo "It will automatically be set on boot." } diff --git a/core/crda/set-wireless-regdom b/core/crda/set-wireless-regdom new file mode 100755 index 000000000..3905ae98a --- /dev/null +++ b/core/crda/set-wireless-regdom @@ -0,0 +1,5 @@ +#!/bin/bash + +unset WIRELESS_REGDOM +. /etc/conf.d/wireless-regdom +[ -n "${WIRELESS_REGDOM}" ] && iw reg set ${WIRELESS_REGDOM} |