Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > f3f0b66f51898042dcaf92df67f9672e > files > 22

pcmcia-cs-3.2.0-3mdk.src.rpm

%define name pcmcia-cs
%define version 3.2.0
%define release 3mdk

%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 byacc libforms1-devel
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
Obsoletes: kernel-%{name}
Prereq: rpm-helper
# 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.2.0-cp-force.patch.bz2
Patch103: pcmcia-cs-3.1.29-rc-early.patch.bz2
Patch104: pcmcia-cs-3.1.29-yenta-opts.patch.bz2
Patch107: pcmcia-cs-3.1.31-fixbuild.patch.bz2
Patch110: pcmcia-cs-3.1.31-umask.patch.bz2
Patch111: pcmcia-cs-3.2.0-no-function-binding.patch.bz2

Patch200: pcmcia-cs-3.1.29-ppc.portrange.patch.bz2

Patch300: pcmcia-cs-3.2.0-add-pci-ids-from-install.patch.bz2
Patch301: pcmcia-cs-3.2.0-misc.patch.bz2
Patch302: pcmcia-cs-3.2.0-forms.patch.bz2

Requires: hotplug
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.


%package x11
Summary: X11 frontend for pcmcia-cs package.
Group: System/Kernel and hardware
Requires: pcmcia-cs = %version

%description x11
This is the X11 front-end interface (based on xforms) for the pcmcia-cs 
package.


%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
%patch107 -p1 -b .fixbuild
%patch110 -p1 -b .umask
%patch111 -p1 -b .no-function

%patch300 -p1 -b .install
%patch301 -p1 -b .misc
%patch302 -p1 -b .forms

%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
/sbin/cardmgr
/sbin/dump_cis
/sbin/ftl_check
/sbin/ftl_format
/sbin/ide_info
/sbin/ifport
/sbin/ifuser
/sbin/lspnp
/sbin/pack_cis
%ifnarch ppc
/sbin/pcic_probe
%endif
/sbin/pcinitrd
/sbin/scsi_info

%{_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/ieee1394
%config(noreplace) /etc/pcmcia/ieee1394.opts
%config(noreplace) /etc/pcmcia/isdn
%config(noreplace) /etc/pcmcia/memory
%config(noreplace) /etc/pcmcia/memory.opts
%config(noreplace) /etc/pcmcia/misc.conf
%config(noreplace) /etc/pcmcia/network
%config(noreplace) /etc/pcmcia/network.opts
%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/shared
%config(noreplace) /etc/pcmcia/wireless
%config(noreplace) /etc/pcmcia/wireless.opts
%config(noreplace) /etc/rc.d/init.d/pcmcia
%config(noreplace) /etc/sysconfig/pcmcia

%files x11
%defattr(-, root, root)
/usr/X11R6/bin/*
/usr/X11R6/man/man?/*

%changelog
* Thu Sep  7 2002 Stew Benedict <sbenedict@mandrakesoft.com> 3.2.0-3mdk
- restore PPC portrange patch (P200) - removed a couple of updates before

* Tue Aug 27 2002 Frederic Lepied <flepied@mandrakesoft.com> 3.2.0-2mdk
- fixed compilation (P302)
- add P301 to configure Advantech wireless cards
- remove P4 and P104 as we don't have kudzu anymore

* Wed Aug  7 2002 Juan Quintela <quintela@mandrakesoft.com> 3.2.0-1mdk
- remove P112 (old-skool-driver), not used already, and new code does
  always te hright thing.
- ordered %file sections in alphabetical order.
- /sbin/probe now is called /sbin/pcic_probe
- remove P400 (prism2 fix), integrated upstream.
- rediff P111 (no-function-bindings).
- remove P109 (serial-fixes), fixed upstream.
- remove P107 (name yenta_socket), different solution upstream.
- remove P106 (change modprobe paths), included upstream.
- remove P105 (remove test for matching revision), included upstream.
- rediff P101 (cp-force).
- 3.2.0.

* Sat Jun 15 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 3.1.31-8mdk
- BuildRequires: byacc libforms-devel.
- Add cardinfo (because we have xforms in the distrib now). 

* Tue May 14 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 3.1.31-7mdk
- fix PRISM2 support [Patch400]

* Fri Apr  5 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1.31-6mdk
- requires hotplug (thx Ha Duong Minh <minh.ha.duong@cmu.edu>)

* 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