chiark / gitweb /
[PATCH] udev kill extra bus_id compares in match_id
[elogind.git] / udev.spec
1 # if we want to build against the included version of klibc or not.
2 # 0 - do not use klibc
3 # 1 - use klibc
4 # Watch out for where the linux symlink is in the klibc part of the tarball,
5 # it probably is not where you want it to be.
6 %define klibc 1
7
8 # if we want to have logging support in or not.
9 # 0 - no logging  support
10 # 1 - logging support
11 # Note, it is not recommend if you use klibc to enable logging.
12 %define log 0
13
14 # if we want to build DBUS support in or not.
15 # 0 - no DBUS support
16 # 1 - DBUS support
17 %define dbus 0
18
19 # if we want to enable debugging support in udev.  If it is enabled, lots of 
20 # stuff will get sent to the debug syslog.
21 # 0 - debugging disabled
22 # 1 - debugging enabled
23 %define debug 0
24
25 # if we want to use the LSB version of the init script or the Redhat one
26 # 0 - use Redhat version: etc/init.d/udev
27 # 1 - use LSB version: etc/init.d/udev.init.LSB
28 %define lsb 0
29
30 Summary: A userspace implementation of devfs
31 Name: udev
32 Version: 016_bk
33 Release: 1
34 License: GPL
35 Group: Utilities/System
36 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.gz
37 ExclusiveOS: Linux
38 Vendor: Greg Kroah-Hartman <greg@kroah.com>
39 URL : kernel.org/pub/linux/utils/kernel/hotplug/
40 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
41 Prereq: /bin/sh, fileutils, hotplug
42
43 %description
44 udev is a implementation of devfs in userspace using sysfs and
45 /sbin/hotplug. It requires a 2.6 kernel to run properly.
46
47 %prep
48 %setup -q
49
50 %build
51 make CC="gcc $RPM_OPT_FLAGS"    \
52 %if %{klibc}
53         USE_KLIBC=true          \
54 %endif
55 %if %{log}
56         USE_LOG=true            \
57 %endif
58 %if %{dbus}
59         USE_DBUS=true           \
60 %endif
61 %if %{debug}
62         DEBUG=true              \
63 %endif
64
65 # now build udevd on it's own, as it can't handle being built with klibc
66 make CC="gcc $RPM_OPT_FLAGS" udevd
67
68
69 %install
70 make DESTDIR=$RPM_BUILD_ROOT install \
71 %if %{dbus}
72         USE_DBUS=true
73 %endif
74 %if %{lsb}
75         USE_LSB=true
76 %endif
77 %post
78 /sbin/chkconfig --add udev
79
80 %postun
81 if [ $1 = 0 ]; then
82         /sbin/chkconfig --del udev
83 fi
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(-,root,root)
90 %doc COPYING README TODO ChangeLog
91 %attr(755,root,root) /sbin/udev
92 %attr(755,root,root) /sbin/udevinfo
93 %attr(755,root,root) /sbin/udevsend
94 %attr(755,root,root) /sbin/udevd
95 %attr(755,root,root) /udev/
96 %attr(755,root,root) /etc/udev/
97 %config(noreplace) %attr(0644,root,root) /etc/udev/udev.conf
98 %config(noreplace) %attr(0644,root,root) /etc/udev/udev.rules
99 %config(noreplace) %attr(0644,root,root) /etc/udev/udev.permissions
100 %if %{dbus}
101         %config(noreplace) %attr(0644,root,root) /etc/dbus-1/system.d/udev_sysbus_policy.conf
102 %endif
103 %attr(-,root,root) /etc/hotplug.d/default/udev.hotplug
104 %attr(755,root,root) /etc/init.d/udev
105 %attr(0644,root,root) %{_mandir}/man8/udev*.8*
106
107 %changelog
108 * Mon Feb 2 2004 Greg Kroah-Hartman <greg@kroah.com>
109 - add udevsend, and udevd to the files
110 - add ability to build udevd with glibc after the rest is build with klibc
111
112 * Mon Jan 26 2004 Greg Kroah-Hartman <greg@kroah.com>
113 - added udevinfo to rpm
114 - added URL to spec file
115 - added udevinfo's man page
116
117 * Mon Jan 05 2004 Rolf Eike Beer <eike-hotplug@sf-tec.de>
118 - add defines to choose the init script (Redhat or LSB)
119
120 * Tue Dec 16 2003 Robert Love <rml@ximian.com>
121 - install the initscript and run chkconfig on it
122
123 * Tue Nov 2 2003 Greg Kroah-Hartman <greg@kroah.com>
124 - changes due to config file name changes
125
126 * Fri Oct 17 2003 Robert Love <rml@tech9.net>
127 - Make work without a build root
128 - Correctly install the right files
129 - Pass the RPM_OPT_FLAGS to gcc so we can build per the build policy
130 - Put some prereqs in
131 - Install the hotplug symlink to udev
132
133 * Mon Jul 28 2003 Paul Mundt <lethal@linux-sh.org>
134 - Initial spec file for udev-0.2.