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