update code
This commit is contained in:
parent
89bf4ee961
commit
eb898e4637
142
sgml-common.spec
142
sgml-common.spec
@ -1,24 +1,15 @@
|
|||||||
%global xmlxsdver 2009/01
|
|
||||||
|
|
||||||
Name: sgml-common
|
Name: sgml-common
|
||||||
Version: 0.6.3
|
Version: 0.6.3
|
||||||
Release: 50%{?dist}
|
Release: 51
|
||||||
Group: Applications/Text
|
Summary: XML Entity Definitions for Characters
|
||||||
|
|
||||||
Summary: Common XML/SGML catalog and DTD files
|
|
||||||
|
|
||||||
License: GPL+
|
License: GPL+
|
||||||
|
URL: http://www.linuxfromscratch.org/blfs/view/svn/pst/sgml-common.html
|
||||||
BuildArch: noarch
|
Source0: https://sourceware.org/ftp/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tgz
|
||||||
|
|
||||||
URL: http://www.w3.org/2003/entities/
|
|
||||||
|
|
||||||
Source0: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tgz
|
|
||||||
Source1: xml.dcl
|
Source1: xml.dcl
|
||||||
Source2: xml.soc
|
Source2: xml.soc
|
||||||
Source3: html.dcl
|
Source3: html.dcl
|
||||||
Source4: html.soc
|
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
|
Source6: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
|
||||||
Source7: http://www.w3.org/2001/XMLSchema.dtd
|
Source7: http://www.w3.org/2001/XMLSchema.dtd
|
||||||
Source8: http://www.w3.org/2001/datatypes.dtd
|
Source8: http://www.w3.org/2001/datatypes.dtd
|
||||||
@ -27,25 +18,34 @@ Patch0: sgml-common-umask.patch
|
|||||||
Patch1: sgml-common-xmldir.patch
|
Patch1: sgml-common-xmldir.patch
|
||||||
Patch2: sgml-common-quotes.patch
|
Patch2: sgml-common-quotes.patch
|
||||||
|
|
||||||
BuildRequires: libxml2
|
BuildRequires: libxml2 automake
|
||||||
BuildRequires: automake
|
BuildArch: noarch
|
||||||
Requires: %{_bindir}/basename %{_bindir}/xmlcatalog
|
|
||||||
Provides: xml-common
|
Requires: %{_bindir}/basename
|
||||||
Obsoletes: xml-common
|
Requires(pre): %{_bindir}/xmlcatalog
|
||||||
|
|
||||||
|
Provides: xml-common = %{version}-%{release}
|
||||||
|
Obsoletes: xml-common < %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The sgml-common package contains a collection of entities and DTDs
|
The SGML Common package contains install-catalog. This is useful
|
||||||
that are useful for processing SGML, but that don't need to be
|
for creating and maintaining centralized SGML catalogs.
|
||||||
included in multiple packages. Sgml-common also includes an
|
- install-catalog
|
||||||
up-to-date Open Catalog file.
|
creates a centralized catalog that maintains references to catalogs
|
||||||
The xml-common is a subpackage of sgml-common which contains
|
scattered throughout the /usr/share/sgml directory tree.
|
||||||
a collection XML catalogs that are useful for processing XML,
|
- sgmlwhich
|
||||||
but that don't need to be included in main package.
|
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
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
# replace bogus links with files
|
|
||||||
automakedir=`ls -1d /usr/share/automake* | head -n +1`
|
automakedir=`ls -1d /usr/share/automake* | head -n +1`
|
||||||
for file in COPYING INSTALL install-sh missing mkinstalldirs; do
|
for file in COPYING INSTALL install-sh missing mkinstalldirs; do
|
||||||
rm $file
|
rm $file
|
||||||
@ -56,29 +56,27 @@ done
|
|||||||
%configure
|
%configure
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
%make_install htmldir='%{_datadir}/doc'
|
||||||
make install DESTDIR="$RPM_BUILD_ROOT" htmldir='%{_datadir}/doc' INSTALL='install -p'
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/xml
|
||||||
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/xml
|
install -d -m 0755 -p %{buildroot}%{_sysconfdir}/sgml/docbook
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook
|
install -d -m 0755 -p %{buildroot}%{_datadir}/sgml/docbook
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgml/docbook
|
|
||||||
# Touch SGML catalog
|
touch %{buildroot}%{_sysconfdir}/sgml/catalog
|
||||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog
|
|
||||||
# Create an empty XML catalog.
|
|
||||||
XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
|
XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
|
||||||
%{_bindir}/xmlcatalog --noout --create $XMLCATALOG
|
%{_bindir}/xmlcatalog --noout --create $XMLCATALOG
|
||||||
# ...and add xml.xsd in it
|
|
||||||
for type in system uri ; do
|
for type in system uri ; do
|
||||||
for path in 2001 %{xmlxsdver} ; do
|
for path in 2001 %{xmlxsdver} ; do
|
||||||
%{_bindir}/xmlcatalog --noout --add $type \
|
%{_bindir}/xmlcatalog --noout --add $type \
|
||||||
"http://www.w3.org/$path/xml.xsd" \
|
"http://www.w3.org/$path/xml.xsd" \
|
||||||
"file://%{_datadir}/xml/xml.xsd" $XMLCATALOG
|
"file://%{_datadir}/xml/xml.xsd" $XMLCATALOG
|
||||||
done
|
done
|
||||||
# Add xmldsig-core-schema.xsd to catalog
|
|
||||||
%{_bindir}/xmlcatalog --noout --add $type \
|
%{_bindir}/xmlcatalog --noout --add $type \
|
||||||
"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \
|
"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \
|
||||||
"file://%{_datadir}/xml/xmldsig-core-schema.xsd" $XMLCATALOG
|
"file://%{_datadir}/xml/xmldsig-core-schema.xsd" $XMLCATALOG
|
||||||
done
|
done
|
||||||
# Now put the common DocBook entries in it
|
|
||||||
%{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
%{_bindir}/xmlcatalog --noout --add "delegatePublic" \
|
||||||
"-//OASIS//ENTITIES DocBook XML" \
|
"-//OASIS//ENTITIES DocBook XML" \
|
||||||
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
"file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
|
||||||
@ -99,28 +97,28 @@ for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA 200102//
|
|||||||
"$public" \
|
"$public" \
|
||||||
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
||||||
done
|
done
|
||||||
|
|
||||||
%{_bindir}/xmlcatalog --noout --add "system" \
|
%{_bindir}/xmlcatalog --noout --add "system" \
|
||||||
"http://www.w3.org/2001/XMLSchema.dtd" \
|
"http://www.w3.org/2001/XMLSchema.dtd" \
|
||||||
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
"file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
|
||||||
|
|
||||||
# Also create the common DocBook catalog
|
|
||||||
%{_bindir}/xmlcatalog --noout --create \
|
%{_bindir}/xmlcatalog --noout --create \
|
||||||
$RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook/xmlcatalog
|
%{buildroot}%{_sysconfdir}/sgml/docbook/xmlcatalog
|
||||||
ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
|
|
||||||
$RPM_BUILD_ROOT%{_datadir}/sgml/docbook/xmlcatalog
|
|
||||||
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl
|
ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
|
||||||
install -p -m0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
|
%{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
|
$RPM_BUILD_ROOT%{_datadir}/sgml
|
||||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/*
|
|
||||||
install -p -m0644 %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} \
|
rm -rf %{buildroot}%{_datadir}/xml/*
|
||||||
|
install -p -m 0644 %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} \
|
||||||
$RPM_BUILD_ROOT%{_datadir}/xml
|
$RPM_BUILD_ROOT%{_datadir}/xml
|
||||||
|
|
||||||
# remove installed doc file and prepare installation with %%doc
|
rm %{buildroot}%{_datadir}/doc/*.html
|
||||||
rm $RPM_BUILD_ROOT%{_datadir}/doc/*.html
|
install -d -m 0755 -p __dist_doc/html/
|
||||||
rm -rf __dist_doc/html/
|
install -p doc/HTML/*.html __dist_doc/html/
|
||||||
mkdir -p __dist_doc/html/
|
|
||||||
cp -p doc/HTML/*.html __dist_doc/html/
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
|
if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
|
||||||
@ -143,32 +141,28 @@ if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc __dist_doc/html/ AUTHORS NEWS ChangeLog COPYING README
|
%defattr(-,root,root)
|
||||||
%dir %{_sysconfdir}/xml
|
%doc AUTHORS README
|
||||||
%dir %{_sysconfdir}/sgml
|
%license COPYING
|
||||||
%dir %{_sysconfdir}/sgml/docbook
|
%config(noreplace) %{_sysconfdir}/sgml/sgml.conf
|
||||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
|
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
|
||||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook/xmlcatalog
|
%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
|
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/sgml/catalog
|
||||||
%dir %{_datadir}/xml
|
%{_bindir}/*
|
||||||
%dir %{_datadir}/sgml
|
%{_datadir}/xml/*
|
||||||
%dir %{_datadir}/sgml/docbook
|
%{_datadir}/sgml/*
|
||||||
%dir %{_datadir}/sgml/sgml-iso-entities-8879.1986
|
|
||||||
%{_datadir}/xml/xml.xsd
|
%files help
|
||||||
%{_datadir}/xml/xmldsig-core-schema.xsd
|
%defattr(-,root,root)
|
||||||
%{_datadir}/xml/XMLSchema.dtd
|
%doc __dist_doc/html/ NEWS ChangeLog
|
||||||
%{_datadir}/xml/datatypes.dtd
|
%{_mandir}/man8/*
|
||||||
%{_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*
|
|
||||||
|
|
||||||
%changelog
|
%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
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user