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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 50073 - (hide annotations) (download)
Fri Feb 11 12:34:15 2011 UTC (13 years, 2 months ago) by misc
Original Path: cauldron/dbus/current/SPECS/dbus.spec
File size: 7713 byte(s)
SILENT increase release

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

  ViewVC Help
Powered by ViewVC 1.1.30