Author: pfrields
Update of /cvs/docs/docs-common/packaging
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11891/packaging
Modified Files:
fedora-doc-common.spec khelpcenter-plugin.xsl spec.xsl
Log Message:
Holy smoke, it REALLY works!
Index: fedora-doc-common.spec
===================================================================
RCS file: /cvs/docs/docs-common/packaging/fedora-doc-common.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- fedora-doc-common.spec 28 Dec 2005 20:02:21 -0000 1.4
+++ fedora-doc-common.spec 30 Dec 2005 07:11:22 -0000 1.5
@@ -31,6 +31,17 @@
%install
rm -rf $RPM_BUILD_ROOT
+install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/bin/
+for i in xmlformat xmldiff copy-figs bulkbuild tidy-bowl
+do
+ install -m 755 $RPM_BUILD_DIR/%{name}-%{release}/bin/${i} \
+ $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/bin/
+done
+for i in xmlformat-fdp.conf xmldiff.pl active
+do
+ install -m 644 $RPM_BUILD_DIR/%{name}-%{release}/bin/${i} \
+ $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/bin/
+done
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/common/
install -m 644 $RPM_BUILD_DIR/%{name}-%{release}/common/*.{xml,ent} \
$RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/common/
@@ -47,6 +58,12 @@
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/packaging/
install -m 644 $RPM_BUILD_DIR/%{name}-%{release}/packaging/*.{xsl,dtd} \
$RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/packaging/
+install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/xsl/
+install -m 644 $RPM_BUILD_DIR/%{name}-%{release}/xsl/* \
+ $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/xsl/
+install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/images/
+install -m 644 $RPM_BUILD_DIR/%{name}-%{release}/images/* \
+ $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/docs-common/images/
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/apps/khelpcenter/plugins/Fedora
install -m 644 $RPM_BUILD_DIR/%{name}-%{release}/packaging/khelpcenter-fdp.directory $RPM_BUILD_ROOT/%{_datadir}/apps/khelpcenter/plugins/Fedora/.directory
install -m 644 $RPM_BUILD_DIR/%{name}-%{release}/Makefile.common \
@@ -61,10 +78,13 @@
%defattr(-, root, root,-)
%docdir %{_datadir}/fedora/doc/docs-common/common/
%{_datadir}/fedora/doc/docs-common/Makefile.common
+%{_datadir}/fedora/doc/docs-common/bin/*
%{_datadir}/fedora/doc/docs-common/common/*
%{_datadir}/fedora/doc/docs-common/css/*
+%{_datadir}/fedora/doc/docs-common/images/*
%{_datadir}/fedora/doc/docs-common/packaging/*
%{_datadir}/fedora/doc/docs-common/stylesheet-images/*
+%{_datadir}/fedora/doc/docs-common/xsl/*
%{_datadir}/apps/khelpcenter/plugins/Fedora/.directory
%{_sysconfdir}/xdg/menus/applications-merged/*
Index: khelpcenter-plugin.xsl
===================================================================
RCS file: /cvs/docs/docs-common/packaging/khelpcenter-plugin.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- khelpcenter-plugin.xsl 29 Dec 2005 22:37:32 -0000 1.2
+++ khelpcenter-plugin.xsl 30 Dec 2005 07:11:22 -0000 1.3
@@ -9,7 +9,7 @@
<xsl:param name="docbase" select="'example-tutorial'" />
<xsl:template match="/">[Desktop Entry]
-DocPath=help:/<xsl:value-of select="$docbase"/>/index.html
+DocPath=help:/fedora-doc-<xsl:value-of select="$docbase"/>/index.html
Name=<xsl:value-of select="/rpm-info/titles/translation[@lang='en']/title"/>
<xsl:for-each select="/rpm-info/titles/translation">Name[<xsl:value-of
Index: spec.xsl
===================================================================
RCS file: /cvs/docs/docs-common/packaging/spec.xsl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- spec.xsl 29 Dec 2005 22:37:32 -0000 1.9
+++ spec.xsl 30 Dec 2005 07:11:22 -0000 1.10
@@ -11,6 +11,7 @@
<xsl:template match="/">
# Fedora Documentation Specfile
%define docbase <xsl:value-of select="$docbase"/>
+%{!?fdpdir:%{expand:%%define localbuild 1;%%define fdpdir %{_datadir}/fedora/doc}}
Summary: Fedora Documentation: %{docbase}
Name: fedora-doc-%{docbase}
@@ -33,7 +34,10 @@
Requires: scrollkeeper >= 0.3.11
Requires: fedora-doc-common
BuildRequires: xmlto
-BuildRequires: kdelibs
+BuildRequires: kdelibs
+# Used if builder does not specify common files locally
+%{?localbuild:%{expand:BuildRequires: fedora-doc-common}}
+
%description
<xsl:value-of select="/rpm-info/titles/translation[@lang='en']/desc" />
@@ -47,30 +51,81 @@
%prep
%setup -q -n %{docbase}-%{version}
-for i in $RPM_BUILD_DIR/%{docbase}-%{version}/{%{docbase}*.xml,Makefile}
+#export GLOBIGNORE=rpm-info.xml
+for i in $RPM_BUILD_DIR/%{docbase}-%{version}/{*.xml,Makefile}
do
- %{__sed} -i 's;../docs-common;../../../docs-common;' "$i"
+ %{__sed} -i 's;\.\./docs-common;%{fdpdir}/docs-common;g' "$i"
done
%build
-make html
-# /bin/rm -r $RPM_BUILD_ROOT
-# /usr/bin/install -d -m 0755 $RPM_BUILD_ROOT/%{_datadir}/omf/%{name}
+make html FDPDIR=%{fdpdir}
+<xsl:for-each select="/rpm-info/titles/translation">
+mkdir kde-<xsl:value-of select="@lang"/>
+meinproc --output kde-<xsl:value-of select="@lang"/>/index.docbook \
+ --cache kde-<xsl:value-of select="@lang"/>/index.cache.bz2 \
+ %{docbase}-<xsl:value-of select="@lang"/>.xml
+</xsl:for-each>
+
+
+%install
+for DIR in $RPM_BUILD_ROOT%{_datadir}/applications/kde \
+ $RPM_BUILD_ROOT%{_datadir}/apps/khelpcenter/plugins/Fedora \
+ $RPM_BUILD_ROOT%{_datadir}/omf/fedora-doc-%{docbase} \
+ <xsl:for-each select="/rpm-info/titles/translation">$RPM_BUILD_ROOT%{_docdir}/HTML/<xsl:value-of select="@lang"/>/fedora-doc-%{docbase} \
+ $RPM_BUILD_ROOT%{_datadir}/fedora/doc/fedora-doc-%{docbase}/<xsl:choose><xsl:when test="@lang = 'en'">C</xsl:when><xsl:otherwise><xsl:value-of select="@lang"/></xsl:otherwise></xsl:choose> \
+ </xsl:for-each>; do
+ install -d -m 755 "$DIR"
+done
+export GLOBIGNORE=rpm-info.xml
+desktop-file-install --vendor fedora \
+ --dir $RPM_BUILD_ROOT%{_datadir}/applications \
+ --add-category X-Fedora \
+ %{SOURCE1}
+install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/kde
+install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/apps/khelpcenter/plugins/Fedora
+install -m 644 *-en.xml $RPM_BUILD_ROOT%{_datadir}/fedora/doc/fedora-doc-%{docbase}/C
+<xsl:for-each select="/rpm-info/titles/translation">install -m 644 %{SOURCE<xsl:value-of select="position()+3"/>} $RPM_BUILD_ROOT%{_datadir}/omf/fedora-doc-%{docbase}
+<xsl:if test="@lang != 'en'">install -m 644 *-<xsl:value-of select="@lang"/>.xml $RPM_BUILD_ROOT%{_datadir}/fedora/doc/fedora-doc-%{docbase}/<xsl:value-of select="@lang"/></xsl:if>
+pushd %{docbase}-<xsl:value-of select="@lang"/>
+find . -type d | xargs -i \
+ install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/HTML/<xsl:value-of select="@lang"/>/fedora-doc-%{docbase}/{}
+find . -type f | xargs -i \
+ install -D -m 644 {} $RPM_BUILD_ROOT%{_docdir}/HTML/<xsl:value-of select="@lang"/>/fedora-doc-%{docbase}/{}
+popd
+</xsl:for-each>
+
%clean
/bin/rm -rf $RPM_BUILD_ROOT
+
<xsl:for-each select="/rpm-info/titles/translation">
%post <xsl:if test="@lang != 'en'"><xsl:value-of select="@lang"/></xsl:if>
/usr/bin/scrollkeeper-update || true
%postun <xsl:if test="@lang != 'en'"><xsl:value-of select="@lang"/></xsl:if>
/usr/bin/scrollkeeper-update || true
+</xsl:for-each>
-%files <xsl:if test="@lang != 'en'"><xsl:value-of select="@lang"/></xsl:if>
+%files
%defattr(-, root, root, -)
-</xsl:for-each>
+%{_datadir}/fedora/doc/fedora-doc-%{docbase}/C/*
+%{_datadir}/applications/*.desktop
+%{_datadir}/applications/kde/*.desktop
+%{_datadir}/apps/khelpcenter/plugins/Fedora/*.desktop
+%{_datadir}/omf/fedora-doc-%{docbase}/fedora-doc-%{docbase}-C.omf
+%{_docdir}/HTML/en/fedora-doc-%{docbase}/*
+
+
+<xsl:for-each select="/rpm-info/titles/translation"><xsl:if test="@lang != 'en'">
+%files <xsl:value-of select="@lang"/>
+%defattr(-, root, root, -)
+%{_datadir}/fedora/doc/fedora-doc-%{docbase}/<xsl:value-of select="@lang"/>/*
+%{_datadir}/omf/fedora-doc-%{docbase}/fedora-doc-%{docbase}-<xsl:value-of select="@lang"/>.omf
+%{_docdir}/HTML/<xsl:value-of select="@lang"/>/fedora-doc-%{docbase}/*
+</xsl:if></xsl:for-each>
+
%changelog
<xsl:for-each select="/rpm-info/changelog/revision"><xsl:if