/[packages]/updates/3/dbus/current/SPECS/dbus.spec
ViewVC logotype

Contents of /updates/3/dbus/current/SPECS/dbus.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 229297 - (show annotations) (download)
Fri Apr 6 16:28:05 2012 UTC (12 years ago) by colin
Original Path: cauldron/dbus/current/SPECS/dbus.spec
File size: 7884 byte(s)
Drop dbus.target. No longer used in systemd
1 %define bootstrap 0
2 %{?_without_bootstrap: %global bootstrap 0}
3 %{?_with_bootstrap: %global bootstrap 1}
4
5 %define expat_version 2.0.1
6
7 %define lib_major 3
8 %define lib_api 1
9 %define lib_name %mklibname dbus- %{lib_api} %{lib_major}
10 %define develname %mklibname -d dbus- %lib_api
11
12 %define enable_test 0
13 %define enable_verbose 0
14
15 %define git_url git://git.freedesktop.org/git/dbus/dbus
16
17 Summary: D-Bus message bus
18 Name: dbus
19 Version: 1.4.16
20 Release: %mkrel 2
21 URL: http://www.freedesktop.org/Software/dbus
22 Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
23 Source1: doxygen_to_devhelp.xsl
24 # (fc) 0.20-1mdk fix start/stop order (fd.o bug #11491), starts after network
25 Patch0: dbus-initscript.patch
26 # (fc) 1.0.2-5mdv disable fatal warnings on check (fd.o bug #13270)
27 Patch3: dbus-1.0.2-disable_fatal_warning_on_check.patch
28 # (bor) synchronize dbus.service with dbus.target so dependencies work
29 Patch7: dbus-1.4.4-dbus.service-before-dbus.target.patch
30
31 License: GPLv2+ or AFL
32 Group: System/Servers
33 BuildRequires: libx11-devel
34 BuildRequires: expat-devel >= %{expat_version}
35 %if !%bootstrap
36 BuildRequires: xmlto docbook-dtd412-xml
37 BuildRequires: doxygen
38 %endif
39 BuildRequires: libtool
40 BuildRequires: libcap-ng-devel
41 BuildRequires: pkgconfig(glib-2.0) >= 2.22
42 BuildRequires: pkgconfig(gio-2.0) >= 2.22
43 BuildRequires: pkgconfig(systemd)
44 Requires(pre): rpm-helper
45 Requires(preun): rpm-helper
46 Requires(post): rpm-helper
47 Requires(postun): rpm-helper
48 Requires(post): chkconfig >= 1.3.37-3mdv
49 Requires(post): %{lib_name} >= %{version}-%{release}
50 Provides: should-restart = system
51
52 %description
53 D-Bus is a system for sending messages between applications. It is
54 used both for the systemwide message bus service, and as a
55 per-user-login-session messaging facility.
56
57 %package -n %{lib_name}
58 Summary: Shared library for using D-Bus
59 Group: System/Libraries
60 Requires: dbus >= %{version}
61
62 %description -n %{lib_name}
63 D-Bus shared library.
64
65 %package -n %develname
66 Summary: Libraries and headers for D-Bus
67 Group: Development/C
68 Requires: %{name} = %{version}
69 Requires: %{lib_name} = %{version}
70 Provides: lib%{name}-1-devel = %{version}-%{release}
71 Provides: lib%{name}-devel = %{version}-%{release}
72 Provides: %{name}-devel = %{version}-%{release}
73 Conflicts: %{_lib}dbus-1_0-devel
74 Obsoletes: %mklibname -d dbus- 1 3
75
76 %description -n %develname
77 Headers and static libraries for D-Bus.
78
79 %package x11
80 Summary: X11-requiring add-ons for D-Bus
81 Group: System/Servers
82 Requires: dbus = %{version}
83
84 %package doc
85 Summary: Developer documentation for D-BUS
86 Group: Books/Computer books
87 Requires: dbus = %{version}
88 Suggests: devhelp
89 Conflicts: %develname < 1.2.20
90
91 %description doc
92 This package contains developer documentation for D-Bus along with
93 other supporting documentation such as the introspect dtd file.
94
95 %description x11
96 D-Bus contains some tools that require Xlib to be installed, those are
97 in this separate package so server systems need not install X.
98
99 %prep
100 %setup -q
101 %patch0 -p1 -b .initscript
102 #only disable in cooker to detect buggy programs
103 #patch3 -p1 -b .disable_fatal_warning_on_check
104 %patch7 -p1 -b .after_dbus_target
105
106 %build
107
108 #needed for correct localstatedir location
109 %define _localstatedir %{_var}
110
111 COMMON_ARGS="--disable-static --disable-selinux --with-system-pid-file=%{_var}/run/messagebus.pid --with-system-socket=%{_var}/run/dbus/system_bus_socket --with-session-socket-dir=/tmp --libexecdir=/%{_lib}/dbus-%{lib_api}"
112
113 #### Build once with tests to make check
114 %if %{enable_test}
115 %configure2_5x $COMMON_ARGS --enable-tests=yes \
116 --enable-verbose-mode=yes \
117 --enable-asserts=yes \
118 --disable-doxygen-docs \
119 --enable-userdb-cache \
120 --disable-xml-docs
121 DBUS_VERBOSE=1 %make
122 make check
123
124 #### Clean up and build again
125 make clean
126 %endif
127
128 %configure2_5x $COMMON_ARGS --disable-tests --disable-asserts \
129 %if !%bootstrap
130 --enable-doxygen-docs --enable-xml-docs \
131 %endif
132 %if %enable_verbose
133 --enable-verbose-mode=yes
134 %else
135 --enable-verbose-mode=no
136 %endif
137 %make
138
139 %if !%bootstrap
140 doxygen Doxyfile
141
142 xsltproc -o dbus.devhelp %{SOURCE1} doc/api/xml/index.xml
143 %endif
144
145 %check
146 make check
147
148 %install
149 rm -rf %{buildroot}
150
151 %makeinstall_std
152
153 # move lib to /, because it might be needed by hotplug script, before
154 # /usr is mounted
155 mkdir -p %{buildroot}/%{_lib} %buildroot%{_var}/lib/dbus
156 mv %{buildroot}%{_libdir}/*dbus-1*.so.* %{buildroot}/%{_lib}
157 ln -sf ../../%{_lib}/libdbus-%{lib_api}.so.%{lib_major} %{buildroot}%{_libdir}/libdbus-%{lib_api}.so
158
159 mkdir -p %{buildroot}%{_sysconfdir}/X11/xinit.d
160 cat << EOF > %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
161 # to be sourced
162 if [ -z "\$DBUS_SESSION_BUS_ADDRESS" ]; then
163 eval \`/usr/bin/dbus-launch --exit-with-session --sh-syntax\`
164 fi
165 EOF
166 chmod 755 %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
167
168 # create directory
169 mkdir %{buildroot}%{_datadir}/dbus-%{lib_api}/interfaces
170
171 # Make sure that when somebody asks for D-Bus under the name of the
172 # old SysV script, that he ends up with the standard dbus.service name
173 # now.
174 ln -s dbus.service %{buildroot}%{_unitdir}/messagebus.service
175
176 # (cg) dbus.target is no longer used/provided by systemd
177 sed -i 's/^Before=dbus.target$//' %{buildroot}%{_unitdir}/dbus.service
178 rm -rf %{buildroot}%{_unitdir}/dbus.target.wants
179
180 #add devhelp compatible helps
181 mkdir -p %{buildroot}%{_datadir}/devhelp/books/dbus
182 mkdir -p %{buildroot}%{_datadir}/devhelp/books/dbus/api
183
184 %if !%bootstrap
185 cp dbus.devhelp %{buildroot}%{_datadir}/devhelp/books/dbus
186 cp doc/dbus-specification.html %{buildroot}%{_datadir}/devhelp/books/dbus
187 cp doc/dbus-faq.html %{buildroot}%{_datadir}/devhelp/books/dbus
188 cp doc/dbus-tutorial.html %{buildroot}%{_datadir}/devhelp/books/dbus
189 cp doc/api/html/* %{buildroot}%{_datadir}/devhelp/books/dbus/api
190 %endif
191
192 #remove unpackaged file
193 find %{buildroot} -name '*.la' -delete
194
195 %clean
196 rm -rf %{buildroot}
197
198 %pre
199 %_pre_useradd messagebus / /sbin/nologin
200 %_pre_groupadd daemon messagebus
201
202 %post
203 if [ "$1" = "1" ]; then
204 /usr/bin/dbus-uuidgen --ensure
205 /sbin/chkconfig --add messagebus || /bin/true
206 fi
207
208 %postun
209 %_postun_userdel messagebus
210 %_postun_groupdel daemon messagebus
211
212 %preun
213 %_preun_service messagebus
214
215 %triggerpostun -- dbus < 0.21-4mdk
216 /sbin/chkconfig --del messagebus
217 /sbin/chkconfig --add messagebus
218
219 %triggerpostun -- dbus < 1.2.4.4permissive-2mdv
220 /sbin/chkconfig --level 7 messagebus reset
221
222
223 %files
224 %defattr(-,root,root)
225
226 %doc COPYING NEWS
227
228 %dir %{_sysconfdir}/dbus-%{lib_api}
229 %config(noreplace) %{_sysconfdir}/dbus-%{lib_api}/*.conf
230 %{_sysconfdir}/rc.d/init.d/*
231 %dir %{_sysconfdir}/dbus-%{lib_api}/system.d
232 %dir %{_sysconfdir}/dbus-%{lib_api}/session.d
233 %dir %{_var}/run/dbus
234 %dir %{_var}/lib/dbus
235 %dir %{_libdir}/dbus-1.0
236 %{_bindir}/dbus-daemon
237 %{_bindir}/dbus-send
238 %{_bindir}/dbus-cleanup-sockets
239 %{_bindir}/dbus-uuidgen
240 %{_mandir}/man*/*
241 %dir %{_datadir}/dbus-%{lib_api}
242 %{_datadir}/dbus-%{lib_api}/system-services
243 %{_datadir}/dbus-%{lib_api}/services
244 %{_datadir}/dbus-%{lib_api}/interfaces
245 # See doc/system-activation.txt in source tarball for the rationale
246 # behind these permissions
247 %dir /%{_lib}/dbus-%{lib_api}
248 %attr(4750,root,messagebus) /%{_lib}/dbus-%{lib_api}/dbus-daemon-launch-helper
249 %{_unitdir}/dbus.service
250 %{_unitdir}/messagebus.service
251 %{_unitdir}/dbus.socket
252 %{_unitdir}/multi-user.target.wants/dbus.service
253 %{_unitdir}/sockets.target.wants/dbus.socket
254
255 %files -n %{lib_name}
256 %defattr(-,root,root)
257 /%{_lib}/*dbus-%{lib_api}*.so.%{lib_major}*
258
259 %files -n %develname
260 %defattr(-,root,root)
261 %doc ChangeLog
262 %{_libdir}/libdbus-%{lib_api}.so
263 %{_libdir}/dbus-1.0/include
264 %{_libdir}/pkgconfig/dbus-%{lib_api}.pc
265 %{_includedir}/dbus-1.0
266
267 %files x11
268 %defattr(-,root,root)
269 %{_sysconfdir}/X11/xinit.d/*
270 %{_bindir}/dbus-launch
271 %{_bindir}/dbus-monitor
272
273 %files doc
274 %defattr(-,root,root)
275 %doc doc/introspect.dtd doc/introspect.xsl doc/system-activation.txt
276 %doc %{_datadir}/devhelp/books/dbus

  ViewVC Help
Powered by ViewVC 1.1.30