| 1 | # note: Even this is our first rpm we stick with the fedora release.
|
|---|
| 2 | # The reason is, that some spec (like docbook-style-xsl) requires
|
|---|
| 3 | # version > 0.6.3-8. Fixing all those requires as well seems like a bad
|
|---|
| 4 | # idea. Especially for later resync.
|
|---|
| 5 |
|
|---|
| 6 | %global xmlxsdver 2009/01
|
|---|
| 7 |
|
|---|
| 8 | Name: sgml-common
|
|---|
| 9 | Version: 0.6.3
|
|---|
| 10 | Release: 45%{?dist}
|
|---|
| 11 | Group: Applications/Text
|
|---|
| 12 |
|
|---|
| 13 | Summary: Common SGML catalog and DTD files
|
|---|
| 14 |
|
|---|
| 15 | License: GPL+
|
|---|
| 16 |
|
|---|
| 17 | BuildArch: noarch
|
|---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 19 |
|
|---|
| 20 | #Actually - there is no homepage of this project, on that URL
|
|---|
| 21 | #page you could get complete ISO 8879 listing as was on the
|
|---|
| 22 | #old page - only part of it is included in sgml-common package.
|
|---|
| 23 | URL: http://www.w3.org/2003/entities/
|
|---|
| 24 |
|
|---|
| 25 | Vendor: bww bitwise works GmbH
|
|---|
| 26 | %scm_source github https://github.com/bitwiseworks/%{name}-os2 %{version}-os2
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | BuildRequires: libxml2
|
|---|
| 30 | BuildRequires: automake
|
|---|
| 31 | Requires: /@unixroot/usr/bin/basename.exe
|
|---|
| 32 |
|
|---|
| 33 | %description
|
|---|
| 34 | The sgml-common package contains a collection of entities and DTDs
|
|---|
| 35 | that are useful for processing SGML, but that don't need to be
|
|---|
| 36 | included in multiple packages. Sgml-common also includes an
|
|---|
| 37 | up-to-date Open Catalog file.
|
|---|
| 38 |
|
|---|
| 39 | %package -n xml-common
|
|---|
| 40 | Group: Applications/Text
|
|---|
| 41 | Summary: Common XML catalog and DTD files
|
|---|
| 42 | License: GPL+
|
|---|
| 43 | Requires(pre): %{_bindir}/xmlcatalog.exe
|
|---|
| 44 |
|
|---|
| 45 | %description -n xml-common
|
|---|
| 46 | The xml-common is a subpackage of sgml-common which contains
|
|---|
| 47 | a collection XML catalogs that are useful for processing XML,
|
|---|
| 48 | but that don't need to be included in main package.
|
|---|
| 49 |
|
|---|
| 50 | %prep
|
|---|
| 51 | %scm_setup
|
|---|
| 52 |
|
|---|
| 53 | # we need to autoreconf to create the needed files
|
|---|
| 54 | autoreconf -fvi
|
|---|
| 55 |
|
|---|
| 56 | %build
|
|---|
| 57 | %configure
|
|---|
| 58 |
|
|---|
| 59 | %install
|
|---|
| 60 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 61 | make install DESTDIR="$RPM_BUILD_ROOT" htmldir='%{_datadir}/doc' INSTALL='install -p'
|
|---|
| 62 | mkdir $RPM_BUILD_ROOT%{_sysconfdir}/xml
|
|---|
| 63 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook
|
|---|
| 64 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgml/docbook
|
|---|
| 65 | # Touch SGML catalog
|
|---|
| 66 | touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog
|
|---|
| 67 | # Create an empty XML catalog.
|
|---|
| 68 | XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
|
|---|
| 69 | %{_bindir}/xmlcatalog --noout --create $XMLCATALOG
|
|---|
| 70 | # ...and add xml.xsd in it
|
|---|
| 71 | for type in system uri ; do
|
|---|
| 72 | for path in 2001 %{xmlxsdver} ; do
|
|---|
| 73 | %{_bindir}/xmlcatalog --noout --add $type \
|
|---|
| 74 | "http://www.w3.org/$path/xml.xsd" \
|
|---|
| 75 | "file://%{_datadir}/xml/xml.xsd" $XMLCATALOG
|
|---|
| 76 | done
|
|---|
| 77 | done
|
|---|
| 78 | # Now put the common DocBook entries in it
|
|---|
| 79 | %{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
|---|
| 80 | "-//OASIS//ENTITIES DocBook XML" \
|
|---|
| 81 | "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|---|
| 82 | %{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
|---|
| 83 | "-//OASIS//DTD DocBook XML" \
|
|---|
| 84 | "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|---|
| 85 | %{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
|---|
| 86 | "ISO 8879:1986" \
|
|---|
| 87 | "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|---|
| 88 | %{_bindir}/xmlcatalog --noout --add "delegateSystem" \
|
|---|
| 89 | "http://www.oasis-open.org/docbook/" \
|
|---|
| 90 | "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|---|
| 91 | %{_bindir}/xmlcatalog --noout --add "delegateURI" \
|
|---|
| 92 | "http://www.oasis-open.org/docbook/" \
|
|---|
| 93 | "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|---|
| 94 | # Also create the common DocBook catalog
|
|---|
| 95 | %{_bindir}/xmlcatalog --noout --create \
|
|---|
| 96 | $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook/xmlcatalog
|
|---|
| 97 | ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
|
|---|
| 98 | $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/xmlcatalog
|
|---|
| 99 |
|
|---|
| 100 | rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl
|
|---|
| 101 | install -p -m0644 xml.dcl xml.soc html.dcl html.soc \
|
|---|
| 102 | $RPM_BUILD_ROOT%{_datadir}/sgml
|
|---|
| 103 | rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/*
|
|---|
| 104 | install -p -m0644 xml.xsd $RPM_BUILD_ROOT%{_datadir}/xml
|
|---|
| 105 |
|
|---|
| 106 | # remove installed doc file and prepare installation with %%doc
|
|---|
| 107 | rm $RPM_BUILD_ROOT%{_datadir}/doc/*.html
|
|---|
| 108 | rm -rf __dist_doc/html/
|
|---|
| 109 | mkdir -p __dist_doc/html/
|
|---|
| 110 | cp -p doc/HTML/*.html __dist_doc/html/
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 | %clean
|
|---|
| 114 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 115 |
|
|---|
| 116 | %pre -n xml-common
|
|---|
| 117 | if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
|
|---|
| 118 | for type in system uri ; do
|
|---|
| 119 | for path in 2001 %{xmlxsdver} ; do
|
|---|
| 120 | %{_bindir}/xmlcatalog --noout --add $type \
|
|---|
| 121 | "http://www.w3.org/$path/xml.xsd" \
|
|---|
| 122 | "file://%{_datadir}/xml/xml.xsd" \
|
|---|
| 123 | %{_sysconfdir}/xml/catalog
|
|---|
| 124 | done
|
|---|
| 125 | done
|
|---|
| 126 | fi
|
|---|
| 127 |
|
|---|
| 128 | %files
|
|---|
| 129 | %defattr (-,root,root, -)
|
|---|
| 130 | %doc __dist_doc/html/ AUTHORS NEWS ChangeLog COPYING README
|
|---|
| 131 | %dir %{_sysconfdir}/sgml
|
|---|
| 132 | %config(noreplace) %{_sysconfdir}/sgml/sgml.conf
|
|---|
| 133 | %ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/sgml/catalog
|
|---|
| 134 | %dir %{_datadir}/sgml
|
|---|
| 135 | %dir %{_datadir}/sgml/sgml-iso-entities-8879.1986
|
|---|
| 136 | %{_datadir}/sgml/sgml-iso-entities-8879.1986/*
|
|---|
| 137 | %{_datadir}/sgml/xml.dcl
|
|---|
| 138 | %{_datadir}/sgml/xml.soc
|
|---|
| 139 | %{_datadir}/sgml/html.dcl
|
|---|
| 140 | %{_datadir}/sgml/html.soc
|
|---|
| 141 | %{_bindir}/sgmlwhich
|
|---|
| 142 | %{_bindir}/install-catalog
|
|---|
| 143 | %{_mandir}/man8/install-catalog.8*
|
|---|
| 144 |
|
|---|
| 145 | %files -n xml-common
|
|---|
| 146 | %defattr (-,root,root,-)
|
|---|
| 147 | %doc AUTHORS NEWS ChangeLog COPYING README
|
|---|
| 148 | %dir %{_sysconfdir}/xml
|
|---|
| 149 | %dir %{_sysconfdir}/sgml
|
|---|
| 150 | %dir %{_sysconfdir}/sgml/docbook
|
|---|
| 151 | %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
|
|---|
| 152 | %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook/xmlcatalog
|
|---|
| 153 | %dir %{_datadir}/sgml
|
|---|
| 154 | %dir %{_datadir}/sgml/docbook
|
|---|
| 155 | %{_datadir}/sgml/docbook/xmlcatalog
|
|---|
| 156 | %dir %{_datadir}/xml
|
|---|
| 157 | %{_datadir}/xml/xml.xsd
|
|---|
| 158 |
|
|---|
| 159 | %changelog
|
|---|
| 160 | * Thu May 04 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 0.6.3-45
|
|---|
| 161 | - initial port
|
|---|