From f61d34210632b6304d2beb11e850b0ad30386174 Mon Sep 17 00:00:00 2001 From: Michael Hanson Date: Tue, 30 Nov 2010 23:33:30 +0000 Subject: pcmciautils: update --- abs/core/pcmciautils/60-pcmcia.rules | 30 ++++++++++++++++++++++++++ abs/core/pcmciautils/PKGBUILD | 41 +++++++++++++++++------------------- 2 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 abs/core/pcmciautils/60-pcmcia.rules diff --git a/abs/core/pcmciautils/60-pcmcia.rules b/abs/core/pcmciautils/60-pcmcia.rules new file mode 100644 index 0000000..aa3c1a2 --- /dev/null +++ b/abs/core/pcmciautils/60-pcmcia.rules @@ -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+="/lib/udev/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+="/lib/udev/pcmcia-socket-startup" + +LABEL="pcmciautils_end" diff --git a/abs/core/pcmciautils/PKGBUILD b/abs/core/pcmciautils/PKGBUILD index dbbb092..40a4a6b 100644 --- a/abs/core/pcmciautils/PKGBUILD +++ b/abs/core/pcmciautils/PKGBUILD @@ -1,34 +1,31 @@ -# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $ -# Maintainer: judd +# $Id: PKGBUILD 82630 2010-06-15 04:26:01Z allan $ +# Maintainer: Tobias Powalowski pkgname=pcmciautils -pkgver=014 -pkgrel=13 +pkgver=017 +pkgrel=1 pkgdesc="Utilities for inserting and removing PCMCIA cards" -arch=(i686 x86_64) +arch=('i686' 'x86_64') url="http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html" license=('GPL') 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) -md5sums=('3f07c926875f6c5dcb83240f39725177') +source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmciautils-$pkgver.tar.bz2 + 60-pcmcia.rules) +options=(!makeflags) +md5sums=('5245af28eeba57ec0606a874d44d10f7' + 'f88ac464ab9c75fe1565af551e6553a2') build() { - cd $startdir/src/$pkgname-$pkgver + cd $srcdir/$pkgname-$pkgver sed -i -e 's,/usr/bin/install,/bin/install,g' Makefile - make -j1 || 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 + make || return 1 +} +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install || return 1 # 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 - 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/* + ln -sf pccardctl $pkgdir/sbin/lspcmcia + # add fixed rules file + install -D -m644 $srcdir/60-pcmcia.rules $pkgdir/lib/udev/rules.d/ } -- cgit v0.12