Package hotplug: Specfile

Name: hotplug
Version: 2004_09_23
Release: alt17

Summary: A helper application for loading modules
Summary(ru_RU.KOI8-R): \xf0\xd2\xc9\xcc\xcf\xd6\xc5\xce\xc9\xc5 \xc4\xcc\xd1 \xc1\xd7\xd4\xcf\xcd\xc1\xd4\xc9\xde\xc5\xd3\xcb\xcf\xca \xda\xc1\xc7\xd2\xd5\xda\xcb\xc9 \xcd\xcf\xc4\xd5\xcc\xc5\xca
Group: System/Configuration/Hardware

License: GPL
Url: http://kernel.org/pub/linux/utils/kernel/hotplug/

Source0: http://kernel.org/pub/linux/utils/kernel/hotplug/%name-%version.tar.bz2
Source1: http://www.linuxalpha.compaq.com/pcihpd/files/cpqphpd_gui-0.1.2.tar.bz2
Source2: http://www.linuxalpha.compaq.com/pcihpd/files/hpioctl.tar.bz2
Source3: cpqphpd_ioctl.h
Source4: hotplug-modutils
Source5: hotplug-usb.sysconfig
Source6: hotplug.conf

Patch0:  hotplug-2004_09_23-alt.patch

PreReq: chkconfig
Requires: udev
Obsoletes: usbd kudzu linux-hotplug
Conflicts: kudzu linux-hotplug
Provides: usbd
PreReq: modutils >= 2.4.25-alt3
PreReq: libhw-tools >= 0.2.13
Requires: startup >= 0.9.0-alt1
BuildPreReq: libhw-tools >= 0.2.9
Conflicts: libhw-tools < 0.2.12-alt1

%description
This package contains the scripts necessary for hotplug Linux support,
and lets you plug in new devices and use them immediately.
Initially, it includes support for USB and PCI (Cardbus) devices,
and can automatically configure network interfaces.

%description -l ru_RU.KOI8-R
\xfc\xd4\xcf\xd4 \xd0\xc1\xcb\xc5\xd4 \xd3\xcf\xc4\xc5\xd2\xd6\xc9\xd4 \xd3\xcb\xd2\xc9\xd0\xd4\xd9 \xc4\xcc\xd1 \xc1\xd7\xd4\xcf\xcd\xc1\xd4\xc9\xde\xc5\xd3\xcb\xcf\xca \xda\xc1\xc7\xd2\xd5\xda\xcb\xc9 \xcd\xcf\xc4\xd5\xcc\xc5\xca \xc9 \xce\xc1\xd3\xd4\xd2\xcf\xca\xcb\xc9 \xc4\xcf\xc2\xc1\xd7\xcc\xd1\xc5\xcd\xcf\xc7\xcf
\xcf\xc2\xcf\xd2\xcf\xc4\xcf\xd7\xc1\xce\xc9\xd1.

%package gtk
Summary: GTK control interface for Hotplug PCI
Group: System/Configuration/Hardware

%description gtk
This is the GTK interface for the Compaq PCI hotplug controller

%prep
%setup -q -a1 -a2
%patch0 -p1

%build
%make_build CFLAGS="%optflags"

%install
make prefix=$RPM_BUILD_ROOT install

# hotplug PCI program
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/dev.d/sound
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/modutils.d
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/hotplug/usb
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/hotplug/pci
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/hotplug/ieee1394
mkdir -p $RPM_BUILD_ROOT/lib/firmware
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/sysconfig
mkdir -p $RPM_BUILD_ROOT/usr/lib/hotplug/firmware
install -m644 %SOURCE5 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/usb
install -m644 %SOURCE6 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/hotplug

mkdir -p $RPM_BUILD_ROOT/var/log/hotplug
mkdir -p $RPM_BUILD_ROOT/var/lib/hotplug
install -m 644 %SOURCE4 $RPM_BUILD_ROOT%_sysconfdir/modutils.d/%name

%post 
%post_service hotplug
# hotplug must be enabled ;-(
/sbin/chkconfig --add hotplug

%preun
%preun_service hotplug


