docs-common/packaging fedora-doc.desktop.in.common, NONE, 1.1 fedora-doc.omf.in.common, NONE, 1.1 fedora-doc.spec.in.common, NONE, 1.1 titlegrab.py, NONE, 1.1
Paul W. Frields (pfrields)
fedora-docs-commits at redhat.com
Mon Oct 3 02:32:10 UTC 2005
Author: pfrields
Update of /cvs/docs/docs-common/packaging
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23196/packaging
Added Files:
fedora-doc.desktop.in.common fedora-doc.omf.in.common
fedora-doc.spec.in.common titlegrab.py
Log Message:
Some materials for automatic package building, nothing gold yet
--- NEW FILE fedora-doc.desktop.in.common ---
[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
--- NEW FILE fedora-doc.omf.in.common ---
<?xml version="1.0" encoding="UTF-8"?>
<omf>
<resource>
<creator>
fedora-docs-list at redhat.com (Fedora Documentation Project)
</creator>
<maintainer>
fedora-docs-list at redhat.com (Fedora Documentation Project)
</maintainer>
<title>
@TITLE@
</title>
<date>
@DATE@
</date>
<version identifier="@VERSION@" date="@DATE@" description="@DOCBASE at -@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- at DOCBASE@/C/@DOCBASE at -en.xml"/>
<language code="C"/>
<relation seriesid="7a5d3ea2-2a1e-11da-86a3-8ea47a4bb227"/>
<rights type="GNU FDL" license.version="1.1"/>
</resource>
</omf>
--- NEW FILE fedora-doc.spec.in.common ---
# 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
--- NEW FILE titlegrab.py ---
#!/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
More information about the Fedora-docs-commits
mailing list