2003-12-25 10:38:58 +03:00
# if we want to build against the included version of klibc or not.
# 0 - do not use klibc
# 1 - use klibc
# Watch out for where the linux symlink is in the klibc part of the tarball,
# it probably is not where you want it to be.
%define klibc 1
2004-01-16 09:00:58 +03:00
# if we want to have logging support in or not.
# 0 - no logging support
# 1 - logging support
# Note, it is not recommend if you use klibc to enable logging.
%define log 0
2003-12-25 10:38:58 +03:00
# if we want to build DBUS support in or not.
# 0 - no DBUS support
# 1 - DBUS support
%define dbus 0
# if we want to enable debugging support in udev. If it is enabled, lots of
# stuff will get sent to the debug syslog.
# 0 - debugging disabled
# 1 - debugging enabled
%define debug 0
2004-01-10 12:19:57 +03:00
# if we want to use the LSB version of the init script or the Redhat one
# 0 - use Redhat version: etc/init.d/udev
# 1 - use LSB version: etc/init.d/udev.init.LSB
%define lsb 0
2003-08-05 12:17:07 +04:00
Summary : A userspace implementation of devfs
Name : udev
2004-02-04 05:23:13 +03:00
Version : 016
2003-08-05 12:17:07 +04:00
Release : 1
License : GPL
Group : Utilities/System
Source : ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name} -%{version} .tar.gz
ExclusiveOS: Linux
2003-08-05 12:18:46 +04:00
Vendor : Greg Kroah-Hartman <greg@kroah.com>
2004-01-27 06:41:00 +03:00
URL : kernel.org/pub/linux/utils/kernel/hotplug/
2003-10-30 09:26:35 +03:00
BuildRoot : %{_tmppath} /%{name} -%{version} -%{release} -root
2003-10-18 10:34:19 +04:00
Prereq : /bin/sh, fileutils, hotplug
2003-08-05 12:17:07 +04:00
%description
udev is a implementation of devfs in userspace using sysfs and
2003-10-17 17:14:02 +04:00
/sbin/hotplug. It requires a 2.6 kernel to run properly.
2003-08-05 12:17:07 +04:00
%prep
2003-10-18 10:34:19 +04:00
%setup -q
2003-08-05 12:17:07 +04:00
%build
2003-12-25 10:38:58 +03:00
make CC=" g c c $RPM_OPT_FLAGS " \
%if %{klibc}
USE_KLIBC=true \
%endif
2004-01-16 09:00:58 +03:00
%if %{log}
USE_LOG=true \
%endif
2003-12-25 10:38:58 +03:00
%if %{dbus}
USE_DBUS=true \
%endif
%if %{debug}
DEBUG=true \
%endif
2003-08-05 12:17:07 +04:00
2004-02-03 12:29:45 +03:00
# now build udevd on it's own, as it can't handle being built with klibc
make CC=" g c c $RPM_OPT_FLAGS " udevd
2003-08-05 12:17:07 +04:00
%install
2003-12-31 11:34:49 +03:00
make DESTDIR=$RPM_BUILD_ROOT install \
%if %{dbus}
USE_DBUS=true
%endif
2004-01-10 12:19:57 +03:00
%if %{lsb}
USE_LSB=true
%endif
2003-12-17 10:30:15 +03:00
%post
/sbin/chkconfig --add udev
2003-12-17 10:31:16 +03:00
%postun
if [ $1 = 0 ]; then
/sbin/chkconfig --del udev
fi
2003-08-05 12:17:07 +04:00
%clean
2003-10-18 10:34:19 +04:00
rm -rf $RPM_BUILD_ROOT
2003-08-05 12:17:07 +04:00
%files
2003-12-25 09:54:39 +03:00
%defattr (-,root,root)
2003-10-18 10:34:19 +04:00
%doc COPYING README TODO ChangeLog
%attr (755,root,root) /sbin/udev
2004-01-27 06:32:57 +03:00
%attr (755,root,root) /sbin/udevinfo
2004-02-03 12:29:45 +03:00
%attr (755,root,root) /sbin/udevsend
%attr (755,root,root) /sbin/udevd
2003-10-18 10:34:19 +04:00
%attr (755,root,root) /udev/
%attr (755,root,root) /etc/udev/
2003-12-17 19:35:00 +03:00
%config (noreplace) %attr (0644,root,root) /etc/udev/udev.conf
%config (noreplace) %attr (0644,root,root) /etc/udev/udev.rules
%config (noreplace) %attr (0644,root,root) /etc/udev/udev.permissions
2003-12-31 11:34:49 +03:00
%if %{dbus}
%config (noreplace) %attr (0644,root,root) /etc/dbus-1/system.d/udev_sysbus_policy.conf
%endif
2003-10-18 11:12:16 +04:00
%attr (-,root,root) /etc/hotplug.d/default/udev.hotplug
2003-12-16 09:22:30 +03:00
%attr (755,root,root) /etc/init.d/udev
2004-01-27 06:56:59 +03:00
%attr (0644,root,root) %{_mandir} /man8/udev*.8*
2003-08-05 12:17:07 +04:00
%changelog
2004-02-03 12:29:45 +03:00
* Mon Feb 2 2004 Greg Kroah-Hartman <greg@kroah.com>
- add udevsend, and udevd to the files
- add ability to build udevd with glibc after the rest is build with klibc
2004-01-27 06:32:57 +03:00
* Mon Jan 26 2004 Greg Kroah-Hartman <greg@kroah.com>
2004-01-27 06:56:59 +03:00
- added udevinfo to rpm
2004-01-27 06:41:00 +03:00
- added URL to spec file
2004-01-27 06:56:59 +03:00
- added udevinfo's man page
2004-01-27 06:32:57 +03:00
2004-01-10 12:19:57 +03:00
* Mon Jan 05 2004 Rolf Eike Beer <eike-hotplug@sf-tec.de>
- add defines to choose the init script (Redhat or LSB)
2003-12-17 10:30:15 +03:00
* Tue Dec 16 2003 Robert Love <rml@ximian.com>
- install the initscript and run chkconfig on it
2003-12-03 12:08:46 +03:00
* Tue Nov 2 2003 Greg Kroah-Hartman <greg@kroah.com>
- changes due to config file name changes
2003-10-18 10:34:19 +04:00
* Fri Oct 17 2003 Robert Love <rml@tech9.net>
- Make work without a build root
- Correctly install the right files
- Pass the RPM_OPT_FLAGS to gcc so we can build per the build policy
- Put some prereqs in
2003-10-18 11:12:16 +04:00
- Install the hotplug symlink to udev
2003-10-18 10:34:19 +04:00
2003-08-05 12:17:07 +04:00
* Mon Jul 28 2003 Paul Mundt <lethal@linux-sh.org>
- Initial spec file for udev-0.2.