update code
This commit is contained in:
parent
89bf4ee961
commit
eb898e4637
138
sgml-common.spec
138
sgml-common.spec
@ -1,24 +1,15 @@
|
||||
%global xmlxsdver 2009/01
|
||||
|
||||
Name: sgml-common
|
||||
Version: 0.6.3
|
||||
Release: 50%{?dist}
|
||||
Group: Applications/Text
|
||||
|
||||
Summary: Common XML/SGML catalog and DTD files
|
||||
|
||||
Release: 51
|
||||
Summary: XML Entity Definitions for Characters
|
||||
License: GPL+
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
URL: http://www.w3.org/2003/entities/
|
||||
|
||||
Source0: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tgz
|
||||
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/%{xmlxsdver}/xml.xsd
|
||||
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
|
||||
@ -27,25 +18,34 @@ Patch0: sgml-common-umask.patch
|
||||
Patch1: sgml-common-xmldir.patch
|
||||
Patch2: sgml-common-quotes.patch
|
||||
|
||||
BuildRequires: libxml2
|
||||
BuildRequires: automake
|
||||
Requires: %{_bindir}/basename %{_bindir}/xmlcatalog
|
||||
Provides: xml-common
|
||||
Obsoletes: xml-common
|
||||
BuildRequires: libxml2 automake
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: %{_bindir}/basename
|
||||
Requires(pre): %{_bindir}/xmlcatalog
|
||||
|
||||
Provides: xml-common = %{version}-%{release}
|
||||
Obsoletes: xml-common < %{version}-%{release}
|
||||
|
||||
%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.
|
||||
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.
|
||||
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
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
# replace bogus links with files
|
||||
automakedir=`ls -1d /usr/share/automake* | head -n +1`
|
||||
for file in COPYING INSTALL install-sh missing mkinstalldirs; do
|
||||
rm $file
|
||||
@ -56,29 +56,27 @@ done
|
||||
%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%{_sysconfdir}/sgml/docbook
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgml/docbook
|
||||
# Touch SGML catalog
|
||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog
|
||||
# Create an empty XML catalog.
|
||||
%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
|
||||
|
||||
XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
|
||||
%{_bindir}/xmlcatalog --noout --create $XMLCATALOG
|
||||
# ...and add xml.xsd in it
|
||||
|
||||
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" $XMLCATALOG
|
||||
done
|
||||
# Add xmldsig-core-schema.xsd to catalog
|
||||
%{_bindir}/xmlcatalog --noout --add $type \
|
||||
"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \
|
||||
"file://%{_datadir}/xml/xmldsig-core-schema.xsd" $XMLCATALOG
|
||||
done
|
||||
# Now put the common DocBook entries in it
|
||||
|
||||
%{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
||||
"-//OASIS//ENTITIES DocBook XML" \
|
||||
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
||||
@ -99,28 +97,28 @@ for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA 200102//
|
||||
"$public" \
|
||||
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
||||
done
|
||||
|
||||
%{_bindir}/xmlcatalog --noout --add "system" \
|
||||
"http://www.w3.org/2001/XMLSchema.dtd" \
|
||||
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
||||
|
||||
# Also create the common DocBook catalog
|
||||
%{_bindir}/xmlcatalog --noout --create \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook/xmlcatalog
|
||||
ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
|
||||
$RPM_BUILD_ROOT%{_datadir}/sgml/docbook/xmlcatalog
|
||||
%{buildroot}%{_sysconfdir}/sgml/docbook/xmlcatalog
|
||||
|
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl
|
||||
ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
|
||||
%{buildroot}%{_datadir}/sgml/docbook/xmlcatalog
|
||||
|
||||
rm -f %{buildroot}%{_datadir}/sgml/xml.dcl
|
||||
install -p -m 0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
|
||||
$RPM_BUILD_ROOT%{_datadir}/sgml
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/*
|
||||
|
||||
rm -rf %{buildroot}%{_datadir}/xml/*
|
||||
install -p -m 0644 %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} \
|
||||
$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/
|
||||
rm %{buildroot}%{_datadir}/doc/*.html
|
||||
install -d -m 0755 -p __dist_doc/html/
|
||||
install -p doc/HTML/*.html __dist_doc/html/
|
||||
|
||||
%pre
|
||||
if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
|
||||
@ -143,32 +141,28 @@ if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc __dist_doc/html/ AUTHORS NEWS ChangeLog COPYING README
|
||||
%dir %{_sysconfdir}/xml
|
||||
%dir %{_sysconfdir}/sgml
|
||||
%dir %{_sysconfdir}/sgml/docbook
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS README
|
||||
%license COPYING
|
||||
%config(noreplace) %{_sysconfdir}/sgml/sgml.conf
|
||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
|
||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook/xmlcatalog
|
||||
%config(noreplace) %{_sysconfdir}/sgml/sgml.conf
|
||||
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/sgml/catalog
|
||||
%dir %{_datadir}/xml
|
||||
%dir %{_datadir}/sgml
|
||||
%dir %{_datadir}/sgml/docbook
|
||||
%dir %{_datadir}/sgml/sgml-iso-entities-8879.1986
|
||||
%{_datadir}/xml/xml.xsd
|
||||
%{_datadir}/xml/xmldsig-core-schema.xsd
|
||||
%{_datadir}/xml/XMLSchema.dtd
|
||||
%{_datadir}/xml/datatypes.dtd
|
||||
%{_datadir}/sgml/sgml-iso-entities-8879.1986/*
|
||||
%{_datadir}/sgml/xml.dcl
|
||||
%{_datadir}/sgml/xml.soc
|
||||
%{_datadir}/sgml/html.dcl
|
||||
%{_datadir}/sgml/html.soc
|
||||
%{_datadir}/sgml/docbook/xmlcatalog
|
||||
%{_bindir}/sgmlwhich
|
||||
%{_bindir}/install-catalog
|
||||
%{_mandir}/man8/install-catalog.8*
|
||||
%{_bindir}/*
|
||||
%{_datadir}/xml/*
|
||||
%{_datadir}/sgml/*
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc __dist_doc/html/ NEWS ChangeLog
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:6.02-5
|
||||
* 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
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user