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