[arch-commits] Commit in pcmciautils/trunk (60-pcmcia.rules PKGBUILD)

Tobias Powalowski tpowa at archlinux.org
Wed Sep 24 14:12:31 UTC 2008


    Date: Wednesday, September 24, 2008 @ 10:12:30
  Author: tpowa
Revision: 12899

upgpkg: pcmciautils 015-2

Added:
  pcmciautils/trunk/60-pcmcia.rules
Modified:
  pcmciautils/trunk/PKGBUILD

-----------------+
 60-pcmcia.rules |   30 ++++++++++++++++++++++++++++++
 PKGBUILD        |   18 ++++++++----------
 2 files changed, 38 insertions(+), 10 deletions(-)

Added: 60-pcmcia.rules
===================================================================
--- 60-pcmcia.rules	                        (rev 0)
+++ 60-pcmcia.rules	2008-09-24 14:12:30 UTC (rev 12899)
@@ -0,0 +1,30 @@
+# PCMCIA devices:
+#
+ACTION!="add", GOTO="pcmciautils_end"
+# modprobe $env{MODALIAS} loads all possibly appropriate modules
+SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \
+		RUN+="/lib/udev/load-modules.sh $env{MODALIAS}"
+
+# Very few CIS firmware entries (which we use for matching)
+# are so broken that we need to read out random bytes of it
+# instead of the manufactor, card or product ID. Then the
+# matching is done in userspace.
+SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \
+		RUN+="/sbin/pcmcia-check-broken-cis"
+
+# However, the "weak" matching by func_id is only allowed _after_ modprobe
+# returns, so that "strong" matches have a higher priority.
+SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", ATTR{allow_func_id_match}="1"
+
+# PCMCIA sockets:
+#
+# modprobe the pcmcia bus module so that 16-bit PCMCIA devices work
+SUBSYSTEM=="pcmcia_socket", \
+		RUN+="/lib/udev/load-modules.sh pcmcia"
+
+# if this is a PCMCIA socket which needs a resource database,
+# pcmcia-socket-startup sets it up
+SUBSYSTEM=="pcmcia_socket", \
+		RUN+="/sbin/pcmcia-socket-startup"
+
+LABEL="pcmciautils_end"

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-09-24 11:36:07 UTC (rev 12898)
+++ PKGBUILD	2008-09-24 14:12:30 UTC (rev 12899)
@@ -2,7 +2,7 @@
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 pkgname=pcmciautils
 pkgver=015
-pkgrel=1
+pkgrel=2
 pkgdesc="Utilities for inserting and removing PCMCIA cards"
 arch=(i686 x86_64)
 url="http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html"
@@ -10,25 +10,23 @@
 groups=('base')
 depends=('glibc' 'sysfsutils' 'module-init-tools>=3.2pre9')
 conflicts=('pcmcia-cs')
-source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmciautils-$pkgver.tar.bz2)
+source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmciautils-$pkgver.tar.bz2 
+	60-pcmcia.rules)
+options=(!makeflags)
 
 build() {
   cd $startdir/src/$pkgname-$pkgver
   sed -i -e 's,/usr/bin/install,/bin/install,g' Makefile
-  make -j1 || return 1
+  make || return 1
   make DESTDIR=$startdir/pkg/ install
-  # fix udev rules for new modalias layout
-  sed -i -e 's/MODALIAS/ENV{MODALIAS}/g' -e 's/$modalias/$env{MODALIAS}/g'\
-  $startdir/pkg/etc/udev/rules.d/60-pcmcia.rules
   # fix lspcmcia symlink
   ln -sf pccardctl $startdir/pkg/sbin/lspcmcia
   # adding static binaries for initrd setup
   make clean
   sed -i -e 's/STATIC\ =\ false/STATIC\ =\ true/g' Makefile
-  make -j1 || return 1
+  make || return 1
   install -D -m755 pcmcia-check-broken-cis $startdir/pkg/sbin/pcmcia-check-broken-cis.static
   install -D -m755 pcmcia-socket-startup $startdir/pkg/sbin/pcmcia-socket-startup.static
-  # fix modprobe rules to use the load-modules.sh
-  sed -i -e "s#/sbin/modprobe#/lib/udev/load-modules.sh#g" $startdir/pkg/etc/udev/rules.d/*
+  # add fixed rules file
+  install -D -m644 $startdir/src/60-pcmcia.rules $startdir/pkg/etc/udev/rules.d/
 }
-md5sums=('9e12435c8b6cf7bf59894e90e480b4aa')




More information about the arch-commits mailing list