include docs

This commit is contained in:
Matthias Clasen 2006-11-26 05:12:17 +00:00
parent 49f4139b6c
commit 2c2a056858
3 changed files with 76 additions and 3 deletions

View File

@ -0,0 +1,11 @@
--- dbus-1.0.1/Doxyfile.in.generate-xml-docs 2006-11-25 23:42:59.000000000 -0500
+++ dbus-1.0.1/Doxyfile.in 2006-11-25 23:43:12.000000000 -0500
@@ -133,7 +133,7 @@
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
-GENERATE_XML = NO
+GENERATE_XML = YES
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------

View File

@ -8,9 +8,10 @@
Summary: D-BUS message bus Summary: D-BUS message bus
Name: dbus Name: dbus
Version: 1.0.1 Version: 1.0.1
Release: 1%{?dist} Release: 2%{?dist}
URL: http://www.freedesktop.org/software/dbus/ URL: http://www.freedesktop.org/software/dbus/
Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
Source1: doxygen_to_devhelp.xsl
License: AFL/GPL License: AFL/GPL
Group: System Environment/Libraries Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-root BuildRoot: %{_tmppath}/%{name}-root
@ -24,6 +25,9 @@ BuildRequires: audit-libs-devel >= 0.9
BuildRequires: libX11-devel BuildRequires: libX11-devel
BuildRequires: libcap-devel BuildRequires: libcap-devel
BuildRequires: gettext BuildRequires: gettext
BuildRequires: doxygen
BuildRequires: xmlto
BuildRequires: libxslt
Requires: libselinux >= %{libselinux_version} Requires: libselinux >= %{libselinux_version}
Requires: libxml2-python Requires: libxml2-python
@ -33,6 +37,7 @@ Patch0: dbus-0.61-selinux-avc-audit.patch
Patch1: dbus-0.60-start-early.patch Patch1: dbus-0.60-start-early.patch
Patch2: dbus-0.92-audit-system.patch Patch2: dbus-0.92-audit-system.patch
Patch3: dbus-1.0.1-pthread-holder-fix.patch Patch3: dbus-1.0.1-pthread-holder-fix.patch
Patch4: dbus-1.0.1-generate-xml-docs.patch
%description %description
@ -67,6 +72,7 @@ in this separate package so server systems need not install X.
%patch1 -p1 -b .start-early %patch1 -p1 -b .start-early
%patch2 -p1 -b .audit_system %patch2 -p1 -b .audit_system
%patch3 -p1 -b .pthread-holder-fix %patch3 -p1 -b .pthread-holder-fix
%patch4 -p1 -b .generate-xml-docs
autoreconf -f -i autoreconf -f -i
%build %build
@ -81,9 +87,13 @@ make clean
# leave verbose mode so people can debug their apps but make sure to # leave verbose mode so people can debug their apps but make sure to
# turn it off on stable releases with --disable-verbose-mode # turn it off on stable releases with --disable-verbose-mode
%configure $COMMON_ARGS --disable-tests --disable-asserts %configure $COMMON_ARGS --disable-tests --disable-asserts --enable-doxygen-docs --enable-xml-docs
make make
doxygen Doxyfile
xsltproc -o dbus.devhelp %{SOURCE1} doc/api/xml/index.xml
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
@ -103,6 +113,15 @@ mv -f $RPM_BUILD_ROOT/%{_lib}/dbus-1.0/include/* $RPM_BUILD_ROOT/%{_libdir}/dbus
rm -f $RPM_BUILD_ROOT/%{_lib}/*.a rm -f $RPM_BUILD_ROOT/%{_lib}/*.a
rm -f $RPM_BUILD_ROOT/%{_lib}/*.la rm -f $RPM_BUILD_ROOT/%{_lib}/*.la
mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus
mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books/dbus/api
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
## %find_lang %{gettext_package} ## %find_lang %{gettext_package}
%clean %clean
@ -147,7 +166,6 @@ fi
%{_datadir}/man/man*/* %{_datadir}/man/man*/*
%{_datadir}/dbus-1/services %{_datadir}/dbus-1/services
%files x11 %files x11
%defattr(-,root,root) %defattr(-,root,root)
@ -160,8 +178,12 @@ fi
%{_libdir}/dbus-1.0/include/ %{_libdir}/dbus-1.0/include/
%{_libdir}/pkgconfig/dbus-1.pc %{_libdir}/pkgconfig/dbus-1.pc
%{_includedir}/* %{_includedir}/*
%{_datadir}/devhelp/books/dbus
%changelog %changelog
* Sun Nov 26 2006 Matthias Clasen <mclasen@redhat.com> - 1.0.1-2
- Include docs, and make them show up in devhelp
* Mon Nov 20 2006 Ray Strode <rstrode@redhat.com> - 1.0.1-1 * Mon Nov 20 2006 Ray Strode <rstrode@redhat.com> - 1.0.1-1
- Update to 1.0.1 - Update to 1.0.1
- Apply patch from Thiago Macieira <thiago@kde.org> to - Apply patch from Thiago Macieira <thiago@kde.org> to

40
doxygen_to_devhelp.xsl Normal file
View File

@ -0,0 +1,40 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:output method="xml" version="1.0" indent="yes"/>
<xsl:param name="prefix"></xsl:param>
<xsl:template match="/">
<book title="D-Bus: A system for interprocess communication"
name="dbus"
link="dbus-tutorial.html">
<chapters>
<sub name="Tutorial" link="{$prefix}dbus-tutorial.html"/>
<sub name="FAQ" link="{$prefix}dbus-faq.html"/>
<sub name="Specification" link="{$prefix}dbus-specification.html"/>
<sub name="API Reference" link="{$prefix}api/index.html"/>
</chapters>
<functions>
<xsl:apply-templates select="doxygenindex/compound[@kind='group']/member[@kind='function']"/>
</functions>
</book>
</xsl:template>
<xsl:template match="member">
<xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
<xsl:if test="starts-with($name,'dbus') or starts-with($name, 'DBus')">
<xsl:param name="refid"><xsl:value-of select="@refid"/></xsl:param>
<xsl:if test="starts-with($refid,'group__') and contains($refid, '_1')">
<xsl:param name="before"><xsl:value-of select="substring-before($refid,'_1')"/></xsl:param>
<xsl:param name="after"><xsl:value-of select="substring-after($refid,'_1')"/></xsl:param>
<xsl:param name="link"><xsl:value-of select="$before"/>.html#<xsl:value-of select="$after"/></xsl:param>
<function name="{$name}" link="{$prefix}api/{$link}"/>
</xsl:if>
</xsl:if>
</xsl:template>
</xsl:stylesheet>