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

  ViewVC Help
Powered by ViewVC 1.1.30