Browse Source

dbus-1.10.22-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11183 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 5 years ago
parent
commit
c561be6f02
1 changed files with 119 additions and 38 deletions
  1. 119 38
      d/dbus/dbus-vl.spec

+ 119 - 38
d/dbus/dbus-vl.spec

@@ -1,22 +1,26 @@
 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
 
+%define _unpackaged_files_terminate_build 1
+%bcond_with systemd
+
 %define gettext_package dbus
 %define expat_version           2.0.1
 %define dbus_user_uid           81
 
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
 %define _localstatedir %{_var}
 
 Summary: D-BUS message bus
 Summary(ja): D-BUS メッセージバスシステム
 Name: dbus
-Version: 1.8.20
+Version: 1.10.22
 Release: 1%{?_dist_release}
 URL: http://www.freedesktop.org/software/dbus/
 License: AFL/GPLv2
 Group: System Environment/Libraries
 
 Source0: %{name}-%{version}.tar.gz
-Source1: doxygen_to_devhelp.xsl
+Source1: 00-start-message-bus.sh
 
 # from fedora package
 
@@ -107,7 +111,9 @@ Headers and static libraries for D-BUS.
 %setup -q
 
 %build
-autoreconf -f -i
+# Avoid rpath.
+if test -f autogen.sh; then env NOCONFIGURE=1 ./autogen.sh; else autoreconf --ve
+rbose --force --install; fi
 
 COMMON_ARGS="--enable-selinux=no \
 		--disable-libaudit \
@@ -116,47 +122,104 @@ COMMON_ARGS="--enable-selinux=no \
 		--with-dbus-user=dbus \
 		--libdir=/%{_lib} --bindir=/bin \
 		--libexecdir=/%{_lib}/dbus-1 \
+		--docdir=%{_pkgdocdir} \
 		--sysconfdir=%{_sysconfdir} --exec-prefix=/"
 
 %configure $COMMON_ARGS --disable-tests --disable-verbose-mode --disable-asserts --enable-doxygen-docs --enable-xml-docs
-%__make
-
-doxygen Doxyfile
-
-xsltproc -o dbus.devhelp %{SOURCE1} doc/api/xml/index.xml
+make V=1 %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
 
-%__make install DESTDIR=$RPM_BUILD_ROOT
-
-mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
+%__make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 
-#change the arch-deps.h include directory to /usr/lib[64] instead of /lib[64]
-sed -e 's@-I${libdir}@-I${prefix}/%{_lib}@' $RPM_BUILD_ROOT/%{_lib}/pkgconfig/dbus-1.pc > $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/dbus-1.pc
-rm -f $RPM_BUILD_ROOT/%{_lib}/pkgconfig/dbus-1.pc
+find %{buildroot} -name '*.a' -type f -delete
+find %{buildroot} -name '*.la' -type f -delete
 
