2019-11-06 19:52:27 +08:00
|
|
|
Name: sgml-common
|
|
|
|
|
Version: 0.6.3
|
|
|
|
|
Release: 51
|
|
|
|
|
Summary: XML Entity Definitions for Characters
|
|
|
|
|
License: GPL+
|
|
|
|
|
URL: http://www.linuxfromscratch.org/blfs/view/svn/pst/sgml-common.html
|
|
|
|
|
Source0: https://sourceware.org/ftp/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tgz
|
|
|
|
|
Source1: xml.dcl
|
|
|
|
|
Source2: xml.soc
|
|
|
|
|
Source3: html.dcl
|
|
|
|
|
Source4: html.soc
|
|
|
|
|
Source5: http://www.w3.org/2009/01/xml.xsd
|
|
|
|
|
Source6: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
|
|
|
|
|
Source7: http://www.w3.org/2001/XMLSchema.dtd
|
|
|
|
|
Source8: http://www.w3.org/2001/datatypes.dtd
|
|
|
|
|
|
|
|
|
|
Patch0: sgml-common-umask.patch
|
|
|
|
|
Patch1: sgml-common-xmldir.patch
|
|
|
|
|
Patch2: sgml-common-quotes.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: libxml2 automake
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
Requires: %{_bindir}/basename
|
|
|
|
|
Requires(pre): %{_bindir}/xmlcatalog
|
|
|
|
|
|
|
|
|
|
Provides: xml-common = %{version}-%{release}
|
|
|
|
|
Obsoletes: xml-common < %{version}-%{release}
|
2019-09-30 11:17:01 -04:00
|
|
|
|
|
|
|
|
%description
|
2019-11-06 19:52:27 +08:00
|
|
|
The SGML Common package contains install-catalog. This is useful
|
|
|
|
|
for creating and maintaining centralized SGML catalogs.
|
|
|
|
|
- install-catalog
|
|
|
|
|
creates a centralized catalog that maintains references to catalogs
|
|
|
|
|
scattered throughout the /usr/share/sgml directory tree.
|
|
|
|
|
- sgmlwhich
|
|
|
|
|
will print to standard output the name of the main configuration file.
|
|
|
|
|
- SGML entities files
|
|
|
|
|
contain the basic character entities defined with SDATA entries.
|
|
|
|
|
- XML entities files
|
|
|
|
|
contain the basic character entities defined by a hexadecimal
|
|
|
|
|
representation of the Unicode character number.
|
|
|
|
|
|
|
|
|
|
%package_help
|
2019-09-30 11:17:01 -04:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
automakedir=`ls -1d /usr/share/automake* | head -n +1`
|
|
|
|
|
for file in COPYING INSTALL install-sh missing mkinstalldirs; do
|
|
|
|
|
rm $file
|
|
|
|
|
cp -p $automakedir/$file .
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%configure
|
|
|
|
|
|
|
|
|
|
%install
|
2019-11-06 19:52:27 +08:00
|
|
|
%make_install htmldir='%{_datadir}/doc'
|
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/xml
|
|
|
|
|
install -d -m 0755 -p %{buildroot}%{_sysconfdir}/sgml/docbook
|
|
|
|
|
install -d -m 0755 -p %{buildroot}%{_datadir}/sgml/docbook
|
|
|
|
|
|
|
|
|
|
touch %{buildroot}%{_sysconfdir}/sgml/catalog
|
|
|
|
|
|
2019-09-30 11:17:01 -04:00
|
|
|
XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --create $XMLCATALOG
|
2019-11-06 19:52:27 +08:00
|
|
|
|
2019-09-30 11:17:01 -04:00
|
|
|
for type in system uri ; do
|
2019-11-06 19:52:27 +08:00
|
|
|
for path in 2001 %{xmlxsdver} ; do
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add $type \
|
|
|
|
|
"http://www.w3.org/$path/xml.xsd" \
|
|
|
|
|
"file://%{_datadir}/xml/xml.xsd" $XMLCATALOG
|
|
|
|
|
done
|
2019-09-30 11:17:01 -04:00
|
|
|
%{_bindir}/xmlcatalog --noout --add $type \
|
2019-11-06 19:52:27 +08:00
|
|
|
"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \
|
|
|
|
|
"file://%{_datadir}/xml/xmldsig-core-schema.xsd" $XMLCATALOG
|
2019-09-30 11:17:01 -04:00
|
|
|
done
|
2019-11-06 19:52:27 +08:00
|
|
|
|
2019-09-30 11:17:01 -04:00
|
|
|
%{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
|
|
|
|
"-//OASIS//ENTITIES DocBook XML" \
|
|
|
|
|
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
|
|
|
|
"-//OASIS//DTD DocBook XML" \
|
|
|
|
|
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
|
|
|
|
"ISO 8879:1986" \
|
|
|
|
|
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add "delegateSystem" \
|
|
|
|
|
"http://www.oasis-open.org/docbook/" \
|
|
|
|
|
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add "delegateURI" \
|
|
|
|
|
"http://www.oasis-open.org/docbook/" \
|
|
|
|
|
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
|
|
|
|
for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA 200102//EN" ; do
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add "public" \
|
|
|
|
|
"$public" \
|
|
|
|
|
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
|
|
|
|
done
|
2019-11-06 19:52:27 +08:00
|
|
|
|
2019-09-30 11:17:01 -04:00
|
|
|
%{_bindir}/xmlcatalog --noout --add "system" \
|
|
|
|
|
"http://www.w3.org/2001/XMLSchema.dtd" \
|
|
|
|
|
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
|
|
|
|
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --create \
|
2019-11-06 19:52:27 +08:00
|
|
|
%{buildroot}%{_sysconfdir}/sgml/docbook/xmlcatalog
|
|
|
|
|
|
2019-09-30 11:17:01 -04:00
|
|
|
ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
|
2019-11-06 19:52:27 +08:00
|
|
|
%{buildroot}%{_datadir}/sgml/docbook/xmlcatalog
|
2019-09-30 11:17:01 -04:00
|
|
|
|
2019-11-06 19:52:27 +08:00
|
|
|
rm -f %{buildroot}%{_datadir}/sgml/xml.dcl
|
|
|
|
|
install -p -m 0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
|
2019-09-30 11:17:01 -04:00
|
|
|
$RPM_BUILD_ROOT%{_datadir}/sgml
|
2019-11-06 19:52:27 +08:00
|
|
|
|
|
|
|
|
rm -rf %{buildroot}%{_datadir}/xml/*
|
|
|
|
|
install -p -m 0644 %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} \
|
2019-09-30 11:17:01 -04:00
|
|
|
$RPM_BUILD_ROOT%{_datadir}/xml
|
|
|
|
|
|
2019-11-06 19:52:27 +08:00
|
|
|
rm %{buildroot}%{_datadir}/doc/*.html
|
|
|
|
|
install -d -m 0755 -p __dist_doc/html/
|
|
|
|
|
install -p doc/HTML/*.html __dist_doc/html/
|
2019-09-30 11:17:01 -04:00
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
|
2019-11-06 19:52:27 +08:00
|
|
|
for type in system uri ; do
|
|
|
|
|
for path in 2001 %{xmlxsdver} ; do
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add $type \
|
|
|
|
|
"http://www.w3.org/$path/xml.xsd" \
|
|
|
|
|
"file://%{_datadir}/xml/xml.xsd" \
|
|
|
|
|
%{_sysconfdir}/xml/catalog
|
2019-09-30 11:17:01 -04:00
|
|
|
done
|
2019-11-06 19:52:27 +08:00
|
|
|
%{_bindir}/xmlcatalog --noout --add $type \
|
|
|
|
|
"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \
|
|
|
|
|
"file://%{_datadir}/xml/xmldsig-core-schema.xsd" %{_sysconfdir}/xml/catalog
|
|
|
|
|
done
|
|
|
|
|
for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA 200102//EN" ; do
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add "public" \
|
|
|
|
|
"$public" \
|
|
|
|
|
"file://%{_datadir}/xml/XMLSchema.dtd" %{_sysconfdir}/xml/catalog
|
|
|
|
|
done
|
2019-09-30 11:17:01 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%files
|
2019-11-06 19:52:27 +08:00
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc AUTHORS README
|
|
|
|
|
%license COPYING
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/sgml/sgml.conf
|
2019-09-30 11:17:01 -04:00
|
|
|
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
|
|
|
|
|
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook/xmlcatalog
|
|
|
|
|
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/sgml/catalog
|
2019-11-06 19:52:27 +08:00
|
|
|
%{_bindir}/*
|
|
|
|
|
%{_datadir}/xml/*
|
|
|
|
|
%{_datadir}/sgml/*
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc __dist_doc/html/ NEWS ChangeLog
|
|
|
|
|
%{_mandir}/man8/*
|
2019-09-30 11:17:01 -04:00
|
|
|
|
|
|
|
|
%changelog
|
2019-11-06 19:52:27 +08:00
|
|
|
* Sun Oct 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.6.3-51
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:remove the %{?dist} and add help package for sgml-common
|
|
|
|
|
|
|
|
|
|
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.6.3-50
|
2019-09-30 11:17:01 -04:00
|
|
|
- Package init
|