diff options
author | Graydon, Tracy <tracy.graydon@intel.com> | 2012-08-31 12:59:27 -0700 |
---|---|---|
committer | Graydon, Tracy <tracy.graydon@intel.com> | 2012-08-31 12:59:27 -0700 |
commit | 78dab8888ab1192c8574eed0b60574821337e527 (patch) | |
tree | c9832b0dff0d5e3f212c27aa60d49bbd46d8e26b /packaging/sgml-common.spec | |
download | sgml-common-1.0.tar.gz sgml-common-1.0.tar.bz2 sgml-common-1.0.zip |
TIVI-153: add as dependency for iputilsHEADsubmit/trunk/20120831.195937accepted/trunk/20120904.1913291.0_branch1.0
Diffstat (limited to 'packaging/sgml-common.spec')
-rw-r--r-- | packaging/sgml-common.spec | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/packaging/sgml-common.spec b/packaging/sgml-common.spec new file mode 100644 index 0000000..a703d2c --- /dev/null +++ b/packaging/sgml-common.spec @@ -0,0 +1,137 @@ +#specfile originally created for Fedora, modified for Moblin Linux +Name: sgml-common +Version: 0.6.3 +Release: 24 +Group: Applications/Text + +Summary: Common SGML catalog and DTD files + +License: GPL+ + +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +#Actually - there is no homepage of this project, on that URL +#page you could get complete ISO 8879 listing as was on the +#old page - only part of it is included in sgml-common package. +URL: http://www.w3.org/2003/entities/ + +Source0: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tgz +# Following 4 from openjade/pubtext - same maintainer as in SGML-common, so up2date: +Source1: xml.dcl +Source2: xml.soc +Source3: html.dcl +Source4: html.soc + +Patch0: sgml-common-umask.patch +Patch1: sgml-common-xmldir.patch +Patch2: sgml-common-quotes.patch +Patch3: sgml-common-automake.patch +Patch4: sgml-common-0.6.3-docdir.patch + +BuildRequires: libxml2 >= 2.4.8-2 +BuildRequires: automake14 + +%description +The sgml-common package contains a collection of entities and DTDs +that are useful for processing SGML, but that don't need to be +included in multiple packages. Sgml-common also includes an +up-to-date Open Catalog file. + +%package -n xml-common +Group: Applications/Text +Summary: Common XML catalog and DTD files +License: GPL+ +URL: http://www.w3.org/2003/entities/ + +%description -n xml-common +The xml-common is a subpackage of sgml-common which contains +a collection XML catalogs that are useful for processing XML, +but that don't need to be included in main package. + +%prep +%setup -q +%patch0 -p1 -b .umask +%patch1 -p1 -b .xmldir +#patch 3 and patch4 not applied but still shipped with SRPM +#(see #226415 MergeReview) +#%patch3 -p1 -b .automake +#%patch4 -p1 -b .docdir + +# replace bogus links with files +for file in COPYING INSTALL install-sh missing mkinstalldirs; do + rm $file + cp -p %{_datadir}/automake-1.4/$file . +done + +%build +%configure + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR="$RPM_BUILD_ROOT" htmldir='%{_datadir}/doc' INSTALL='install -p' +mkdir $RPM_BUILD_ROOT%{_sysconfdir}/xml +mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgml/docbook +# Create an empty XML catalog. +XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog +%{_bindir}/xmlcatalog --noout --create $XMLCATALOG +# Now put the common DocBook entries in it +%{_bindir}/xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//ENTITIES DocBook XML" \ + "file://%{_datadir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//DTD DocBook XML" \ + "file://%{_datadir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegatePublic" \ + "ISO 8879:1986" \ + "file://%{_datadir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/" \ + "file://%{_datadir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/" \ + "file://%{_datadir}/sgml/docbook/xmlcatalog" $XMLCATALOG +# Also create the common DocBook catalog +%{_bindir}/xmlcatalog --noout --create \ + $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/xmlcatalog + +rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl +install -p -m0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \ + $RPM_BUILD_ROOT%{_datadir}/sgml +rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/* + +# remove installed doc file and prepare installation with %%doc +rm $RPM_BUILD_ROOT%{_datadir}/doc/*.html +rm -rf __dist_doc/html/ +mkdir -p __dist_doc/html/ +cp -p doc/HTML/*.html __dist_doc/html/ + + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr (-,root,root, -) +%doc __dist_doc/html/ AUTHORS NEWS ChangeLog README +%dir %{_sysconfdir}/sgml +%config(noreplace) %{_sysconfdir}/sgml/sgml.conf +%dir %{_datadir}/sgml +%dir %{_datadir}/sgml/sgml-iso-entities-8879.1986 +%{_datadir}/sgml/sgml-iso-entities-8879.1986/* +%{_datadir}/sgml/xml.dcl +%{_datadir}/sgml/xml.soc +%{_datadir}/sgml/html.dcl +%{_datadir}/sgml/html.soc +%{_bindir}/sgmlwhich +%{_bindir}/install-catalog +%doc %{_mandir}/man8/install-catalog.8* + +%files -n xml-common +%defattr (-,root,root,-) +%dir %{_sysconfdir}/xml +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog +%dir %{_datadir}/sgml +%dir %{_datadir}/sgml/docbook +%verify(not md5 size mtime) %{_datadir}/sgml/docbook/xmlcatalog +%dir %{_datadir}/xml + |