-mkdir -p $RPM_BUILD_ROOT/%{_bindir}
-mv -f $RPM_BUILD_ROOT/bin/dbus-launch $RPM_BUILD_ROOT/%{_bindir}
-mkdir -p $RPM_BUILD_ROOT/%{_libdir}/dbus-1.0/include/
-mv -f $RPM_BUILD_ROOT/%{_lib}/dbus-1.0/include/* $RPM_BUILD_ROOT/%{_libdir}/dbus-1.0/include/
-rm -rf $RPM_BUILD_ROOT/%{_lib}/dbus-1.0
+install -Dp -m755 %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/00-start-message-bus.sh
 
-rm -f $RPM_BUILD_ROOT/%{_lib}/*.a
-rm -f $RPM_BUILD_ROOT/%{_lib}/*.la
+# Obsolete, but still widely used, for drop-in configuration snippets.
+install --directory %{buildroot}%{_sysconfdir}/dbus-1/session.d
+install --directory %{buildroot}%{_sysconfdir}/dbus-1/system.d
 
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus/api
+install --directory %{buildroot}%{_datadir}/dbus-1/interfaces
 
-cp dbus.devhelp $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus
-cp doc/dbus-specification.html $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus
-cp doc/dbus-faq.html $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus
-cp doc/dbus-tutorial.html $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus
-cp doc/api/html/* $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus/api
+%if %{with systemd}
+# Make sure that when somebody asks for D-Bus under the name of the
+# old SysV script, that he ends up with the standard dbus.service name
+# now.
+ln -s dbus.service %{buildroot}%{_unitdir}/messagebus.service
 
 ## %find_lang %{gettext_package}
+# Delete the old legacy sysv init script
+rm -rf %{buildroot}%{_initrddir}
+%else
+rm -rf %{buildroot}%{_sysconfdir}/systemd
+%endif
 
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/dbus-1/interfaces
+install --directory %{buildroot}/var/lib/dbus
+
+install --directory %{buildroot}%{_pkgdocdir}
+install -pm 644 -t %{buildroot}%{_pkgdocdir} \
+    doc/introspect.dtd doc/introspect.xsl doc/system-activation.txt
+
+# Make sure that the documentation shows up in Devhelp.
+install --directory %{buildroot}%{_datadir}/gtk-doc/html
+ln -s %{_pkgdocdir} %{buildroot}%{_datadir}/gtk-doc/html/dbus
+
+# Shell wrapper for installed tests, modified from Debian package.
+cat > dbus-run-installed-tests <<EOF
+#!/bin/sh
+# installed-tests wrapper for dbus. Outputs TAP format because why not
+
+set -e
+
+timeout="timeout 300s"
+ret=0
+i=0
+tmpdir=\$(mktemp --directory --tmpdir dbus-run-installed-tests.XXXXXX)
+
+for t in /%{_lib}/dbus-1/installed-tests/dbus/test-*; do
+    i=\$(( \$i + 1 ))
+    echo "# \$i - \$t ..."
+    echo "x" > "\$tmpdir/result"
+    ( set +e; \$timeout \$t; echo "\$?" > "\$tmpdir/result" ) 2>&1 | sed 's/^/#/'
+    e="\$(cat "\$tmpdir/result")"
+    case "\$e" in
+        (0)
+            echo "ok \$i - \$t"
+            ;;
+        (77)
+            echo "ok \$i # SKIP \$t"
+            ;;
+        (*)
+            echo "not ok \$i - \$t (\$e)"
+            ret=1
+            ;;
+    esac
+done
+
+rm -rf tmpdir
+echo "1..\$i"
+exit \$ret
+EOF
+
+install -pm 755 -t %{buildroot}/%{_lib}/dbus-1 dbus-run-installed-tests
+
+## vine stuff
+
+mkdir -p $RPM_BUILD_ROOT/%{_bindir}
+mv -f $RPM_BUILD_ROOT/bin/dbus-launch $RPM_BUILD_ROOT/%{_bindir}/
+
+mkdir -p %{buildroot}/%{_libdir}/dbus-1.0
+mv %{buildroot}/%{_lib}/dbus-1.0/include %{buildroot}/%{_libdir}/dbus-1.0/
+
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
+#change the arch-deps.h include directory to /usr/lib[64] instead of /lib[64]
+sed -e 's@-I${libdir}@-I${prefix}/%{_lib}@' $RPM_BUILD_ROOT/%{_lib}/pkgconfig/dbus-1.pc > $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/dbus-1.pc
+rm -f $RPM_BUILD_ROOT/%{_lib}/pkgconfig/dbus-1.pc
+
+rm -f $RPM_BUILD_ROOT/%{_lib}/dbus-1/dbus-run-installed-tests
 
 %clean
 rm -rf %{buildroot}
@@ -186,9 +249,12 @@ fi
 
 %files
 %defattr(-,root,root)
-%doc COPYING ChangeLog NEWS
+%{!?_licensedir:%global license %%doc}
+%license COPYING
+%doc AUTHORS ChangeLog HACKING NEWS README
 %dir %{_sysconfdir}/dbus-1
 %config %{_sysconfdir}/dbus-1/*.conf
+%ghost %dir /run/%{name}
 %{_sysconfdir}/rc.d/init.d/*
 %dir %{_sysconfdir}/dbus-1/system.d
 %dir %{_sysconfdir}/dbus-1/session.d
@@ -199,15 +265,21 @@ fi
 /bin/dbus-cleanup-sockets
 /bin/dbus-monitor
 /bin/dbus-run-session
+/bin/dbus-test-tool
+/bin/dbus-update-activation-environment
 /bin/dbus-uuidgen
 /%{_lib}/*dbus-1*.so.*
-%{_datadir}/man/man*/dbus-cleanup-sockets.1.gz
-%{_datadir}/man/man*/dbus-daemon.1.gz
-%{_datadir}/man/man*/dbus-monitor.1.gz
-%{_datadir}/man/man*/dbus-run-session.1.gz
-%{_datadir}/man/man*/dbus-send.1.gz
-%{_datadir}/man/man*/dbus-uuidgen.1.gz
+%{_mandir}/man*/dbus-cleanup-sockets.1.gz
+%{_mandir}/man*/dbus-daemon.1.gz
+%{_mandir}/man*/dbus-monitor.1.gz
+%{_mandir}/man*/dbus-run-session.1.gz
+%{_mandir}/man*/dbus-send.1.gz
+%{_mandir}/man1/dbus-test-tool.1.gz
+%{_mandir}/man1/dbus-update-activation-environment.1.gz
+%{_mandir}/man*/dbus-uuidgen.1.gz
 %dir %{_datadir}/dbus-1
+%{_datadir}/dbus-1/session.conf
+%{_datadir}/dbus-1/system.conf
 %{_datadir}/dbus-1/services
 %{_datadir}/dbus-1/system-services
 %{_datadir}/dbus-1/interfaces
@@ -220,16 +292,22 @@ fi
 %{_libdir}/dbus-1.0/include
 %{_libdir}/pkgconfig/*
 %{_includedir}/*
-%{_datadir}/devhelp/books/dbus
 
 %files x11
 %defattr(-,root,root)
 %{_bindir}/dbus-launch
 %{_datadir}/man/man*/dbus-launch.1.gz
+%{_sysconfdir}/X11/xinit/xinitrc.d/00-start-message-bus.sh
 
 %files doc
 %defattr(-,root,root)
-%doc %{_docdir}/dbus
+%{_pkgdocdir}/*
+%{_datadir}/gtk-doc
+%exclude %{_pkgdocdir}/AUTHORS
+%exclude %{_pkgdocdir}/ChangeLog
+%exclude %{_pkgdocdir}/HACKING
+%exclude %{_pkgdocdir}/NEWS
+%exclude %{_pkgdocdir}/README
 
 # compat32
 %if %{build_compat32}
@@ -243,6 +321,9 @@ fi
 %endif
 
 %changelog
+* Sun Sep 10 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.10.22-1
+- new upstream release.
+
 * Sun Aug 02 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.20-1
 - new upstream release