]>
Commit | Line | Data |
---|---|---|
0c675896 GKH |
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 | ||
05230184 GKH |
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 | ||
0c675896 GKH |
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 | ||
e64280b8 | 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 | ||
3660f0b8 PM |
30 | Summary: A userspace implementation of devfs |
31 | Name: udev | |
f2ec8f1a | 32 | Version: 014 |
3660f0b8 PM |
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 | |
e0929206 | 38 | Vendor: Greg Kroah-Hartman <greg@kroah.com> |
4360a56d | 39 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
bbab56ba | 40 | Prereq: /bin/sh, fileutils, hotplug |
3660f0b8 PM |
41 | |
42 | %description | |
43 | udev is a implementation of devfs in userspace using sysfs and | |
22120496 | 44 | /sbin/hotplug. It requires a 2.6 kernel to run properly. |
3660f0b8 PM |
45 | |
46 | %prep | |
bbab56ba | 47 | %setup -q |
3660f0b8 PM |
48 | |
49 | %build | |
0c675896 GKH |
50 | make CC="gcc $RPM_OPT_FLAGS" \ |
51 | %if %{klibc} | |
52 | USE_KLIBC=true \ | |
53 | %endif | |
05230184 GKH |
54 | %if %{log} |
55 | USE_LOG=true \ | |
56 | %endif | |
0c675896 GKH |
57 | %if %{dbus} |
58 | USE_DBUS=true \ | |
59 | %endif | |
60 | %if %{debug} | |
61 | DEBUG=true \ | |
62 | %endif | |
3660f0b8 PM |
63 | |
64 | %install | |
5bfabc59 | 65 | make DESTDIR=$RPM_BUILD_ROOT install \ |
66 | %if %{dbus} | |
67 | USE_DBUS=true | |
68 | %endif | |
e64280b8 | 69 | %if %{lsb} |
70 | USE_LSB=true | |
71 | %endif | |
3660f0b8 | 72 | |
316c5150 | 73 | %post |
74 | /sbin/chkconfig --add udev | |
75 | ||
600ee7f7 | 76 | %postun |
77 | if [ $1 = 0 ]; then | |
78 | /sbin/chkconfig --del udev | |
79 | fi | |
80 | ||
3660f0b8 | 81 | %clean |
bbab56ba | 82 | rm -rf $RPM_BUILD_ROOT |
3660f0b8 PM |
83 | |
84 | %files | |
ee156981 | 85 | %defattr(-,root,root) |
bbab56ba RL |
86 | %doc COPYING README TODO ChangeLog |
87 | %attr(755,root,root) /sbin/udev | |
88 | %attr(755,root,root) /udev/ | |
89 | %attr(755,root,root) /etc/udev/ | |
1b1dbc47 | 90 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.conf |
91 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.rules | |
92 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.permissions | |
5bfabc59 | 93 | %if %{dbus} |
94 | %config(noreplace) %attr(0644,root,root) /etc/dbus-1/system.d/udev_sysbus_policy.conf | |
95 | %endif | |
8634e6d1 | 96 | %attr(-,root,root) /etc/hotplug.d/default/udev.hotplug |
d870b833 | 97 | %attr(755,root,root) /etc/init.d/udev |
bbab56ba | 98 | %attr(0644,root,root) %{_mandir}/man8/udev.8* |
3660f0b8 PM |
99 | |
100 | %changelog | |
e64280b8 | 101 | * Mon Jan 05 2004 Rolf Eike Beer <eike-hotplug@sf-tec.de> |
102 | - add defines to choose the init script (Redhat or LSB) | |
103 | ||
316c5150 | 104 | * Tue Dec 16 2003 Robert Love <rml@ximian.com> |
105 | - install the initscript and run chkconfig on it | |
106 | ||
e8baccca GKH |
107 | * Tue Nov 2 2003 Greg Kroah-Hartman <greg@kroah.com> |
108 | - changes due to config file name changes | |
109 | ||
bbab56ba RL |
110 | * Fri Oct 17 2003 Robert Love <rml@tech9.net> |
111 | - Make work without a build root | |
112 | - Correctly install the right files | |
113 | - Pass the RPM_OPT_FLAGS to gcc so we can build per the build policy | |
114 | - Put some prereqs in | |
8634e6d1 | 115 | - Install the hotplug symlink to udev |
bbab56ba | 116 | |
3660f0b8 PM |
117 | * Mon Jul 28 2003 Paul Mundt <lethal@linux-sh.org> |
118 | - Initial spec file for udev-0.2. |