]>
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 |
e68582be GKH |
26 | # 0 - use Redhat: etc/init.d/udev |
27 | # 1 - use LSB: etc/init.d/udev.init.LSB | |
e64280b8 | 28 | %define lsb 0 |
29 | ||
3660f0b8 PM |
30 | Summary: A userspace implementation of devfs |
31 | Name: udev | |
e68582be | 32 | Version: 017_bk |
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> |
8fc34188 | 39 | URL : kernel.org/pub/linux/utils/kernel/hotplug/ |
4360a56d | 40 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
bbab56ba | 41 | Prereq: /bin/sh, fileutils, hotplug |
3660f0b8 PM |
42 | |
43 | %description | |
44 | udev is a implementation of devfs in userspace using sysfs and | |
22120496 | 45 | /sbin/hotplug. It requires a 2.6 kernel to run properly. |
3660f0b8 PM |
46 | |
47 | %prep | |
bbab56ba | 48 | %setup -q |
3660f0b8 PM |
49 | |
50 | %build | |
0c675896 GKH |
51 | make CC="gcc $RPM_OPT_FLAGS" \ |
52 | %if %{klibc} | |
53 | USE_KLIBC=true \ | |
54 | %endif | |
05230184 GKH |
55 | %if %{log} |
56 | USE_LOG=true \ | |
1659326d GKH |
57 | %else |
58 | USE_LOG=false \ | |
05230184 | 59 | %endif |
0c675896 GKH |
60 | %if %{dbus} |
61 | USE_DBUS=true \ | |
1659326d GKH |
62 | %else |
63 | USE_DBUS=false \ | |
0c675896 GKH |
64 | %endif |
65 | %if %{debug} | |
66 | DEBUG=true \ | |
1659326d GKH |
67 | %else |
68 | DEBUG=false \ | |
0c675896 | 69 | %endif |
3660f0b8 | 70 | |
d83a9b89 | 71 | |
3660f0b8 | 72 | %install |
5bfabc59 | 73 | make DESTDIR=$RPM_BUILD_ROOT install \ |
74 | %if %{dbus} | |
e68582be GKH |
75 | USE_DBUS=true \ |
76 | %else | |
77 | USE_DBUS=false \ | |
5bfabc59 | 78 | %endif |
e64280b8 | 79 | %if %{lsb} |
e68582be GKH |
80 | USE_LSB=true \ |
81 | %else | |
82 | USE_LSB=false \ | |
e64280b8 | 83 | %endif |
e68582be | 84 | |
316c5150 | 85 | %post |
86 | /sbin/chkconfig --add udev | |
87 | ||
600ee7f7 | 88 | %postun |
89 | if [ $1 = 0 ]; then | |
90 | /sbin/chkconfig --del udev | |
91 | fi | |
92 | ||
3660f0b8 | 93 | %clean |
bbab56ba | 94 | rm -rf $RPM_BUILD_ROOT |
3660f0b8 PM |
95 | |
96 | %files | |
ee156981 | 97 | %defattr(-,root,root) |
bbab56ba RL |
98 | %doc COPYING README TODO ChangeLog |
99 | %attr(755,root,root) /sbin/udev | |
da1cc7cc | 100 | %attr(755,root,root) /sbin/udevinfo |
d83a9b89 GKH |
101 | %attr(755,root,root) /sbin/udevsend |
102 | %attr(755,root,root) /sbin/udevd | |
e68582be GKH |
103 | %attr(755,root,root) /sbin/udevtest |
104 | %attr(755,root,root) %dir /udev/ | |
105 | %attr(755,root,root) %dir /etc/udev/ | |
1b1dbc47 | 106 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.conf |
107 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.rules | |
108 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.permissions | |
5bfabc59 | 109 | %if %{dbus} |
110 | %config(noreplace) %attr(0644,root,root) /etc/dbus-1/system.d/udev_sysbus_policy.conf | |
111 | %endif | |
8634e6d1 | 112 | %attr(-,root,root) /etc/hotplug.d/default/udev.hotplug |
d870b833 | 113 | %attr(755,root,root) /etc/init.d/udev |
567f6d14 | 114 | %attr(0644,root,root) %{_mandir}/man8/udev*.8* |
3660f0b8 PM |
115 | |
116 | %changelog | |
e68582be GKH |
117 | * Mon Feb 16 2004 Greg Kroah-Hartman <greg@kroah.com> |
118 | - fix up udevd build, as it's no longer needed to be build seperatly | |
119 | - add udevtest to list of files | |
120 | - more Red Hat sync ups. | |
121 | ||
1659326d GKH |
122 | * Thu Feb 12 2004 Greg Kroah-Hartman <greg@kroah.com> |
123 | - add some changes from the latest Fedora udev release. | |
124 | ||
d83a9b89 GKH |
125 | * Mon Feb 2 2004 Greg Kroah-Hartman <greg@kroah.com> |
126 | - add udevsend, and udevd to the files | |
127 | - add ability to build udevd with glibc after the rest is build with klibc | |
128 | ||
da1cc7cc | 129 | * Mon Jan 26 2004 Greg Kroah-Hartman <greg@kroah.com> |
567f6d14 | 130 | - added udevinfo to rpm |
8fc34188 | 131 | - added URL to spec file |
567f6d14 | 132 | - added udevinfo's man page |
da1cc7cc | 133 | |
e64280b8 | 134 | * Mon Jan 05 2004 Rolf Eike Beer <eike-hotplug@sf-tec.de> |
135 | - add defines to choose the init script (Redhat or LSB) | |
136 | ||
316c5150 | 137 | * Tue Dec 16 2003 Robert Love <rml@ximian.com> |
138 | - install the initscript and run chkconfig on it | |
139 | ||
e8baccca GKH |
140 | * Tue Nov 2 2003 Greg Kroah-Hartman <greg@kroah.com> |
141 | - changes due to config file name changes | |
142 | ||
bbab56ba RL |
143 | * Fri Oct 17 2003 Robert Love <rml@tech9.net> |
144 | - Make work without a build root | |
145 | - Correctly install the right files | |
146 | - Pass the RPM_OPT_FLAGS to gcc so we can build per the build policy | |
147 | - Put some prereqs in | |
8634e6d1 | 148 | - Install the hotplug symlink to udev |
bbab56ba | 149 | |
3660f0b8 PM |
150 | * Mon Jul 28 2003 Paul Mundt <lethal@linux-sh.org> |
151 | - Initial spec file for udev-0.2. |