xhtml-dtd10-vl.spec 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. %define catalog_name %{name}-%{version}-%{release}.cat
  2. Name: xhtml-dtd10
  3. Version: 1.0
  4. Release: 2%{?_dist_release}
  5. Group: Applications/Text
  6. Summary: XML document type definition for XHTML 1.0
  7. License: Distributable
  8. #Provides: html-dtd
  9. Requires: sgml-common >= 0.5
  10. BuildRequires: unzip
  11. BuildRoot: %{_tmppath}/%{name}-%{version}
  12. BuildArch: noarch
  13. Source0: http://www.w3.org/TR/xhtml1/xhtml1.zip
  14. Source1: http://www.w3.org/Consortium/Legal/copyright-documents-19990405.html
  15. Url: http://www.w3.org/TR/xhtml1/
  16. %description
  17. XML document type definition for XHTML 1.0
  18. %prep
  19. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  20. rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}
  21. %setup -c -T
  22. unzip %{SOURCE0}
  23. cp -a %{SOURCE1} .
  24. %build
  25. %install
  26. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  27. [ "${RPM_BUILD_ROOT}" != "/" ] && \
  28. mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0
  29. pushd xhtml1/DTD
  30. install -m0644 *.ent ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0
  31. install -m0644 *.dtd ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0
  32. install -m0644 *.dcl ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0
  33. install -m0644 *.soc ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0
  34. ln -s xhtml.soc ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0/catalog
  35. popd
  36. %clean
  37. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  38. rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}
  39. %files
  40. %defattr (-,root,root)
  41. %doc copyright-documents-19990405.html xhtml1/*.*
  42. %{_datadir}/sgml/xhtml/xhtml-dtd-1.0
  43. %post
  44. # Update the centralized catalog corresponding to this version of the DTD
  45. /usr/bin/install-catalog --add /etc/sgml/%{catalog_name} %{_datadir}/sgml/xhtml/xhtml-dtd-1.0/catalog > /dev/null
  46. # Update the link to the current version of the DTD
  47. ln -s -f /etc/sgml/%{catalog_name} /etc/sgml/xhtml.cat
  48. %postun
  49. # Update the centralized catalog corresponding to this version of the DTD
  50. /usr/bin/install-catalog --remove /etc/sgml/%{catalog_name} %{_datadir}/sgml/xhtml/xhtml-dtd-1.0/catalog > /dev/null
  51. # Update the link to the current version of the DTD
  52. if [ ! -e /etc/sgml/%{catalog_name} ]; then
  53. rm -f /etc/sgml/xhtml.cat
  54. OTHERCAT=`ls /etc/sgml/xhtml-?.*.cat 2> /dev/null | head --lines 1`
  55. if [ -n "$OTHERCAT" ]; then ln -s $OTHERCAT /etc/sgml/xhtml.cat; fi
  56. fi
  57. %changelog
  58. * Wed Oct 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.0-2vl5
  59. - applied new versioning policy
  60. * Mon Mar 24 2003 IWAI Masaharu <iwai@alib.jp> 1.0-1vl2
  61. - rename catalog file
  62. * Sun Jan 6 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp>
  63. - first release