%files
%doc README ChangeLog
%config(noreplace) /etc/modutils.d/%name
%config(noreplace) /etc/hotplug/blacklist
%config(noreplace) /etc/sysconfig/%name
/etc/hotplug/hotplug.functions
/etc/hotplug/ieee1394.agent
/etc/hotplug/net.agent
/etc/hotplug/pci.agent
/etc/hotplug/usb.agent
%config(noreplace) /etc/hotplug/pnp.distmap
%config(noreplace) /etc/hotplug/usb.distmap
%config(noreplace) /etc/hotplug/usb.handmap
%config(noreplace) /etc/hotplug/usb.usermap
%dir /etc/hotplug.d
%dir /etc/hotplug.d/default
%config(noreplace) /etc/hotplug.d/default/default.hotplug
/etc/hotplug/dasd.agent
/etc/hotplug/firmware.agent
/etc/hotplug/input.agent
/etc/hotplug/scsi.agent
/etc/hotplug/tape.agent
/etc/dev.d/sound
/etc/modutils.d/oss
#config(noreplace) /etc/sysconfig/usb
/etc/hotplug/*.rc
/etc/rc.d/init.d/hotplug
/sbin/*
%dir /etc/hotplug
%dir %_sysconfdir/hotplug/usb
%dir %_sysconfdir/hotplug/pci
%dir %_sysconfdir/hotplug/ieee1394
%dir /lib/firmware
%dir /usr/lib/hotplug
%dir /usr/lib/hotplug/firmware
%dir /var/run/usb
%dir /var/log/hotplug
%dir /var/lib/hotplug
%_mandir/man?/*

%changelog
* Wed Mar 01 2006 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt17
- force ac loading from acpi.rc

* Tue Feb 21 2006 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt16
- added conflicts and obsoletes with linux-hotplug

* Mon Feb 13 2006 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt15
- added force parameter to alsactl into sound.dev script (#8995)
- added shpchp to blacklist (#7535)
- added /usr/lib/hotplug to package (#8947)

* Thu Jul 14 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt14
- start usb.rc after sound.rc
- added nvidiafb to blacklist (#7360)
- corrected sound.dev and sound.rc scripts for saving/restoring mixer values

* Fri Jun 03 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt13
- blacklisted all framebuffer modules
- added Conflict with old libhw-tools

* Mon May 16 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt12
- blacklisted audio and usb-midi modules

* Thu May 12 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt11
- added provides for /usr/lib/hotplug/firmware directory (#5951)
- added missing /etc/dev.d/sound/sound.dev (#6805)

* Wed Apr 27 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt10
- use only new pciscan for resolve kernel modules for PCI bus

* Thu Apr 14 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt9
- bugfixes into block.rc and sound.rc
- added modutils.d/oss for autoloading snd-pcm-oss drivers

* Thu Apr 07 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt8
- added block.rc for autoloading drivers for storages
- fixed pciscan options into hotplug.functions
- added sound.dev for storing/restoring mixer values

* Wed Feb 16 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt7
- removed block.rc, block.agent
- rewrited pnp.rc

* Tue Jan 25 2005 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt6
- use process pid for creating temporary files for fstab (#5889, #5797)
- install default pnp.distmap (#5893, #5842)
- use /lib/firmware/ default catalog for firmware.agent (#5893)
- added noauto option for unknown block devices (#5945)
- new sysfs mountpoint detection code (more agents and rc-scripts don't work if sysfs not mounted)

* Tue Dec 28 2004 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt5
- ifrename path fixed (#5776)
- disabled startup misc.rc on kernel 2.4 (#5779)
- pciscan: more correct usage

* Thu Dec 23 2004 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt4
- net.agent: use CONFMETHOD from /etc/sysconfig/network
- block.agent, block.rc: create /etc/fstab.backup with previos fstab state

* Tue Dec 14 2004 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt3
- fixed etcnet support
- added directory for firmware agent

* Wed Dec 08 2004 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt2
- added conflicts with kudzu
- enabled loading network modules in pci.rc

* Mon Nov 29 2004 Anton Farygin <rider@altlinux.ru> 2004_09_23-alt1
- new version from mainstream (2004_09_23)
- etcnet support added
- disabled misc.rc for kernel 2.4
- removed updfstab support
- added pnp.rc to default config file

* Wed Nov 03 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt12
- mountpoints to block devices moved to /media

* Mon Nov 01 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt11
- mountpoints to block devices renamed to /mnt/<storage_type>_<device_name>
- fixed block.rc races
- fixed block.agent races

* Mon Oct 18 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt10
- added cpu.rc - detection and loading cpufreq modules
- added acpi.rc - detection and loading modules for acpi devices
- added misc.rc - detection and loading kernel modules for miscellaneous devices (psmouse)
- fixed races into block.agent
- added filesystem detection code to block.agent (with new libhw-tools)

* Sun Sep 12 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt8
- added block.rc - script for cleanup hotplug entries from /etc/fstab
- added probing ide devices after hotplug start - it's need for loading ide-cd modules
- mountpoints detect by storagescan added into block.agent
- added radeonfb to blacklist'ed modules
- added buildprereq to libhw-tools

* Mon Jul 19 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt7
- fixed start/stop chkconfig priority for hotplug initscript (32 69) (#4668)
- added status information for sound.rc (#4825)
- renamed *START options in sysconfig file to HOTPLUGRC
- used "action" into initscript for starting hotplugging services
- Russian summary and description added

* Sun Jul 18 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt6
- fixed typo in sound.agent
- don't probe modules, if pciscan return driver with "Card:", "ISDN:", "Bad:" or "Server:" words

* Wed Jul 14 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt5
- sound.agent and sound.rc added (only for kernel 2.6)
- into "pci.rc status" output from lspci changed to output from pciscan -v
- added configuration file /etc/sysconfig/hotplug (user may be disable hotplug functions)
- enabled stop service on hotplug initscripts (only for kernel 2.6) 

* Tue Jul 13 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt4
- skip blank lines into usb_map_modules
- requires fixed
- added eth1394 and i8xx_tco to blacklist

* Fri Jul 09 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt3
- fixed #4301
- block.agent added (work only for kernel 2.6.x)
- added remove event support for network interfaces (#4668)

* Mon May 31 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt2
- load_driver don't load missing kernel module
- fixed loading usb drivers for usb 2.0 controllers with usb 1.x
- ignoring all PCI network adapters added at start hotplug (kernel 2.6)

* Wed May 26 2004 Anton Farygin <rider@altlinux.ru> 2004_03_29-alt1
- new version with kernel 2.6 support

* Thu Oct 16 2003 Rider <rider@altlinux.ru> 2002_08_26-alt5
- added ieee1394 storages support 

* Wed Oct 01 2003 Rider <rider@altlinux.ru> 2002_08_26-alt4
- fixed requires to /etc/pcmcia/wireless

* Mon Sep 29 2003 Rider <rider@altlinux.ru> 2002_08_26-alt3
- install %name config into %_sysconfdir/modutils.d/ for loading sd_mod above usb-storage

* Tue Jul 08 2003 Rider <rider@altlinux.ru> 2002_08_26-alt2
- run updfstab with LANG variable
- run updfstab after remove USB storage device

* Mon Mar 31 2003 Stanislav Ievlev <inger@altlinux.ru> 2002_08_26-alt1.1
- Enable Debian's update-usb.usermap utility.
  We'll need it for some printer drivers

* Thu Oct 24 2002 Konstantin Volckov <goldhead@altlinux.ru> 2002_08_26-alt1
- Rebuilt in new environment
- 2002_08_26
- Added some Mandrake patches

* Tue May 21 2002 Konstantin Volckov <goldhead@altlinux.ru> 2002_04_01-alt2
- Added joydev patch to support some joystics

* Thu Apr 04 2002 Konstantin Volckov <goldhead@altlinux.ru> 2002_04_01-alt1
- 2002-04-01
- Added -gtk subpackage

* Fri Dec 07 2001 Konstantin Volckov <goldhead@altlinux.ru> 2001_09_19-alt2
- Added requires to right modutils

* Thu Dec 06 2001 Konstantin Volckov <goldhead@altlinux.ru> 2001_09_19-alt1
- First build for Sisyphus

* Mon Sep 17 2001 Frederic Lepied <flepied@mandrakesoft.com> 2001_06_12-8mdk
- added ieee1934.agent from cvs (Chmouel)

* Fri Sep 14 2001 Frederic Lepied <flepied@mandrakesoft.com> 2001_06_12-7mdk
- storage handling is handled by dynamic now.

* Thu Sep  6 2001 Frederic Lepied <flepied@mandrakesoft.com> 2001_06_12-6mdk
- fix for wacom module load

* Sat Sep  1 2001 Frederic Lepied <flepied@mandrakesoft.com> 2001_06_12-5mdk
- updated patch1 for wireless devices
- don't install patch backup files

* Thu Aug 30 2001 Frederic Lepied <flepied@mandrakesoft.com> 2001_06_12-4mdk
- Run ifdown on interface unregistration (kill stale DHCP clients)
- own /etc/hotplug

* Wed Jul 11 2001 Frederic Lepied <flepied@mandrakesoft.com> 2001_06_12-3mdk
- added a call to updfstab when usb-storage is loaded

* Wed Jun 13 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2001_06_12-2mdk
- noreplace /etc/ files.
- Update description.
- ifdown net when unregister net card.

* Tue Jun 12 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2001_06_12-1mdk
- First mandrake release (generated from cvs, spec file inspired from rh).