]>
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 | ||
8481f8ce GKH |
19 | # if we want to build SELinux support in or not. |
20 | # 0 - no SELinux support | |
21 | # 1 - SELinux support | |
e729cb0b | 22 | %define selinux 0 |
8481f8ce | 23 | |
0c675896 GKH |
24 | # if we want to enable debugging support in udev. If it is enabled, lots of |
25 | # stuff will get sent to the debug syslog. | |
26 | # 0 - debugging disabled | |
27 | # 1 - debugging enabled | |
28 | %define debug 0 | |
29 | ||
ca8e992c GKH |
30 | # if we want to build the scsi_id "extra" package or not |
31 | # 0 - do not build the package | |
32 | # 1 - build it | |
33 | %define scsi_id 1 | |
34 | ||
3660f0b8 PM |
35 | Summary: A userspace implementation of devfs |
36 | Name: udev | |
e4f9c4a4 | 37 | Version: 021_bk |
3660f0b8 PM |
38 | Release: 1 |
39 | License: GPL | |
40 | Group: Utilities/System | |
41 | Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.gz | |
42 | ExclusiveOS: Linux | |
e0929206 | 43 | Vendor: Greg Kroah-Hartman <greg@kroah.com> |
8fc34188 | 44 | URL : kernel.org/pub/linux/utils/kernel/hotplug/ |
4360a56d | 45 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
bbab56ba | 46 | Prereq: /bin/sh, fileutils, hotplug |
3660f0b8 PM |
47 | |
48 | %description | |
49 | udev is a implementation of devfs in userspace using sysfs and | |
22120496 | 50 | /sbin/hotplug. It requires a 2.6 kernel to run properly. |
3660f0b8 PM |
51 | |
52 | %prep | |
bbab56ba | 53 | %setup -q |
3660f0b8 PM |
54 | |
55 | %build | |
0c675896 GKH |
56 | make CC="gcc $RPM_OPT_FLAGS" \ |
57 | %if %{klibc} | |
58 | USE_KLIBC=true \ | |
59 | %endif | |
05230184 GKH |
60 | %if %{log} |
61 | USE_LOG=true \ | |
1659326d GKH |
62 | %else |
63 | USE_LOG=false \ | |
05230184 | 64 | %endif |
0c675896 GKH |
65 | %if %{dbus} |
66 | USE_DBUS=true \ | |
1659326d GKH |
67 | %else |
68 | USE_DBUS=false \ | |
0c675896 | 69 | %endif |
8481f8ce GKH |
70 | %if %{selinux} |
71 | USE_SELINUX=true \ | |
72 | %else | |
73 | USE_SELINUX=false \ | |
74 | %endif | |
0c675896 GKH |
75 | %if %{debug} |
76 | DEBUG=true \ | |
1659326d GKH |
77 | %else |
78 | DEBUG=false \ | |
0c675896 | 79 | %endif |
ca8e992c GKH |
80 | EXTRAS=" \ |
81 | %if %{scsi_id} | |
82 | extras/scsi_id \ | |
83 | %endif | |
84 | " | |
d83a9b89 | 85 | |
3660f0b8 | 86 | %install |
5bfabc59 | 87 | make DESTDIR=$RPM_BUILD_ROOT install \ |
88 | %if %{dbus} | |
e68582be GKH |
89 | USE_DBUS=true \ |
90 | %else | |
91 | USE_DBUS=false \ | |
5bfabc59 | 92 | %endif |
8481f8ce GKH |
93 | %if %{selinux} |
94 | USE_SELINUX=true \ | |
95 | %else | |
96 | USE_SELINUX=false \ | |
e64280b8 | 97 | %endif |
ca8e992c GKH |
98 | EXTRAS=" \ |
99 | %if %{scsi_id} | |
100 | extras/scsi_id \ | |
101 | %endif | |
102 | " | |
e68582be | 103 | |
316c5150 | 104 | %post |
105 | /sbin/chkconfig --add udev | |
106 | ||
600ee7f7 | 107 | %postun |
108 | if [ $1 = 0 ]; then | |
109 | /sbin/chkconfig --del udev | |
110 | fi | |
111 | ||
3660f0b8 | 112 | %clean |
bbab56ba | 113 | rm -rf $RPM_BUILD_ROOT |
3660f0b8 PM |
114 | |
115 | %files | |
ee156981 | 116 | %defattr(-,root,root) |
ca8e992c | 117 | %doc COPYING README TODO ChangeLog HOWTO* etc/udev/udev.rules.examples docs/* |
bbab56ba | 118 | %attr(755,root,root) /sbin/udev |
0d1956de | 119 | %attr(755,root,root) /usr/bin/udevinfo |
d83a9b89 GKH |
120 | %attr(755,root,root) /sbin/udevsend |
121 | %attr(755,root,root) /sbin/udevd | |
e68582be | 122 | %attr(755,root,root) /sbin/udevtest |
1f63fbdd | 123 | %attr(755,root,root) /sbin/udevstart |
e68582be GKH |
124 | %attr(755,root,root) %dir /udev/ |
125 | %attr(755,root,root) %dir /etc/udev/ | |
1b1dbc47 | 126 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.conf |
127 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.rules | |
128 | %config(noreplace) %attr(0644,root,root) /etc/udev/udev.permissions | |
8634e6d1 | 129 | %attr(-,root,root) /etc/hotplug.d/default/udev.hotplug |
d870b833 | 130 | %attr(755,root,root) /etc/init.d/udev |
567f6d14 | 131 | %attr(0644,root,root) %{_mandir}/man8/udev*.8* |
3660f0b8 | 132 | |
ca8e992c GKH |
133 | %if %{dbus} |
134 | %config(noreplace) %attr(0644,root,root) /etc/dbus-1/system.d/udev_sysbus_policy.conf | |
135 | %endif | |
136 | ||
137 | %if %{scsi_id} | |
138 | %attr(755,root,root) /sbin/scsi_id | |
139 | %config(noreplace) %attr(0644,root,root) /etc/scsi_id.config | |
140 | %attr(0644,root,root) %{_mandir}/man8/scsi_id*.8* | |
141 | %endif | |
142 | ||
3660f0b8 | 143 | %changelog |
1f63fbdd GKH |
144 | * Tue Mar 2 2004 Greg Kroah-Hartman <greg@kroah.com> |
145 | - added udevstart to the list of files installed | |
0d1956de | 146 | - udevinfo is now in /usr/bin not /sbin |
1f63fbdd | 147 | |
7eb136ad GKH |
148 | * Fri Feb 27 2004 Greg Kroah-Hartman <greg@kroah.com> |
149 | - added ability to build with SELinux support | |
150 | ||
ca8e992c GKH |
151 | * Thu Feb 19 2004 Greg Kroah-Hartman <greg@kroah.com> |
152 | - add some more files to the documentation directory | |
153 | - add ability to build scsi_id and make it the default | |
154 | ||
e68582be GKH |
155 | * Mon Feb 16 2004 Greg Kroah-Hartman <greg@kroah.com> |
156 | - fix up udevd build, as it's no longer needed to be build seperatly | |
157 | - add udevtest to list of files | |
158 | - more Red Hat sync ups. | |
159 | ||
1659326d GKH |
160 | * Thu Feb 12 2004 Greg Kroah-Hartman <greg@kroah.com> |
161 | - add some changes from the latest Fedora udev release. | |
162 | ||
d83a9b89 GKH |
163 | * Mon Feb 2 2004 Greg Kroah-Hartman <greg@kroah.com> |
164 | - add udevsend, and udevd to the files | |
165 | - add ability to build udevd with glibc after the rest is build with klibc | |
166 | ||
da1cc7cc | 167 | * Mon Jan 26 2004 Greg Kroah-Hartman <greg@kroah.com> |
567f6d14 | 168 | - added udevinfo to rpm |
8fc34188 | 169 | - added URL to spec file |
567f6d14 | 170 | - added udevinfo's man page |
da1cc7cc | 171 | |
e64280b8 | 172 | * Mon Jan 05 2004 Rolf Eike Beer <eike-hotplug@sf-tec.de> |
173 | - add defines to choose the init script (Redhat or LSB) | |
174 | ||
316c5150 | 175 | * Tue Dec 16 2003 Robert Love <rml@ximian.com> |
176 | - install the initscript and run chkconfig on it | |
177 | ||
e8baccca GKH |
178 | * Tue Nov 2 2003 Greg Kroah-Hartman <greg@kroah.com> |
179 | - changes due to config file name changes | |
180 | ||
bbab56ba RL |
181 | * Fri Oct 17 2003 Robert Love <rml@tech9.net> |
182 | - Make work without a build root | |
183 | - Correctly install the right files | |
184 | - Pass the RPM_OPT_FLAGS to gcc so we can build per the build policy | |
185 | - Put some prereqs in | |
8634e6d1 | 186 | - Install the hotplug symlink to udev |
bbab56ba | 187 | |
3660f0b8 PM |
188 | * Mon Jul 28 2003 Paul Mundt <lethal@linux-sh.org> |
189 | - Initial spec file for udev-0.2. |