diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /core/pcmciautils |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'core/pcmciautils')
-rw-r--r-- | core/pcmciautils/60-pcmcia.rules | 30 | ||||
-rw-r--r-- | core/pcmciautils/PKGBUILD | 32 |
2 files changed, 62 insertions, 0 deletions
diff --git a/core/pcmciautils/60-pcmcia.rules b/core/pcmciautils/60-pcmcia.rules new file mode 100644 index 000000000..aa3c1a2d3 --- /dev/null +++ b/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/core/pcmciautils/PKGBUILD b/core/pcmciautils/PKGBUILD new file mode 100644 index 000000000..8744b8392 --- /dev/null +++ b/core/pcmciautils/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 113400 2011-03-08 14:24:47Z stephane $ +# Maintainer: Tobias Powalowski <tpowa@archlinux.org> +pkgname=pcmciautils +pkgver=017 +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" +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 + 60-pcmcia.rules) +options=(!makeflags) +md5sums=('5245af28eeba57ec0606a874d44d10f7' + 'f88ac464ab9c75fe1565af551e6553a2') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + sed -i -e 's,/usr/bin/install,/bin/install,g' Makefile + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + # fix lspcmcia symlink + ln -sf pccardctl "${pkgdir}"/sbin/lspcmcia + # add fixed rules file + install -D -m644 "${srcdir}"/60-pcmcia.rules "${pkgdir}"/lib/udev/rules.d/ +} |