File pcmciautils.spec of Package pcmciautils

#
# spec file for package pcmciautils (Version 014)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           pcmciautils
BuildRequires:  sysfsutils
URL:            http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html
Version:        014
Release:        1
Summary:        Utilities for PC-Cards
License:        GNU General Public License (GPL)
Group:          Hardware/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Obsoletes:      pcmcia
Provides:       pcmcia
#Requires:     sysconfig syslog
PreReq:         permissions
#Conflicts:   
Supplements:  modalias(pci:v*d*sv*sd*bc06sc07i00*)
Autoreqprov:    on
Source:         pcmciautils-%{version}.tar.bz2
Patch:          pcmciautils.Makefile.diff
Patch2:         pcmciautils_config.opts.202500.diff
Source1:        suse-files.tar.bz2
Source2:        cis-files.tar.bz2

%description
This package enables the usage of PC-Cards with Linux. It provides
hotplug scripts and tools that set up sockets and cards. Since kernel
2.6.13 card injection and removal are handled completely via hotplug.
Therefore a deamon like 'cardmgr' is no longer needed. Soft ejecting
and inserting cards can be done with pccardctl (what was cardctl
before). There are also some tools for debugging and CIS handling.



Authors:
--------
    Dominik Brodowski <linux@brodo.de>
    David Hinds <dhinds@pcmcia.sourceforge.edu>

%prep
%setup -n pcmciautils-%{version} 
%patch
%patch2
%setup -n pcmciautils-%{version} -T -D -a 1
%setup -n pcmciautils-%{version} -T -D -a 2

%build
make all DEF_CFLAGS="$RPM_OPT_FLAGS" STRIPCMD=true
# make debugtools

%install
make install DESTDIR=%{buildroot}
#chown root:trusted %{buildroot}/sbin/pccardctl
#chmod 4750 %{buildroot}/sbin/pccardctl
mkdir -p %{buildroot}/etc/udev/rules.d
install -m 644 suse-files/50-pcmcia.rules %{buildroot}/etc/udev/rules.d
mkdir -p %{buildroot}/etc/sysconfig/hardware/scripts
install -m 644 suse-files/functions* %{buildroot}/etc/sysconfig/hardware/scripts
rm -Rf %{buildroot}/etc/hotplug
install -m 644 suse-files/NOTE %{buildroot}/etc/pcmcia
mkdir -p %{buildroot}/lib/firmware
install -m 644 cis-files/* %{buildroot}/lib/firmware
mkdir -p %{buildroot}/%{_docdir}/pcmciautils
#install -m 644 suse-files/LIESMICH.SuSE %{buildroot}/%{_docdir}/pcmciautils
install -m 644 suse-files/README.SUSE %{buildroot}/%{_docdir}/pcmciautils
mkdir -p %{buildroot}/var/adm/fillup-templates
install -m 644 suse-files/sysconfig.pcmcia \
               %{buildroot}/var/adm/fillup-templates/

%post
%{fillup_only -n pcmcia}
%run_permissions

%verifyscript
%verify_permissions -e /sbin/pccardctl

%files
%defattr(-,root,root)
%dir /etc/pcmcia
%config /etc/pcmcia/config.opts
/etc/pcmcia/NOTE
/etc/udev
/etc/sysconfig/hardware
%verify(not mode) %attr(4750,root,trusted) /sbin/pccardctl
/sbin/pcmcia-check-broken-cis
/sbin/pcmcia-socket-startup
/sbin/lspcmcia
/lib/firmware
/var/adm/fillup-templates/sysconfig.pcmcia
/%{_docdir}/pcmciautils
#/%{_mandir}/man[458]/*
/%{_mandir}/man8/*
# %clean
# test -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT

%changelog -n pcmciautils
* Mon Jan 08 2007 - zoz@suse.de
- update to version 014:
  + fix fallthrough from 'pccardctl ls' to 'pccardctl insert'
  + symlink man page too
  + lspcmcia: fix iomem/ioports mixup
  + handle big endian host in dump_cis
  from version 013:
  + check-broken-cis: endless loop
  + updated runtime powermanagement handling
  + add "lspcmcia"
  + pccardctl: return error values from low-level functions
  + pccardctl: don't break lspcmcia if /sys/class/*/*/device is removed
- added comment in config.opts (bug 202500)
* Wed May 24 2006 - schwab@suse.de
- Don't strip binaries.
* Thu Mar 30 2006 - zoz@suse.de
- added supplement modalias in specfile (Bug 161340)
* Fri Jan 27 2006 - zoz@suse.de
- update to version 012:
  + Makefile: fix double prefix
  + Add output for "pccardctl status"
  + pccardctl: do not use deprecated sysfs_read_attribute_value()
  + Add improvements to config.opts from ubuntu/debian
  + Makefile: allow for statically linked binaries
  + Add improvements to config.opts from opensuse
- added some patches from git:
  + avoid endless loop in pcmcia-check-broken-cis
  + fixed some typos in documentation
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Dec 15 2005 - zoz@suse.de
- update to version 011 (we still use our own udev rules)
- removed hotplug/*rc files
* Mon Sep 05 2005 - zoz@suse.de
- removed obsolete /etc/hotplug/*agent
- changed io ranges in config.opts due to experience with pcmcia_cs
  and current bugs (97859, 105218)
- pcmcia and pcmcia_socket events wont be handled if /dev/shm/nopcmcia
  exists (will be written with boot option 'pcmcia=off')
- Finally wrote README.SUSE
* Fri Aug 26 2005 - kukuk@suse.de
- Provide pcmcia package to enable package at update
- Remove duplicate PreReq
* Mon Aug 22 2005 - zozl@suse.de
- added cis files to package, install them to /lib/firmware
- added hwup function files
- changed /etc/hotplug/*rc: they call now hwup directly
- replaced *agent with hwup
- added /etc/sysconfig/pcmcia
* Mon Aug 15 2005 - kkeil@suse.de
- add label to support ISDN PCMCIA hotplug via udev (#102342)
* Fri Aug 05 2005 - ro@suse.de
- fix permissions handling
- build as non-root
* Mon Aug 01 2005 - zoz@suse.de
- added /etc/udev to filelist
* Mon Aug 01 2005 - zoz@suse.de
- added /etc/udev/rules.d/50-pcmcia.rules
* Sat Jul 30 2005 - zoz@suse.de
- initial package, version 007 (with the license to kill cardmgr ;)
- hotplug *.rc scripts: call *.agent directly; we don't have /sbin/hotplug
- pcmcia_socket.agent: also load module pcmcia
openSUSE Build Service is sponsored by