96c45c
%global date    20020801
96c45c
96c45c
Name:           xhtml1-dtds
96c45c
Version:        1.0
476ae3
Release:        %{date}.11%{?dist}%{?extra_release}
96c45c
Summary:        XHTML 1.0 document type definitions
96c45c
96c45c
Group:          Applications/Text
96c45c
# W3C Software License for DTDs etc:
96c45c
# http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620#DTD
96c45c
License:        W3C
96c45c
URL:            http://www.w3.org/TR/2002/REC-xhtml1-%{date}/
96c45c
# Source0 generated with Source99, see comments in the script
96c45c
Source0:        %{name}-%{date}.tar.bz2
96c45c
Source1:        %{name}.catalog.xml
96c45c
Source99:       %{name}-prepare-tarball.sh
96c45c
Patch0:         %{name}-sgml-catalog.patch
96c45c
Patch1:         %{name}-sgml-dcl.patch
96c45c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
96c45c
96c45c
BuildArch:      noarch
96c45c
BuildRequires:  libxml2 >= 2.4.8
96c45c
Requires:       libxml2 >= 2.4.8
96c45c
Requires:       xml-common
96c45c
Requires:       sgml-common
96c45c
Requires(post): /usr/bin/xmlcatalog
96c45c
Requires(preun): /usr/bin/xmlcatalog
96c45c
96c45c
%description
96c45c
This provides the DTDs of the Second Edition of XHTML 1.0, a reformulation
96c45c
of HTML 4 as an XML 1.0 application, and three DTDs corresponding to the
96c45c
ones defined by HTML 4. The semantics of the elements and their attributes
96c45c
are defined in the W3C Recommendation for HTML 4. These semantics provide
96c45c
the foundation for future extensibility of XHTML.
96c45c
96c45c
96c45c
%prep
96c45c
%setup -q -n xhtml1-20020801
96c45c
%patch0 -p0
96c45c
%patch1 -p1
96c45c
cp -p %{SOURCE1} DTD/catalog.xml
96c45c
96c45c
96c45c
%build
96c45c
96c45c
96c45c
%install
96c45c
rm -rf $RPM_BUILD_ROOT
96c45c
96c45c
# Note: documentation is not shipped; the W3C Documentation License is not an
96c45c
# acceptable one per Fedora licensing guidelines.
96c45c
96c45c
mkdir -p $RPM_BUILD_ROOT%{_datadir}/xml/xhtml/1.0
96c45c
cp -p DTD/* $RPM_BUILD_ROOT%{_datadir}/xml/xhtml/1.0
96c45c
96c45c
# XML catalog:
96c45c
96c45c
xpkg() {
96c45c
  xmlcatalog --noout --add "$1" "$2" \
96c45c
    file://%{_datadir}/xml/xhtml/1.0/catalog.xml \
96c45c
    $RPM_BUILD_ROOT%{_sysconfdir}/xml/%{name}-%{version}-%{release}.xml
96c45c
}
96c45c
96c45c
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xml
96c45c
xmlcatalog --noout --create \
96c45c
  $RPM_BUILD_ROOT%{_sysconfdir}/xml/%{name}-%{version}-%{release}.xml
96c45c
xpkg delegatePublic "-//W3C//DTD XHTML 1.0 "
96c45c
xpkg delegatePublic "-//W3C//ENTITIES Latin 1 for XHTML"
96c45c
xpkg delegatePublic "-//W3C//ENTITIES Special for XHTML"
96c45c
xpkg delegatePublic "-//W3C//ENTITIES Symbols for XHTML"
96c45c
for i in xhtml1 2002/REC-xhtml1-%{date} ; do
96c45c
  xpkg delegateSystem http://www.w3.org/TR/$i/DTD/
96c45c
  xpkg delegateURI http://www.w3.org/TR/$i/DTD/
96c45c
done
96c45c
ln -s %{name}-%{version}-%{release}.xml \
96c45c
  $RPM_BUILD_ROOT%{_sysconfdir}/xml/%{name}.xml
96c45c
96c45c
# SGML catalog:
96c45c
96c45c
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml
96c45c
cd $RPM_BUILD_ROOT%{_sysconfdir}/sgml
96c45c
touch %{name}-%{version}-%{release}.soc
96c45c
ln -s %{name}-%{version}-%{release}.soc %{name}.soc
96c45c
cd -
96c45c
96c45c
96c45c
%clean
96c45c
rm -rf $RPM_BUILD_ROOT
96c45c
96c45c
96c45c
%post
96c45c
cd %{_sysconfdir}/xml
96c45c
[ -e catalog ] || /usr/bin/xmlcatalog --noout --create catalog
96c45c
/usr/bin/xmlcatalog --noout --add \
96c45c
    nextCatalog %{name}-%{version}-%{release}.xml "" catalog >/dev/null
96c45c
cd - >/dev/null
96c45c
/usr/bin/xmlcatalog --sgml --noout --add \
96c45c
    %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \
96c45c
    %{_datadir}/xml/xhtml/1.0/xhtml.soc >/dev/null
96c45c
:
96c45c
96c45c
%preun
96c45c
/usr/bin/xmlcatalog --noout --del \
96c45c
    %{name}-%{version}-%{release}.xml \
96c45c
    %{_sysconfdir}/xml/catalog >/dev/null
96c45c
/usr/bin/xmlcatalog --sgml --noout --del \
96c45c
    %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \
96c45c
    %{_datadir}/xml/xhtml/1.0/xhtml.soc >/dev/null
96c45c
:
96c45c
96c45c
96c45c
%files
96c45c
%defattr(644,root,root,755)
96c45c
%ghost %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc
96c45c
%{_sysconfdir}/sgml/%{name}.soc
96c45c
%{_sysconfdir}/xml/%{name}*.xml
96c45c
%{_datadir}/xml/xhtml/
96c45c
96c45c
96c45c
%changelog
476ae3
* Tue Jul 15 2014 Daniel Veillard <veillard@redhat.com> - 1.0-20020801.11
476ae3
- adding %{dist} to Release to avoid dist tag conflicts (rhbz#1028577)
476ae3
c4a2b4
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0-20020801.10
c4a2b4
- Mass rebuild 2013-12-27
c4a2b4
96c45c
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.9
96c45c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
96c45c
96c45c
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.8
96c45c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
96c45c
96c45c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.7
96c45c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
96c45c
96c45c
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.6
96c45c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
96c45c
96c45c
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.5
96c45c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
96c45c
96c45c
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.4
96c45c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
96c45c
96c45c
* Fri Feb 20 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.0-20020801.3
96c45c
- Prune nondistributable content from source tarball.
96c45c
96c45c
* Fri Dec 12 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.0-20020801.2
96c45c
- Drop no longer needed upgrade quirks.
96c45c
96c45c
* Thu Feb 28 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.0-20020801.1
96c45c
- Major spec file rewrite (#226559), most visible changes:
96c45c
- Various XML cataloguing improvements.
96c45c
- Register to SGML catalogs in addition to XML.
96c45c
- Install to %%{_datadir}/xml per the FHS.
96c45c
- Sync with Fedora packaging guidelines.
96c45c
- Silence post-install scriptlet.
96c45c
96c45c
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0-7.1.1
96c45c
- rebuild
96c45c
96c45c
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
96c45c
- rebuilt
96c45c
96c45c
* Wed Jun  2 2004 Daniel Veillard <veillard@redhat.com> 1.0-7
96c45c
- add BuildRequires: libxml2, fixes 125030
96c45c
96c45c
* Mon Feb 23 2004 Tim Waugh <twaugh@redhat.com>
96c45c
- Use ':' instead of '.' as separator for chown.
96c45c
96c45c
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
96c45c
- rebuilt
96c45c
96c45c
* Tue Oct 21 2003 Florian La Roche <Florian.LaRoche@redhat.de>
96c45c
- add %%clean specfile target
96c45c
96c45c
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
96c45c
- rebuilt
96c45c
96c45c
* Fri Dec 13 2002 Daniel Veillard <veillard@redhat.com> 1.0-4
96c45c
- Prepare for inclusion, Prereq xml-common, fix the uninstall
96c45c
  for upgrades of the package
96c45c
96c45c
* Thu Dec 12 2002 Daniel Veillard <veillard@redhat.com> 1.0-1
96c45c
- Creation, based on Tim Waugh docbook-dtd package