diff --git a/.docbook-simple.metadata b/.docbook-simple.metadata new file mode 100644 index 0000000..954fd22 --- /dev/null +++ b/.docbook-simple.metadata @@ -0,0 +1 @@ +8d8556b313969c9f494d2f9641e4d81e79c94f3d SOURCES/docbook-simple-1.1.zip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1643aeb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/docbook-simple-1.1.zip diff --git a/SOURCES/docbook-simple.README.redhat b/SOURCES/docbook-simple.README.redhat new file mode 100644 index 0000000..3487076 --- /dev/null +++ b/SOURCES/docbook-simple.README.redhat @@ -0,0 +1,108 @@ +docbook-simple - basic distribution howto +----------------------------------------- + +The Simplified DocBook XML DTD is a small subset of the DocBook XML +DTD having only ~100 elements. The full version has ~380 elements. + +Online documentation of the content models for this dtd is here: + http://www.oasis-open.org/docbook/xml/simple/ + +This DTD only supports simple documents, e.g. 'article' or 'refentry', +rather than the more complex documents like 'book' or 'set' which is +supported by the full docbook DTD. + +Simplified DocBook documents can be viewed in a browser (w/o requiring +XSLT processing) and can be styled with a CSS stylesheet, which can be +specified in the document itself with an XML Processing Instruction +(PI) of the form: + + + +The default stylesheet generates quite plain output and should likely +be customized. Section III below gives an example of how to reference +the CSS stylesheet in your source document. + + +I. How To Write An Article That Uses The Simplified Docbook DTD: +================================================================ + +Use the following prolog in your XML file to use the Simplified +DocBook Document Type in your document: + + + +
+... +
+ + +II. How To Write A Manual Page That Uses The Simplified DocBook DTD: +==================================================================== + +The sdocbookref.dtd provides a simplified subset of DocBook to support +writing manual pages. + +Use the following prolog in your XML file to use the Simplified +DocBook Document Type in your document: + + + + +... + + + +III. How To Associate A CSS Stylesheet To Your Simplified Docbook Document: +=========================================================================== + +Simply place the xml-stylesheet PI in the prolog of the doc as follows: + + + + +
+... +
+ +You may place the stylesheet wherever you please, as long as the path +to the stylesheet in the PI is correct with respect to the HTML output +files. + + +IV. Generating HTML From Your XML Source Document: +================================================== + +Before processing your document, you might wish to take a look at some +of the HTML stylesheet parameters you can set to customize the output +HTML. These parameters are all explained in the reference +documentation included with the docbook-style-xsl package. In +addition, you may wish to take a peek at the +/usr/share/sgml/docbook/xsl-stylesheets/html/param.xsl file, which +lists the defaults for the HTML parameters. + +For example, to generate a bunch of linked HTML pages (aka chunked) +from your XML source document while setting the parameter +'toc.section.depth' to a value of '2', you can issue an xsltproc +command like the following:1 + +xsltproc --stringparam toc.section.depth 2 \ + /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl \ + sourcefile.xml + +*Note: I do not cover the conversion to print output in this README, + as the print toolchains are slightly more complicated. + + +Feel free to offer comments, suggestions, or complaints. + + Mark + + + -- Mark Johnson , Tue Sep 7 15:51:51 EDT 2004 + --changes for 1.1 by Ondrej Vasik , Thu May 24 2007 diff --git a/SOURCES/docbook-simple.cat b/SOURCES/docbook-simple.cat new file mode 100644 index 0000000..ecbe356 --- /dev/null +++ b/SOURCES/docbook-simple.cat @@ -0,0 +1,11 @@ +-- BEGIN OASIS TR 9401:1997 catalog for docbook-simple V1.1 -- +OVERRIDE YES +PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.1//EN" "/usr/share/xml/docbook/simple/1.1/sdocbook.dtd" +PUBLIC "-//OASIS//DTD Simplified DocBook XML Customization V1.1//EN" "/usr/share/xml/docbook/simple/1.1/sdocbook-custom.dtd" +PUBLIC "-//OASIS//DTD Simplified DocBook RefEntry XML V1.1//EN" "/usr/share/xml/docbook/simple/1.1/sdocbookref.dtd" +PUBLIC "-//OASIS//DTD Simplified DocBook RefEntry XML CustomizationV1.1//EN" "/usr/share/xml/docbook/simple/1.1/sdocbookref-custom.dtd" +SYSTEM "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd" "/usr/share/xml/docbook/simple/1.1/sdocbook.dtd" +SYSTEM "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook-custom.dtd" "/usr/share/xml/docbook/simple/1.1/sdocbook-custom.dtd" +SYSTEM "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbookref.dtd" "/usr/share/xml/docbook/simple/1.1/sdocbookref.dtd" +SYSTEM "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbookref-custom.dtd" "/usr/share/xml/docbook/simple/1.1/sdocbookref-custom.dtd" +-- END OASIS TR 9401:1997 catalog for docbook-simple V1.1 -- diff --git a/SOURCES/docbook-simple.xml b/SOURCES/docbook-simple.xml new file mode 100644 index 0000000..952e8fe --- /dev/null +++ b/SOURCES/docbook-simple.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SPECS/docbook-simple.spec b/SPECS/docbook-simple.spec new file mode 100644 index 0000000..48999d1 --- /dev/null +++ b/SPECS/docbook-simple.spec @@ -0,0 +1,214 @@ +Name: docbook-simple +Version: 1.1 +Release: 12%{?dist} +Group: Applications/Text +Summary: Simplified DocBook is a small subset of the DocBook XML DTD +License: Freely redistributable without restriction +URL: http://www.oasis-open.org/docbook/xml/simple/ +Source0: http://www.docbook.org/xml/simple/1.1/%{name}-%{version}.zip +Source1: %{name}.README.redhat +Source2: %{name}.xml +Source3: %{name}.cat +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildArch: noarch +BuildRequires: unzip +Requires: sgml-common +Requires(post): sed +Requires(post): libxml2 >= 2.4.8 +Requires(postun): libxml2 >= 2.4.8 +Requires: docbook-dtds + +%description +Simplified DocBook is an attempt to provide a proper subset of DocBook +that is simultaneously smaller and still useful. Documents written in +the subset must be 100% legal DocBook documents. This is a subset for +single documents (articles, white papers, etc.), so there's no need +for books or sets, just 'articles'. Simplified DocBook documents are +viewable in online browsers if styled with CSS. (it's XML not SGML). + + +%prep +# splatter the files into a version-numbered directory +%setup -q -c -n %{version} + +# see http://rpm-devel.colug.net/max-rpm/s1-rpm-inside-macros.html +# setup -c creates the dir then changes to it to expand SOURCE0 + +%build + +%install + +rm -rf $RPM_BUILD_ROOT + +########## install versioned-numbered directory of dtd files ############ + +DESTDIR=$RPM_BUILD_ROOT%{_datadir}/xml/docbook/simple +mkdir -p $DESTDIR +cp -a ../%{version} $DESTDIR + +########## install package catalogs ################ + +XML_CAT_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/xml +mkdir -p $XML_CAT_DIR +install -p -m 644 %{SOURCE2} $XML_CAT_DIR + +SGML_CAT_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/sgml +mkdir -p $SGML_CAT_DIR +install -p -m 644 %{SOURCE3} $SGML_CAT_DIR + +####### FIXME: must copy README.redhat to source directory ######## +####### for %doc to find it, ${SOURCE1} doesn't work ######## + +cp -p %{SOURCE1} ./README + +%clean +rm -rf $RPM_BUILD_ROOT +rm -rf ../%{version} + +%files +%defattr (-,root,root,-) +%doc sdocbook.css +%doc README +%dir %{_datadir}/xml/docbook/simple/ +%{_datadir}/xml/docbook/simple/%{version} +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook-simple.cat +%config(noreplace) %{_sysconfdir}/xml/docbook-simple.xml + + +%post + +################## XML catalog registration ####################### + +## Define handy variables ## + +ROOT_XML_CATALOG=%{_sysconfdir}/xml/catalog +PKG_XML_CATALOG=%{_sysconfdir}/xml/docbook-simple.xml + +#### Root XML Catalog Entries #### +#### Delegate appropriate lookups to package catalog #### + +if [ -w $ROOT_XML_CATALOG ] +then + %{_bindir}/xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//DTD Simplified" \ + "file://$PKG_XML_CATALOG" $ROOT_XML_CATALOG + + %{_bindir}/xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/xml/simple/1.1/" \ + "file://$PKG_XML_CATALOG" $ROOT_XML_CATALOG + + # Next line because some resolvers misinterpret uri entries + %{_bindir}/xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/xml/simple/1.1/" \ + "file://$PKG_XML_CATALOG" $ROOT_XML_CATALOG +fi + +#################################################################### + + +################# SGML catalog registration ###################### + +ROOT_SGML_CATALOG=%{_sysconfdir}/sgml/catalog +PKG_SGML_CATALOG=%{_sysconfdir}/sgml/docbook-simple.cat + +#### Root SGML Catalog Entries #### +#### "Delegate" appropriate lookups to package catalog #### + + +############## use install-catalog ###################### + +if [ -w $ROOT_SGML_CATALOG ] +then +# xmlcatalog deletes OVERRIDE YES directive, use install-catalog instead +# /usr/bin/xmlcatalog --sgml --noout --add \ +# "/etc/sgml/docbook-simple.cat" + + install-catalog --add \ + "$PKG_SGML_CATALOG" \ + "$ROOT_SGML_CATALOG" 1>/dev/null + +# Hack to workaround bug in install-catalog + sed -i '/^CATALOG.*log\"$/d' $PKG_SGML_CATALOG + sed -i '/^CATALOG.*log$/d' $PKG_SGML_CATALOG +fi + +#################################################################### + + +# Finally, make sure everything in /etc/*ml is readable! +/bin/chmod a+r %{_sysconfdir}/sgml/* +/bin/chmod a+r %{_sysconfdir}/xml/* + +%postun +## +## SGML and XML catalogs +## +## Jobs: remove package catalog entries from both root catalogs & +## remove package catalogs + +# remove catalog entries only on removal of package +if [ "$1" = 0 ]; then + %{_bindir}/xmlcatalog --sgml --noout --del \ + %{_sysconfdir}/sgml/catalog \ + %{_sysconfdir}/sgml/docbook-simple.cat + + %{_bindir}/xmlcatalog --noout --del \ + "file://%{_sysconfdir}/xml/docbook-simple.xml" \ + %{_sysconfdir}/xml/catalog +fi + +%changelog +* Fri Dec 27 2013 Daniel Mach - 1.1-12 +- Mass rebuild 2013-12-27 + +* Tue Nov 27 2012 Ondrej Vasik 1.1-11 +- avoid using Fedora in the README file (portability) + +* Wed Jul 18 2012 Fedora Release Engineering - 1.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 1.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue May 18 2010 Ondrej Vasik - 1.1-7 +- post scriptlet requires sed (#593083) + +* Fri Jul 24 2009 Fedora Release Engineering - 1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Jul 18 2008 Ondrej Vasik - 1.1-4 +- fix loop in post catalog registration(incomplete sed + coverage) #455680 +- fix broken catalogs for package updates +- fix removal of files during updates + +* Mon Nov 05 2007 Ondrej Vasik - 1.1-3 +- merge review(#225701) +- spec modified to follow guidelines + +* Wed Oct 24 2007 Ondrej Vasik - 1.1-2 +- rpmlint check +- /etc/ files marked as config, fixed bad requirements +- cosmetic cleanup of spec file + +* Thu May 24 2007 Ondrej Vasik - 1.1-1.02 +- fixed added error in docbook-simple.xml(wrong catalog version) + +* Thu May 24 2007 Ondrej Vasik - 1.1-1 +- rebuilt with latest stable upstream release(1.1) + +* Wed Jul 12 2006 Jesse Keating - 1.0-2.1.1 +- rebuild + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Tue Sep 07 2004 Mark Johnson 1.0-1 +- Initial release +