/[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 321907 - (show annotations) (download)
Sun Nov 25 22:10:39 2012 UTC (11 years, 5 months ago) by colin
Original Path: cauldron/dbus/current/SPECS/dbus.spec
File size: 6345 byte(s)
- Drop very old upgrade triggers
- Remove reference to legacy dbus.target
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
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.6.8
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 # (cg) See https://bugs.freedesktop.org/show_bug.cgi?id=56043
24 Patch0: dbus-1.6.8-dbus-spawn-ignore-sigpipe.patch
25 License: GPLv2+ or AFL
26 Group: System/Servers
27 BuildRequires: libx11-devel
28 BuildRequires: expat-devel >= %{expat_version}
29 %if !%bootstrap
30 BuildRequires: xmlto docbook-dtd412-xml
31 BuildRequires: doxygen
32 %endif
33 BuildRequires: libtool
34 BuildRequires: libcap-ng-devel
35 BuildRequires: pkgconfig(gio-2.0) >= 2.24
36 BuildRequires: pkgconfig(glib-2.0) >= 2.24
37 BuildRequires: pkgconfig(libsystemd-daemon) >= 32
38 BuildRequires: pkgconfig(libsystemd-login) >= 32
39 Requires(post): rpm-helper >= 0.24.8-1
40 Requires(preun): rpm-helper >= 0.24.8-1
41 Requires(post): chkconfig >= 1.3.37-3
42 Requires(post): %{lib_name} >= %{version}-%{release}
43 Provides: should-restart = system
44
45 %description
46 D-Bus is a system for sending messages between applications. It is
47 used both for the systemwide message bus service, and as a
48 per-user-login-session messaging facility.
49
50 %package -n %{lib_name}
51 Summary: Shared library for using D-Bus
52 Group: System/Libraries
53 Requires: dbus >= %{version}
54 Obsoletes: %{_lib}dbus-1_3 < 1.6.0
55
56 %description -n %{lib_name}
57 D-Bus shared library.
58
59 %package -n %develname
60 Summary: Libraries and headers for D-Bus
61 Group: Development/C
62 Requires: %{name} = %{version}
63 Requires: %{lib_name} = %{version}
64 Provides: lib%{name}-1-devel = %{version}-%{release}
65 Provides: lib%{name}-devel = %{version}-%{release}
66 Provides: %{name}-devel = %{version}-%{release}
67 Conflicts: %{_lib}dbus-1_0-devel
68 Obsoletes: %{mklibname -d dbus- 1 3} < 1.6.0
69 Obsoletes: %{_lib}dbus-1-devel < 1.6.0
70
71 %description -n %develname
72 Headers and static libraries for D-Bus.
73
74 %package x11
75 Summary: X11-requiring add-ons for D-Bus
76 Group: System/Servers
77 Requires: dbus = %{version}
78
79 %package doc
80 Summary: Developer documentation for D-BUS
81 Group: Documentation
82 Requires: dbus = %{version}
83 Suggests: devhelp
84 BuildArch: noarch
85 Conflicts: libdbus-1-devel < 1.2.20
86 Conflicts: lib64dbus-1-devel < 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 %apply_patches
99
100 %build
101
102 COMMON_ARGS="--disable-static --disable-selinux --with-system-socket=/run/dbus/system_bus_socket --libexecdir=%{_libexecdir}/dbus-%{lib_api}"
103
104 #### Build once with tests to make check
105 %if %{enable_test}
106 %configure2_5x $COMMON_ARGS --enable-tests=yes --enable-systemd \
107 --enable-verbose-mode=yes \
108 --enable-asserts=yes \
109 --disable-doxygen-docs \
110 --enable-userdb-cache \
111 --disable-xml-docs
112 DBUS_VERBOSE=1 %make
113 make check
114
115 #### Clean up and build again
116 make clean
117 %endif
118
119 %configure2_5x $COMMON_ARGS --disable-tests --disable-asserts \
120 %if !%bootstrap
121 --enable-doxygen-docs --enable-xml-docs \
122 --htmldir=%{_datadir}/devhelp/books/%{name} \
123 %endif
124 %if %enable_verbose
125 --enable-verbose-mode=yes
126 %else
127 --enable-verbose-mode=no
128 %endif
129 %make
130
131 %check
132 make check
133
134 %install
135 %makeinstall_std
136
137 mkdir -p %{buildroot}%{_sysconfdir}/X11/xinit.d
138 cat << EOF > %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
139 # to be sourced
140 if [ -z "\$DBUS_SESSION_BUS_ADDRESS" ]; then
141 eval \`/usr/bin/dbus-launch --exit-with-session --sh-syntax\`
142 fi
143 EOF
144 chmod 755 %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
145
146 # create directory
147 mkdir %{buildroot}%{_datadir}/dbus-%{lib_api}/interfaces
148
149 # Make sure that when somebody asks for D-Bus under the name of the
150 # old SysV script, that he ends up with the standard dbus.service name
151 # now.
152 ln -s dbus.service %{buildroot}%{_unitdir}/messagebus.service
153
154 # This is legacy
155 rm -rf %{buildroot}%{_unitdir}/dbus.target.wants
156
157 # link devhelp docs in docdir
158 mkdir -p %{buildroot}%{_docdir}/%{name}-doc
159 pushd %{buildroot}%{_datadir}/devhelp/books/%{name}
160 for f in *; do
161 ln -s ../../devhelp/books/%{name}/$f %{buildroot}%{_docdir}/%{name}-doc
162 done
163 popd
164
165 #remove unpackaged file
166 find %{buildroot} -name '*.la' -delete
167
168 %pre
169 %_pre_useradd messagebus / /sbin/nologin
170 %_pre_groupadd daemon messagebus
171
172 %post
173 if [ "$1" = "1" ]; then
174 /usr/bin/dbus-uuidgen --ensure
175 /sbin/chkconfig --add messagebus || /bin/true
176 fi
177
178 %postun
179 %_postun_userdel messagebus
180 %_postun_groupdel daemon messagebus
181
182 %preun
183 %_preun_service messagebus
184
185 %files
186 %doc COPYING NEWS
187 %dir %{_sysconfdir}/dbus-%{lib_api}
188 %exclude %{_sysconfdir}/rc.d/init.d/*
189 %config(noreplace) %{_sysconfdir}/dbus-%{lib_api}/*.conf
190 %dir %{_sysconfdir}/dbus-%{lib_api}/system.d
191 %dir %{_sysconfdir}/dbus-%{lib_api}/session.d
192 %dir %{_localstatedir}/lib/dbus
193 %dir %{_libdir}/dbus-1.0
194 %{_bindir}/dbus-daemon
195 %{_bindir}/dbus-send
196 %{_bindir}/dbus-cleanup-sockets
197 %{_bindir}/dbus-uuidgen
198 %{_mandir}/man*/*
199 %dir %{_datadir}/dbus-%{lib_api}
200 %{_datadir}/dbus-%{lib_api}/system-services
201 %{_datadir}/dbus-%{lib_api}/services
202 %{_datadir}/dbus-%{lib_api}/interfaces
203 # See doc/system-activation.txt in source tarball for the rationale
204 # behind these permissions
205 %dir %{_libexecdir}/dbus-%{lib_api}
206 %attr(4750,root,messagebus) %{_libexecdir}/dbus-%{lib_api}/dbus-daemon-launch-helper
207 %{_unitdir}/dbus.service
208 %{_unitdir}/messagebus.service
209 %{_unitdir}/dbus.socket
210 %{_unitdir}/multi-user.target.wants/dbus.service
211 %{_unitdir}/sockets.target.wants/dbus.socket
212
213 %files -n %{lib_name}
214 %{_libdir}/*dbus-%{lib_api}*.so.%{lib_major}*
215
216 %files -n %develname
217 %doc ChangeLog
218 %{_libdir}/libdbus-%{lib_api}.so
219 %{_libdir}/dbus-1.0/include
220 %{_libdir}/pkgconfig/dbus-%{lib_api}.pc
221 %{_includedir}/dbus-1.0
222
223 %files x11
224 %{_sysconfdir}/X11/xinit.d/*
225 %{_bindir}/dbus-launch
226 %{_bindir}/dbus-monitor
227
228 %files doc
229 %doc %{_datadir}/devhelp/books/dbus
230 %{_docdir}/%{name}-doc

  ViewVC Help
Powered by ViewVC 1.1.30