diff options
author | Paul W. Frields <stickster@gmail.com> | 2005-10-03 02:32:06 +0000 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2005-10-03 02:32:06 +0000 |
commit | 4197ac8d6dff3a7cd9c492c309411bb8265143c3 (patch) | |
tree | be45d06e99c3fca81e115fc62cb503ea69ce2ff1 | |
parent | c4126676f63ff494c2df3862fe360af026d6b538 (diff) | |
download | fedora-doc-utils-4197ac8d6dff3a7cd9c492c309411bb8265143c3.tar.gz fedora-doc-utils-4197ac8d6dff3a7cd9c492c309411bb8265143c3.tar.xz fedora-doc-utils-4197ac8d6dff3a7cd9c492c309411bb8265143c3.zip |
Some materials for automatic package building, nothing gold yet
-rw-r--r-- | packaging/fedora-doc.desktop.in.common | 10 | ||||
-rw-r--r-- | packaging/fedora-doc.omf.in.common | 28 | ||||
-rw-r--r-- | packaging/fedora-doc.spec.in.common | 78 | ||||
-rwxr-xr-x | packaging/titlegrab.py | 31 |
4 files changed, 147 insertions, 0 deletions
diff --git a/packaging/fedora-doc.desktop.in.common b/packaging/fedora-doc.desktop.in.common new file mode 100644 index 0000000..2d5511d --- /dev/null +++ b/packaging/fedora-doc.desktop.in.common @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Categories=Application;Documentation;X-Red-Hat-Base; +Name=@NAME@ +GenericName=@NAME@ +Exec=gnome-help file:///usr/share/fedora/doc/fedora-doc-@DOCBASE@/C/@DOCBASE@-en.xml +Icon=icon-documentation.png +Terminal=false +Type=Application +Comment=Official Fedora documentation diff --git a/packaging/fedora-doc.omf.in.common b/packaging/fedora-doc.omf.in.common new file mode 100644 index 0000000..efe510e --- /dev/null +++ b/packaging/fedora-doc.omf.in.common @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<omf> + <resource> + <creator> + fedora-docs-list@redhat.com (Fedora Documentation Project) + </creator> + <maintainer> + fedora-docs-list@redhat.com (Fedora Documentation Project) + </maintainer> + <title> + @TITLE@ + </title> + <date> + @DATE@ + </date> + <version identifier="@VERSION@" date="@DATE@" description="@DOCBASE@-@VERSION@ (@DATE@)"/> + <subject category="System|Other"/> + <description> + Official Fedora Documentation: @TITLE@ + </description> + <type>@TITLE@</type> + <format mime="text/xml" dtd="-//OASIS//DTD DocBook XML V4.2//EN"/> + <identifier url="file:/usr/share/fedora/doc/fedora-doc-@DOCBASE@/C/@DOCBASE@-en.xml"/> + <language code="C"/> + <relation seriesid="7a5d3ea2-2a1e-11da-86a3-8ea47a4bb227"/> + <rights type="GNU FDL" license.version="1.1"/> + </resource> +</omf> diff --git a/packaging/fedora-doc.spec.in.common b/packaging/fedora-doc.spec.in.common new file mode 100644 index 0000000..9fcbb35 --- /dev/null +++ b/packaging/fedora-doc.spec.in.common @@ -0,0 +1,78 @@ +# Fedora documentation specfile skeleton + +Summary: Fedora documentation: %{docbase} +Name: fedora-doc-%{docbase} +Version: %{version} +Release: 1 +License: FDL +Url: http://fedora.redhat.com/projects/docs/ +Source0: %{docbase}-%{version}.src.tar.gz +Source1: %{name}-C.omf +Source2: %{name}.desktop +Group: Documentation +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +Requires: scrollkeeper >= 0.3.11 +Requires: fedora-doc-common +BuildRequires: scrollkeeper +BuildRequires: xmlto + +%description +This package contains official the Fedora documentation %{docbase}. +For more information, refer to the Fedora Documentation Project. + + +%prep +%setup -q -n %{docbase}-%{version} +%{__sed} -i 's!../docs-common/!../../docs-common/!' \ + $RPM_BUILD_DIR/%{docbase}-%{version}/%{docbase}-en.xml + + +%build +# Perhaps we will require an HTML chunked build here for use with KDE; +# not sure yet. + + +%install +rm -rf $RPM_BUILD_ROOT +install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/omf/%{name} +install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/omf/%{name} +install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/%{name}/C +install -m 644 $RPM_BUILD_DIR/%{docbase}-%{version}/*.xml \ + $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/%{name}/C +for d in `find -type d $RPM_BUILD_DIR/%{docbase}-%{version}` +do + dname=`basename ${d}` + install -d -m 755 \ + $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/%{name}/C/${dname} + install -m 644 $RPM_BUILD_DIR/%{docbase}-%{version}/${dname}/* \ + $RPM_BUILD_ROOT/%{_datadir}/fedora/doc/%{name}/C/${dname} +done +install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/applications +install -m 644 %{SOURCE2} \ + $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post +scrollkeeper-update +exit 0 + +%postun +scrollkeeper-update +exit 0 + +%files +%defattr(-, root, root,-) +%docdir %{_datadir}/fedora/doc/%{name} +%{_datadir}/fedora/doc/%{name}/* +%dir %{_datadir}/omf/%{name} +%{_datadir}/omf/%{name}/* +%{_datadir}/applications/%{name}.desktop + + +%changelog diff --git a/packaging/titlegrab.py b/packaging/titlegrab.py new file mode 100755 index 0000000..86284c2 --- /dev/null +++ b/packaging/titlegrab.py @@ -0,0 +1,31 @@ +#!/usr/bin/python -d +import sys +import xml.dom.minidom +from xml.dom.minidom import Node + + +xml_files = sys.argv[1:] + +if xml_files == []: + print "Usage: titlegrab.py xml_file..." + sys.exit (2) + +for file in xml_files: + doc = xml.dom.minidom.parse(file) + + title = "" + for node in doc.getElementsByTagName("articleinfo"): + T = node.getElementsByTagName("title") + for node2 in T: + for node3 in node2.childNodes: + if node3.nodeType == Node.TEXT_NODE: + title += node3.data + if title == "": + # Hmm, must not be an <article> then + for node in doc.getElementsByTagName("bookinfo"): + T = node.getElementsByTagName("title") + for node2 in T: + for node3 in node2.childNodes: + if node3.nodeType == Node.TEXT_NODE: + title += node3.data + print title |