xhtml-dtd11-vl.spec 2.2 KB

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