%define name pcmcia-cs %define version 3.1.31 %define release 5mdk %define url http://pcmcia-cs.sf.net/ %define ftpurl http://pcmcia-cs.sourceforge.net/ftp Summary: The daemon for using PCMCIA adapters. Name: %{name} Version: %{version} Release: %{release} Source0: %{ftpurl}/%{name}-%{version}.tar.bz2 License: GPL Group: System/Kernel and hardware BuildRequires: kernel-source BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} Obsoletes: kernel-%{name} # Provides needs to give a version number because the kernel # conflicts with <= 2.4.8. # Remove that after 8.2 or following distro is out Provides: kernel-%{name} = 2.4.12 Url: %{url} Source1: pcmcia-cs-2.8.8-network.script Source2: pcmcia-cs-3.1.24-isdn.script Source3: config Patch0: pcmcia-cs-3.1.18-script.patch.bz2 Patch1: pcmcia-cs-3.1.18-config.patch.bz2 Patch4: pcmcia-cs-3.1.23-yenta.patch.bz2 Patch5: pcmcia-cs-3.1.23-updfstab.patch.bz2 Patch6: pcmcia-cs-3.1.24-portrange.patch.bz2 Patch7: pcmcia-cs-3.1.24-wireless.patch.bz2 Patch100: pcmcia-cs-3.1.29-build.patch.bz2 Patch101: pcmcia-cs-3.1.29-cp-force.patch.bz2 Patch103: pcmcia-cs-3.1.29-rc-early.patch.bz2 Patch104: pcmcia-cs-3.1.29-yenta-opts.patch.bz2 Patch105: pcmcia-cs-3.1.31-remove-test-for-matching-revision.patch.bz2 Patch106: pcmcia-cs-3.1.30-modprobe.patch.bz2 Patch107: pcmcia-cs-3.1.31-fixbuild.patch.bz2 Patch108: pcmcia-cs-3.1.31-yenta-socket.patch.bz2 Patch109: pcmcia-cs-3.1.31-serial-fixes.patch.bz2 Patch110: pcmcia-cs-3.1.31-umask.patch.bz2 Patch111: pcmcia-cs-3.1.31-no-function-binding.patch.bz2 Patch112: pcmcia-cs-3.1.31-cirrus6729-uses-oldskool-i82386.patch.bz2 Patch200: pcmcia-cs-3.1.29-ppc.portrange.patch.bz2 Patch300: pcmcia-cs-3.1.31-add-pci-ids-from-install.patch.bz2 Requires(post): /bin/grep, /bin/sed %description Many laptop machines (and some non-laptops) support PCMCIA cards for expansion. Also known as "credit card adapters," PCMCIA cards are small cards for everything from SCSI support to modems. PCMCIA cards are hot swappable (i.e., they can be exchanged without rebooting the system) and quite convenient to use. The pcmcia-cs package contains a card manager daemon that can respond to card insertion and removal events by loading and unloading drivers on demand. The daemon also supports hot swapping, so that the cards can be safely inserted and ejected at any time. %prep %setup -q find . -type f|xargs chmod u+rw %patch0 -p1 -b .script %patch1 -p1 -b .config %patch4 -p1 -b .yenta #%patch5 -p1 -b .fstab %patch6 -p1 -b .portrange %patch7 -p1 -b .wireless %ifarch ppc %patch200 -p1 -b .ppcportrange %endif %patch100 -p1 -b .build %patch101 -p1 -b .cp-force %patch103 -p1 -b .rc-early %patch104 -p1 -b .yenta-opts %patch105 -p1 -b .matching %patch106 -p1 -b .modprobe %patch107 -p1 -b .fixbuild %patch108 -p1 -b .yenta %patch109 -p1 -b .serial-fixes %patch110 -p1 -b .umask %patch111 -p1 -b .no-function %patch300 -p0 %build ./Configure --noprompt \ --kernel=/usr/src/linux \ --cc=gcc \ --kcc=gcc \ --target=%{buildroot} \ --trust \ --cardbus \ --nopnp \ --srctree \ --sysv \ --rcdir=/etc/rc.d make all make debug-tools/lspnp %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_mandir} make MANDIR=$RPM_BUILD_ROOT%{_mandir} PREFIX=$RPM_BUILD_ROOT install install -m755 %{SOURCE1} $RPM_BUILD_ROOT/etc/pcmcia/network install -m755 %{SOURCE2} $RPM_BUILD_ROOT/etc/pcmcia/isdn install -m644 %{SOURCE3} $RPM_BUILD_ROOT/etc/pcmcia/config # We need our own default /etc/sysconfig/pcmcia cat > $RPM_BUILD_ROOT/etc/sysconfig/pcmcia <<EOF PCMCIA=no PCIC= PCIC_OPTS=do_scan=0 CORE_OPTS= CARDMGR_OPTS=-f EOF install -m755 debug-tools/lspnp $RPM_BUILD_ROOT/sbin/lspnp export DONT_GPRINTIFY=1 %post if egrep -q "^pre-install.*pcmcia_core.*/etc/.*init.d/pcmcia.*start$" /etc/modules.conf;then sed 's|pre-install.*pcmcia_core.*/etc/.*init.d/pcmcia.*start$||' /etc/modules.conf > /etc/modules.conf.new mv /etc/modules.conf.new /etc/modules.conf fi %_post_service pcmcia %preun %_preun_service pcmcia %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc doc/PCMCIA-HOWTO doc/PCMCIA-PROG SUPPORTED.CARDS %doc CHANGES COPYING README %attr(755,root,root) /sbin/cardctl %ifnarch ppc /sbin/probe %endif /sbin/cardmgr /sbin/ifport /sbin/ifuser /sbin/lspnp /sbin/scsi_info /sbin/ide_info /sbin/pcinitrd /sbin/ftl_format /sbin/ftl_check /sbin/dump_cis /sbin/pack_cis %{_mandir}/man[45]/* %{_mandir}/man8/* %dir /etc/pcmcia %dir /var/lib/pcmcia %config(noreplace) /etc/pcmcia/cis %config(noreplace) /etc/pcmcia/config %config(noreplace) /etc/pcmcia/config.opts %config(noreplace) /etc/pcmcia/ftl %config(noreplace) /etc/pcmcia/ftl.opts %config(noreplace) /etc/pcmcia/ide %config(noreplace) /etc/pcmcia/ide.opts %config(noreplace) /etc/pcmcia/memory %config(noreplace) /etc/pcmcia/memory.opts %config(noreplace) /etc/pcmcia/network %config(noreplace) /etc/pcmcia/isdn %config(noreplace) /etc/pcmcia/parport %config(noreplace) /etc/pcmcia/parport.opts %config(noreplace) /etc/pcmcia/scsi %config(noreplace) /etc/pcmcia/scsi.opts %config(noreplace) /etc/pcmcia/serial %config(noreplace) /etc/pcmcia/serial.opts %config(noreplace) /etc/pcmcia/wireless %config(noreplace) /etc/pcmcia/wireless.opts %config(noreplace) /etc/pcmcia/shared %config(noreplace) /etc/rc.d/init.d/pcmcia %config(noreplace) /etc/sysconfig/pcmcia %changelog * Tue Mar 12 2002 Frederic Lepied <flepied@mandrakesoft.com> 3.1.31-5mdk - don't call updfstab * Tue Mar 5 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1.31-4mdk - patch #112: cirrus6729 uses oldskool i82365 * Thu Feb 28 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1.31-3mdk - patch #300: add a few PCI ID's for CardBus controllers just like in the install * Wed Feb 13 2002 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.31-2mdk - Set pcmcia just after network or cards will not be up. - remove no binding found error message. - set umask before doing anythhing. - Serial fixes (test if setserial is here before launching, make it devfs aware, serial.opts reflect script). * Wed Jan 2 2002 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.31-1mdk - 3.1.31. * Wed Dec 5 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.30-1mdk - 3.1.30. - s|aic7xxx_mod|aic7xxx|; - Call updfstab as conditionall if present. - Use modprobe - Add sed to remove the pre-install of modules.conf. * Wed Nov 21 2001 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1.29-6mdk - remove no more relevant test for matching revision between cardmgr and kernel driver (patch #105) * Tue Nov 20 2001 Stew Benedict <sbenedict@mandrakesoft.com> 3.1.29-5mdk - adjust portrange to appropriate values on PPC build * Thu Nov 1 2001 Juan Quintela <quintela@mandrakesoft.com> 3.1.29-4mdk - Fixing kernel-pcmcia-cs conflict. * Thu Oct 25 2001 Stefan van der Eijk <stefan@eijk.nu> 3.1.29-3mdk - BuildRequires: kernel-source * Fri Oct 19 2001 Stew Benedict <sbenedict@mandrakesoft.com> 3.1.29-2mdk - exclude probe from %files on PPC * Wed Oct 3 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.29-1mdk - First version dumped from kernel packages. # end of file