source: spec/trunk/SPECS/sgml-common.spec@ 1566

Last change on this file since 1566 was 1124, checked in by Silvan Scherrer, 8 years ago

spec: sgml-common: Release version 0.6.3-45.

File size: 5.3 KB
Line 
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
8Name: sgml-common
9Version: 0.6.3
10Release: 45%{?dist}
11Group: Applications/Text
12
13Summary: Common SGML catalog and DTD files
14
15License: GPL+
16
17BuildArch: noarch
18BuildRoot: %{_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.
23URL: http://www.w3.org/2003/entities/
24
25Vendor: bww bitwise works GmbH
26%scm_source github https://github.com/bitwiseworks/%{name}-os2 %{version}-os2
27
28
29BuildRequires: libxml2
30BuildRequires: automake
31Requires: /@unixroot/usr/bin/basename.exe
32
33%description
34The sgml-common package contains a collection of entities and DTDs
35that are useful for processing SGML, but that don't need to be
36included in multiple packages. Sgml-common also includes an
37up-to-date Open Catalog file.
38
39%package -n xml-common
40Group: Applications/Text
41Summary: Common XML catalog and DTD files
42License: GPL+
43Requires(pre): %{_bindir}/xmlcatalog.exe
44
45%description -n xml-common
46The xml-common is a subpackage of sgml-common which contains
47a collection XML catalogs that are useful for processing XML,
48but 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
54autoreconf -fvi
55
56%build
57%configure
58
59%install
60rm -rf $RPM_BUILD_ROOT
61make install DESTDIR="$RPM_BUILD_ROOT" htmldir='%{_datadir}/doc' INSTALL='install -p'
62mkdir $RPM_BUILD_ROOT%{_sysconfdir}/xml
63mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook
64mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgml/docbook
65# Touch SGML catalog
66touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog
67# Create an empty XML catalog.
68XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
69%{_bindir}/xmlcatalog --noout --create $XMLCATALOG
70# ...and add xml.xsd in it
71for 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
77done
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
97ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
98 $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/xmlcatalog
99
100rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl
101install -p -m0644 xml.dcl xml.soc html.dcl html.soc \
102 $RPM_BUILD_ROOT%{_datadir}/sgml
103rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/*
104install -p -m0644 xml.xsd $RPM_BUILD_ROOT%{_datadir}/xml
105
106# remove installed doc file and prepare installation with %%doc
107rm $RPM_BUILD_ROOT%{_datadir}/doc/*.html
108rm -rf __dist_doc/html/
109mkdir -p __dist_doc/html/
110cp -p doc/HTML/*.html __dist_doc/html/
111
112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
116%pre -n xml-common
117if [ $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
126fi
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
Note: See TracBrowser for help on using the repository browser.