example-tutorial example-tutorial-de.xml, NONE, 1.1 Makefile, 1.18, 1.19 rpm-info.xml, 1.2, 1.3 example-tutorial-it.xml, 1.1, NONE
Paul W. Frields (pfrields)
fedora-docs-commits at redhat.com
Sun Nov 27 17:57:30 UTC 2005
Author: pfrields
Update of /cvs/docs/example-tutorial
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22579
Modified Files:
Makefile rpm-info.xml
Added Files:
example-tutorial-de.xml
Removed Files:
example-tutorial-it.xml
Log Message:
Ignore some of the makefile cruft at the bottom... in transition, obviously.
Also, moved "it" i18n stuff to "de" to match what's in Makefile and rpm-info.xml file.
--- NEW FILE example-tutorial-de.xml ---
<!-- $Id: -->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % FEDORA-ENTITIES-EN SYSTEM "../docs-common/common/fedora-entities-en.ent">
%FEDORA-ENTITIES-EN;
<!ENTITY BOOKNAME "example-tutorial">
<!ENTITY BOOKVERSION "0.14"> <!-- change version here -->
<!ENTITY BOOKDATE "2005-09-18"> <!-- change revision date here -->
<!ENTITY BOOKID "&BOOKNAME;-&BOOKVERSION; (&BOOKDATE;)">
<!ENTITY BUG-NUM "000000"> <!-- use this only while in draft stage -->
]>
<!-- This file is just a copy of the English version, only here for testing -->
<!-- Makefile locale capabilities. Nobody really needs to translate this -->
<!-- yet. -->
<article id="example-tutorial" lang="it">
<articleinfo>
<title>Example Tutorial</title>
<copyright>
<year>2003, 2005</year>
<holder>&FORMAL-RHI;</holder>
<holder>Tammy Fox</holder>
</copyright>
<authorgroup>
<author>
<surname>Fox</surname>
<firstname>Tammy</firstname>
</author>
<editor>
<surname>Frields</surname>
<firstname>Paul</firstname>
<othername role="mi">W.</othername>
</editor>
</authorgroup>
&LEGALNOTICE;
<revhistory>
<revision>
<revnumber>0.13</revnumber>
<date>2005-09-18</date>
<authorinitials>PaulWFrields</authorinitials>
<revdescription>
<para>
Add revision history.
</para>
</revdescription>
</revision>
</revhistory>
</articleinfo>
<section id="sn-some-section">
<title>Some Section</title>
<indexterm>
<primary>Index term</primary>
</indexterm>
<para>
This is an example section. You should not use sect1, sect2, etc., since
those tags will make sections less modular — that is, harder to
relocate without changing a lot of other markup.
</para>
<para>
Keep text within the <command>title</command> tags on the same line as the
tags. Nesting the title on a separate line from the enclosing tags results
in extra spaces in HTML rendering.
</para>
<warning>
<title>Warning</title>
<para>
Example of an admonition.
</para>
</warning>
<para>
This paragraph illustrates the use of command syntax to accomplish a
task. Note that specific filenames denoting versions should be
avoided. To install any RPM package, use the following syntax:
</para>
<screen>
<userinput><command>rpm -ivh <replaceable>pkgname</replaceable>-<replaceable>version</replaceable>.<replaceable>arch</replaceable>.rpm</command></userinput>
</screen>
<para>
Notice that the <command>screen</command> section is entirely
left-justified with no preceding indent. This is necessary to ensure
proper rendering in PDFs. Also notice that the entire
<command>command</command> has been surrounded by
<command>userinput</command> since the user types this
command. Computer output would be enclosed in
<command>computeroutput</command> tags, as in the following
sample.
</para>
<screen>
<userinput><command>grep snmptrap /etc/services</command></userinput>
<computeroutput>snmptrap 162/udp snmp-trap # Traps for SNMP</computeroutput>
</screen>
<para>
Lines should be broken <emphasis>exactly</emphasis> as they are
on-screen. Also, note that spaces inside <command>screen</command> tags
are automatically treated as non-breaking.
</para>
<tip>
<title>Fill modes and <command>screen</command> tags</title>
<para>
Using automatic or manual fill commands in Emacs/PSGML will sometimes
mangle <command>screen</command> sections. Use care when performing fill
operations, and check the results.
</para>
</tip>
</section>
<section>
<title>Callout Example</title>
<programlisting id="pl-callout">
Line 1 <co id="pl-callout-L1"/>
Line 2
Line 3
Line 4 <co id="pl-callout-L4"/>
</programlisting>
<calloutlist>
<callout arearefs="pl-callout-L1">
<para>
Here is a callout.
</para>
</callout>
<callout arearefs="pl-callout-L4">
<para>
The second callout.
</para>
</callout>
</calloutlist>
</section>
<index id="generated-index"></index>
</article>
<!--
Local variables:
mode: xml
End:
-->
Index: Makefile
===================================================================
RCS file: /cvs/docs/example-tutorial/Makefile,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Makefile 27 Nov 2005 15:42:01 -0000 1.18
+++ Makefile 27 Nov 2005 17:57:23 -0000 1.19
@@ -9,7 +9,7 @@
###############################################################################
# There is actually no "de" translation. All the '*-de*" files are just
# fodder to check the internationalization (i18n) workings for the FTP.
-# No discourtesey to an Germanic speaker is intended. -- Tommy Reynolds
+# No discourtesy to any German speaker is intended. -- Tommy Reynolds
###############################################################################
#
# Document-specific definitions.
@@ -21,7 +21,7 @@
XMLEXTRAFILES-en=
#
DOCTITLE-de = Beispiel Tutorial
-XMLEXTRAFILES-de=
+XMLEXTRAFILES-de=
#
######################################################
include ../docs-common/Makefile.common
@@ -38,8 +38,10 @@
######################################################
#
+# Note xmlformat eliminates need to munge pretty XSL
+#
#article-info-en.xml:: rpm-info.xml
-# xsltproc -o $@ --stringparam doctype articleinfo ../docs-common/packaging/bookinfo.xsl rpm-info.xml
+# xsltproc --stringparam doctype articleinfo ../docs-common/packaging/bookinfo.xsl rpm-info.xml | ../docs-common/bin/xmlformat -f ../docs-common/bin/xmlformat-fdp.conf > $@
#
#clean::
# ${RM} bookinfo.xml
@@ -47,42 +49,53 @@
######################################################
# Some packaging specific vars
-VERSION=$(shell grep BOOKID $(DOCBASE)-en.xml | sed 's/<!ENTITY BOOKID "[^0-9\.]\+//' | sed 's/ .\+//')
-DATE=${shell grep BOOKID $(DOCBASE)-en.xml | sed 's/.\+(//' | sed 's/).\+//' }
+
+# These are obviated by new standard
+#VERSION=$(shell grep BOOKID $(DOCBASE)-en.xml | sed 's/<!ENTITY BOOKID "[^0-9\.]\+//' | sed 's/ .\+//')
+DATE=$(shell grep BOOKID $(DOCBASE)-en.xml | sed 's/.\+(//' | sed 's/).\+//')
+VERSION=$(shell grep " BOOKVERSION" $(DOCBASE)-en.xml | sed 's/.\+"\([0-9\.]\+\)".\+/\1/' )
NOW=$(shell date +"%a %b %e %Y")
SPECIN=../docs-common/packaging/fedora-doc.spec.in.common
OMFIN=../docs-common/packaging/fedora-doc.omf.in.common
DESKTOPIN=../docs-common/packaging/fedora-doc.desktop.in.common
-DOCSPEC=$(PWD)/SPECS/$(DOCBASE).spec
-DOCOMF=$(PWD)/SOURCES/fedora-doc-$(DOCBASE)-C.omf
-DOCDESKTOP=$(PWD)/SOURCES/fedora-doc-$(DOCBASE).desktop
-DOCSRCTAR=$(PWD)/SOURCES/$(DOCBASE)-$(VERSION).src.tar.gz
+DOCSPEC=$(PWD)/$(DOCBASE).spec.in
+DOCOMF=$(PWD)/fedora-doc-$(DOCBASE)-C.omf
+DOCDESKTOP=$(PWD)/fedora-doc-$(DOCBASE).desktop
+DOCSRCTAR=$(PWD)/$(DOCBASE)-$(VERSION).src.tar.gz
TITLE=$(shell ../docs-common/packaging/titlegrab.py $(DOCBASE)-en.xml | sed 's/^ \+//')
######################################################
# Some RPM flags...
######################################################
-RPMFLAGS=--define "docbase $(DOCBASE)" --define "version $(VERSION)" --define "_topdir $(PWD)"
+RPMFLAGS=--define "docbase $(DOCBASE)" --define "version $(VERSION)" --define "lang $(1)" --define "_topdir $(PWD)" --define "_rpmfilename %%{NAME}-$(1)-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" --define "_sourcedir $(PWD)" --define "_rpmdir $(PWD)" --define "_specdir $(PWD)"
######################################################
-
-clean::
- rm -rf fedora-doc-$(DOCBASE)*.rpm
-
-
-rpm: clean
-#
-# Make RPM-compliant tarball of source XML and other stuff
+$(DOCBASE)-$(VERSION).src.tar.gz:: tarball
mkdir $(DOCBASE)-$(VERSION)
- find . -maxdepth 1 -type f ! \( -name '*~' -o -name 'Makefile*' \) \
+ find . -maxdepth 1 -type f ! \( -name '*~' -o -name 'Makefile*' \
+ -o -name '$(DOCBASE)*.tar.gz' \) \
| cpio -pamdv $(DOCBASE)-$(VERSION)
find . -maxdepth 1 -type d ! \( -name '$(DOCBASE)-$(VERSION)' \
-o -name 'CVS' -o -name '*~' -o -name '$(DOCBASE)*' \) \
| cpio -pamdv $(DOCBASE)-$(VERSION)
-#
-# Make RPM build tree; don't rely on local user's setup
- mkdir -p {BUILD,RPMS/noarch,SOURCES,SPECS,SRPMS}
- tar -zcvf $(DOCSRCTAR) $(DOCBASE)-$(VERSION)
+ ( cd $(DOCBASE)-$(VERSION) ; tar xzf ../$(DOCBASE)-$(VERSION).tar.gz )
+ pwd
+ tar -zcvf $(DOCBASE)-$(VERSION).src.tar.gz $(DOCBASE)-$(VERSION)/
rm -rf $(DOCBASE)-$(VERSION)/
+
+
+#$(DOCBASE)-$(1)-clean::
+clean::
+ ${RM} -rf fedora-doc-$(DOCBASE)*.rpm
+ ${RM} -rf $(DOCBASE)-$(VERSION)*.src.tar.gz
+ ${RM} -rf BUILD/ $(DOCBASE)-$(VERSION)/
+ ${RM} -f *omf *desktop *spec.in
+
+
+define rpm_template
+rpm-$(1):: clean $(DOCBASE)-$(VERSION).src.tar.gz
+# depend on source tarball and lang-specific HTML tarball
+# Make RPM build tree; don't rely on local user's setup
+ mkdir -p BUILD
#
# Make rpmlint happy with a changelog entry
# FIXME: Maybe more magic would make this stickier; pity
@@ -105,8 +118,16 @@
#
# Do the build...
#
- rpmbuild -bb $(RPMFLAGS) $(DOCSPEC)
- mv RPMS/noarch/*.rpm .
+ rpmbuild -bb $(RPMFLAGS) \
+ $(DOCSPEC)
rpmbuild --clean --rmsource $(RPMFLAGS) $(DOCSPEC)
- rm -rf {BUILD,RPMS,SOURCES,SPECS,SRPMS}
- rm -rf $(DOCBASE)-$(VERSION)
+# rm -rf {BUILD,RPMS,SOURCES,SPECS,SRPMS}
+# rm -rf $(DOCBASE)-$(VERSION)
+endef
+
+rpm:: $(foreach LANG,$(LANGUAGES),rpm-$(LANG))
+
+$(foreach LANG,${LANGUAGES},$(eval $(call rpm_template,${LANG})))
+
+showvars::
+ @echo "VERSION=$(VERSION)"
Index: rpm-info.xml
===================================================================
RCS file: /cvs/docs/example-tutorial/rpm-info.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rpm-info.xml 26 Nov 2005 21:44:18 -0000 1.2
+++ rpm-info.xml 27 Nov 2005 17:57:23 -0000 1.3
@@ -3,8 +3,19 @@
<!-- Sample document description from which we build RPMs -->
<!DOCTYPE rpm-info SYSTEM "../docs-common/packaging/rpm-info.dtd">
<rpm-info>
- <author email="tcf at redhat.com" firstname="Tammy" initials="TCF" surname="Fox" wholename="Tammy Fox"/>
- <editor email="stickster at gmail.com" firstname="Paul" surname="Frields" wholename="Paul W. Frields"/>
+ <author>
+ <wholename>Tammy Fox</wholename>
+ <email>tcf at redhat.com</email>
+ <surname>Fox</surname>
+ <firstname>Tammy</firstname>
+ <initials>TCF</initials>
+ </author>
+ <editor>
+ <wholename>Paul W. Frields</wholename>
+ <email>stickster at gmail.com</email>
+ <surname>Frields</surname>
+ <firstname>Paul</firstname>
+ </editor>
<license>
<rights>GNU FDL</rights>
<version>1.0</version>
@@ -17,21 +28,27 @@
<titles>
<translation lang="en">
<title>Example Tutorial</title>
- <desc>This is quite a feat.</desc>
+ <desc>An example tutorial for use with the Fedora Documentation Project.</desc>
</translation>
<translation lang="de">
- <title>Beispeil Tutorial</title>
- <desc>Ist idiotien</desc>
+ <title>Beispieltutorial</title>
+ <desc>Ein Beispieltutorial für Gebrauch mit dem Unterlagenprojekt Fedora.</desc>
</translation>
</titles>
<changelog order="newest-first">
- <revision date="Sat 26 Nov 2005" release="2" version="1.0.0" role="rpm">
- <author email="me at home.net" firstname="Me" initials="I" surname="Myself" wholename="Me Myself"/>
+ <pkgrevision>
+ <date>Sat 26 Nov 2005</date>
+ <pkgversion>1.0.0</pkgversion>
+ <pkgrelease>2</pkgrelease>
+ <wholename>Paul W. Frields</wholename>
+ <email>stickster at gmail.com</email>
<details>Some rpm-only changes</details>
- </revision>
- <revision date="2005-09-18" release="1" version="0.13">
- <author email="stickster at gmail.com" firstname="Paul" initials="PWF" surname="Frields" wholename="Paul W. Frields"/>
+ </pkgrevision>
+ <docrevision>
+ <date>2005-09-18</date>
+ <docversion>0.13</docversion>
+ <initials>PWF</initials>
<details>Add revision history</details>
- </revision>
+ </docrevision>
</changelog>
</rpm-info>
--- example-tutorial-it.xml DELETED ---
More information about the docs-commits
mailing list