Name: html-dtd401
Version: 1.0
Release: 1vl1
Group: Applications/Text

Summary: SGML document type definition for HTML 4.01

License: Distributable

#Provides: html-dtd
Requires: sgml-common >= 0.5 fileutils

BuildRoot: %{_tmppath}/%{name}-%{version}

BuildArch: noarch
Source0: http://www.w3.org/TR/html401/strict.dtd
Source1: /www.w3.org/TR/html401/loose.dtd
Source2: /www.w3.org/TR/html401/frameset.dtd
Source3: /www.w3.org/TR/html401/HTMLlat1.ent
Source4: /www.w3.org/TR/html401/HTMLsymbol.ent
Source5: /www.w3.org/TR/html401/HTMLspecial.ent
Source6: html401.cat
Url: http://www.w3.org/TR/html401/

%description
This is HTML 4.01 Strict DTD, which excludes the presentation 
attributes and elements that W3C expects to phase out as 
support for style sheets matures. Authors should use the Strict 
DTD when possible, but may use the Transitional DTD when support 
for presentation attribute and elements is required.


%prep
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}

%setup -c -T -n %{name}-%{version}
cp %{SOURCE0} .
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
cp %{SOURCE6} .

%build


%install
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
[ "${RPM_BUILD_ROOT}" != "/" ] && \
            mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/sgml/html/html-dtd-4.01

install -m0644 *.ent ${RPM_BUILD_ROOT}%{_datadir}/sgml/html/html-dtd-4.01
install -m0644 *.dtd ${RPM_BUILD_ROOT}%{_datadir}/sgml/html/html-dtd-4.01
install -m0644 *.cat ${RPM_BUILD_ROOT}%{_datadir}/sgml/html/html-dtd-4.01
ln -s  html401.cat ${RPM_BUILD_ROOT}%{_datadir}/sgml/html/html-dtd-4.01/catalog

%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}

%files
%defattr (-,root,root)
%{_datadir}/sgml/html/html-dtd-4.01


%post
# Update the centralized catalog corresponding to this version of the DTD
/usr/bin/install-catalog --add /etc/sgml/html-4.01.cat %{_datadir}/sgml/html/html-dtd-4.01/catalog > /dev/null

# Update the link to the current version of the DTD
ln -s -f /etc/sgml/html-4.01.cat /etc/sgml/html.cat

%postun
# Update the centralized catalog corresponding to this version of the DTD
/usr/bin/install-catalog --remove /etc/sgml/html-4.01.cat %{_datadir}/sgml/html/html-dtd-4.01/catalog > /dev/null

# Update the link to the current version of the DTD
if [ ! -e /etc/sgml/html-4.01.cat ]; then
    rm -f /etc/sgml/html.cat
    OTHERCAT=`ls /etc/sgml/html-?.*.cat 2> /dev/null | head --lines 1`
    if [ -n "$OTHERCAT" ]; then ln -s $OTHERCAT /etc/sgml/html.cat; fi
fi

%changelog
* Tue Jan  1 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.0-1vl1
- first release