[arch-commits] Commit in crda/repos (8 files)

Thomas Bächler thomas at archlinux.org
Sun Oct 30 19:13:54 EDT 2011


    Date: Sunday, October 30, 2011 @ 19:13:54
  Author: thomas
Revision: 141491

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  crda/repos/testing-i686/
  crda/repos/testing-i686/PKGBUILD
    (from rev 141490, crda/trunk/PKGBUILD)
  crda/repos/testing-i686/crda.install
    (from rev 141490, crda/trunk/crda.install)
  crda/repos/testing-i686/crda.rc
    (from rev 141490, crda/trunk/crda.rc)
  crda/repos/testing-x86_64/
  crda/repos/testing-x86_64/PKGBUILD
    (from rev 141490, crda/trunk/PKGBUILD)
  crda/repos/testing-x86_64/crda.install
    (from rev 141490, crda/trunk/crda.install)
  crda/repos/testing-x86_64/crda.rc
    (from rev 141490, crda/trunk/crda.rc)

-----------------------------+
 testing-i686/PKGBUILD       |   39 +++++++++++++++++++++++++++++++++++++++
 testing-i686/crda.install   |   18 ++++++++++++++++++
 testing-i686/crda.rc        |   26 ++++++++++++++++++++++++++
 testing-x86_64/PKGBUILD     |   39 +++++++++++++++++++++++++++++++++++++++
 testing-x86_64/crda.install |   18 ++++++++++++++++++
 testing-x86_64/crda.rc      |   26 ++++++++++++++++++++++++++
 6 files changed, 166 insertions(+)

Copied: crda/repos/testing-i686/PKGBUILD (from rev 141490, crda/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2011-10-30 23:13:54 UTC (rev 141491)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=crda
+pkgver=1.1.2
+pkgrel=1
+pkgdesc="Central Regulatory Domain Agent for wireless networks"
+arch=(i686 x86_64)
+url="http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+license=('custom')
+depends=('wireless-regdb' 'libnl' 'libgcrypt' 'udev' 'iw')
+makedepends=('python-m2crypto')
+install=crda.install
+source=(http://wireless.kernel.org/download/crda/${pkgname}-${pkgver}.tar.bz2
+        crda.rc)
+md5sums=('5226f65aebacf94baaf820f8b4e06df4'
+         '014eef3f8655e9a130064ec6891317fc')
+                  
+build() {
+  msg "Compiling crda ..."
+  cd "${srcdir}"/${pkgname}-${pkgver}
+  sed 's|^#!/usr/bin/env python|#!/usr/bin/python2|' -i utils/key2pub.py
+  make crda regdbdump
+}
+
+package() {
+  # Install crda, regdbdump and udev rules
+  msg "Installing crda ..."
+  cd "${srcdir}"/${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  # 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}"/lib/udev/rules.d/85-regulatory.rules
+
+  msg "Installing license ..."
+  install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/crda/LICENSE
+  
+  msg "Installing boot script ..."
+  install -D -m755 "${srcdir}"/crda.rc "${pkgdir}"/etc/rc.d/wireless-regdom
+}

Copied: crda/repos/testing-i686/crda.install (from rev 141490, crda/trunk/crda.install)
===================================================================
--- testing-i686/crda.install	                        (rev 0)
+++ testing-i686/crda.install	2011-10-30 23:13:54 UTC (rev 141491)
@@ -0,0 +1,18 @@
+## 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
+}

Copied: crda/repos/testing-i686/crda.rc (from rev 141490, crda/trunk/crda.rc)
===================================================================
--- testing-i686/crda.rc	                        (rev 0)
+++ testing-i686/crda.rc	2011-10-30 23:13:54 UTC (rev 141491)
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/wireless-regdom
+
+case "$1" in
+  start)
+    if [ -n "${WIRELESS_REGDOM}" ]; then
+        stat_busy "Setting wireless regulatory domain: ${WIRELESS_REGDOM}"
+        if iw reg set ${WIRELESS_REGDOM}; then
+            stat_done
+        else
+            stat_fail
+        fi
+    fi
+    ;;
+  stop)
+    ;;
+  restart)
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 start"  
+esac
+exit 0

Copied: crda/repos/testing-x86_64/PKGBUILD (from rev 141490, crda/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2011-10-30 23:13:54 UTC (rev 141491)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=crda
+pkgver=1.1.2
+pkgrel=1
+pkgdesc="Central Regulatory Domain Agent for wireless networks"
+arch=(i686 x86_64)
+url="http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+license=('custom')
+depends=('wireless-regdb' 'libnl' 'libgcrypt' 'udev' 'iw')
+makedepends=('python-m2crypto')
+install=crda.install
+source=(http://wireless.kernel.org/download/crda/${pkgname}-${pkgver}.tar.bz2
+        crda.rc)
+md5sums=('5226f65aebacf94baaf820f8b4e06df4'
+         '014eef3f8655e9a130064ec6891317fc')
+                  
+build() {
+  msg "Compiling crda ..."
+  cd "${srcdir}"/${pkgname}-${pkgver}
+  sed 's|^#!/usr/bin/env python|#!/usr/bin/python2|' -i utils/key2pub.py
+  make crda regdbdump
+}
+
+package() {
+  # Install crda, regdbdump and udev rules
+  msg "Installing crda ..."
+  cd "${srcdir}"/${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  # 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}"/lib/udev/rules.d/85-regulatory.rules
+
+  msg "Installing license ..."
+  install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/crda/LICENSE
+  
+  msg "Installing boot script ..."
+  install -D -m755 "${srcdir}"/crda.rc "${pkgdir}"/etc/rc.d/wireless-regdom
+}

Copied: crda/repos/testing-x86_64/crda.install (from rev 141490, crda/trunk/crda.install)
===================================================================
--- testing-x86_64/crda.install	                        (rev 0)
+++ testing-x86_64/crda.install	2011-10-30 23:13:54 UTC (rev 141491)
@@ -0,0 +1,18 @@
+## 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
+}

Copied: crda/repos/testing-x86_64/crda.rc (from rev 141490, crda/trunk/crda.rc)
===================================================================
--- testing-x86_64/crda.rc	                        (rev 0)
+++ testing-x86_64/crda.rc	2011-10-30 23:13:54 UTC (rev 141491)
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/wireless-regdom
+
+case "$1" in
+  start)
+    if [ -n "${WIRELESS_REGDOM}" ]; then
+        stat_busy "Setting wireless regulatory domain: ${WIRELESS_REGDOM}"
+        if iw reg set ${WIRELESS_REGDOM}; then
+            stat_done
+        else
+            stat_fail
+        fi
+    fi
+    ;;
+  stop)
+    ;;
+  restart)
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 start"  
+esac
+exit 0



More information about the arch-commits mailing list