sgml-common-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. %global xmlxsdver 2009/01
  2. Summary: Common SGML catalog and DTD files.
  3. Summary(ja): 共用 SGML カタログ及び DTD ファイル集
  4. Name: sgml-common
  5. Version: 0.6.3
  6. Release: 42%{?_dist_release}
  7. Group: Applications/Text
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. BuildArch: noarch
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  12. License: GPL+
  13. #Actually - there is no homepage of this project, on that URL
  14. #page you could get complete ISO 8879 listing as was on the
  15. #old page - only part of it is included in sgml-common package.
  16. URL: http://www.w3.org/2003/entities/
  17. Source0: ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tgz
  18. # From openjade:
  19. Source1: xml.dcl
  20. Source2: xml.soc
  21. Source3: html.dcl
  22. Source4: html.soc
  23. Source5: http://www.w3.org/%{xmlxsdver}/xml.xsd
  24. Source6: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
  25. Source7: http://www.w3.org/2001/XMLSchema.dtd
  26. Source8: http://www.w3.org/2001/datatypes.dtd
  27. Source9: sgmlwhich.1
  28. Source10: sgml.conf.5
  29. Patch0: sgml-common-umask.patch
  30. Patch1: sgml-common-xmldir.patch
  31. Patch2: sgml-common-quotes.patch
  32. BuildRequires: libxml2 >= 2.4.8
  33. BuildRequires: automake
  34. Requires: /bin/basename
  35. %description
  36. The sgml-common package contains a collection of entities and DTDs
  37. that are useful for processing SGML, but that don't need to be
  38. included in multiple packages. Sgml-common also includes an
  39. up-to-date Open Catalog file.
  40. %package -n xml-common
  41. Summary: Common XML catalog and DTD files.
  42. Summary(ja): 共用 XML カタログ及び DTD ファイル集
  43. License: GPL+
  44. Group: Applications/Text
  45. Requires(pre): %{_bindir}/xmlcatalog
  46. %description -n xml-common
  47. The xml-common package contains a collection of entities and DTDs
  48. that are useful for processing XML, but that don't need to be
  49. included in multiple packages.
  50. %prep
  51. %setup -q
  52. %patch0 -p1 -b .umask
  53. %patch1 -p1 -b .xmldir
  54. %patch2 -p1 -b .quotes
  55. # replace bogus links with files
  56. automakedir=`ls -1d /usr/share/automake* | head -n +1`
  57. for file in COPYING INSTALL install-sh missing mkinstalldirs; do
  58. rm $file
  59. cp -p $automakedir/$file .
  60. done
  61. %build
  62. %configure
  63. %install
  64. [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
  65. make install DESTDIR=$RPM_BUILD_ROOT htmldir='%{_datadir}/doc' INSTALL='install -p'
  66. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xml
  67. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook
  68. mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgml/docbook
  69. # Touch SGML catalog
  70. touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog
  71. # Create an empty XML catalog.
  72. XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
  73. %{_bindir}/xmlcatalog --noout --create $XMLCATALOG
  74. # ...and add xml.xsd in it
  75. for type in system uri ; do
  76. for path in 2001 %{xmlxsdver} ; do
  77. %{_bindir}/xmlcatalog --noout --add $type \
  78. "http://www.w3.org/$path/xml.xsd" \
  79. "file://%{_datadir}/xml/xml.xsd" $XMLCATALOG
  80. done
  81. # Add xmldsig-core-schema.xsd to catalog
  82. %{_bindir}/xmlcatalog --noout --add $type \
  83. "http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \
  84. "file://%{_datadir}/xml/xmldsig-core-schema.xsd" $XMLCATALOG
  85. done
  86. # Now put the common DocBook entries in it
  87. %{_bindir}/xmlcatalog --noout --add "delegatePublic" \
  88. "-//OASIS//ENTITIES DocBook XML" \
  89. "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
  90. %{_bindir}/xmlcatalog --noout --add "delegatePublic" \
  91. "-//OASIS//DTD DocBook XML" \
  92. "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
  93. %{_bindir}/xmlcatalog --noout --add "delegatePublic" \
  94. "ISO 8879:1986" \
  95. "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
  96. %{_bindir}/xmlcatalog --noout --add "delegateSystem" \
  97. "http://www.oasis-open.org/docbook/" \
  98. "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
  99. %{_bindir}/xmlcatalog --noout --add "delegateURI" \
  100. "http://www.oasis-open.org/docbook/" \
  101. "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG
  102. for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA 200102//EN" ; do
  103. %{_bindir}/xmlcatalog --noout --add "public" \
  104. "$public" \
  105. "file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
  106. done
  107. %{_bindir}/xmlcatalog --noout --add "system" \
  108. "http://www.w3.org/2001/XMLSchema.dtd" \
  109. "file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG
  110. # Also create the common DocBook catalog
  111. %{_bindir}/xmlcatalog --noout --create \
  112. $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook/xmlcatalog
  113. ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\
  114. $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/xmlcatalog
  115. rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl
  116. install -p -m0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
  117. $RPM_BUILD_ROOT%{_datadir}/sgml
  118. rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/*
  119. install -p -m0644 %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} \
  120. $RPM_BUILD_ROOT%{_datadir}/xml
  121. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
  122. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
  123. install -p -m0644 %{SOURCE9} $RPM_BUILD_ROOT%{_mandir}/man1
  124. install -p -m0644 %{SOURCE10} $RPM_BUILD_ROOT%{_mandir}/man5
  125. # remove installed doc file and prepare installation with %%doc
  126. rm -f $RPM_BUILD_ROOT%{_datadir}/doc/*.html
  127. rm -rf __dist_doc/html/
  128. mkdir -p __dist_doc/html/
  129. cp -p doc/HTML/*.html __dist_doc/html/
  130. %clean
  131. [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
  132. %pre -n xml-common
  133. if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
  134. for type in system uri ; do
  135. for path in 2001 %{xmlxsdver} ; do
  136. %{_bindir}/xmlcatalog --noout --add $type \
  137. "http://www.w3.org/$path/xml.xsd" \
  138. "file://%{_datadir}/xml/xml.xsd" \
  139. %{_sysconfdir}/xml/catalog
  140. done
  141. %{_bindir}/xmlcatalog --noout --add $type \
  142. "http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \
  143. "file://%{_datadir}/xml/xmldsig-core-schema.xsd" %{_sysconfdir}/xml/catalog
  144. done
  145. for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA200102//EN" ; do
  146. %{_bindir}/xmlcatalog --noout --add "public" \
  147. "$public" \
  148. "file://%{_datadir}/xml/XMLSchema.dtd" %{_sysconfdir}/xml/catalog
  149. done
  150. fi
  151. %files
  152. %defattr (-,root,root)
  153. %license COPYING
  154. %doc __dist_doc/html/ AUTHORS NEWS ChangeLog README
  155. %dir %{_sysconfdir}/sgml
  156. %config(noreplace) %{_sysconfdir}/sgml/sgml.conf
  157. %ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/sgml/catalog
  158. %dir %{_datadir}/sgml
  159. %dir %{_datadir}/sgml/sgml-iso-entities-8879.1986
  160. %{_datadir}/sgml/sgml-iso-entities-8879.1986/*
  161. %{_datadir}/sgml/xml.dcl
  162. %{_datadir}/sgml/xml.soc
  163. %{_datadir}/sgml/html.dcl
  164. %{_datadir}/sgml/html.soc
  165. %{_bindir}/sgmlwhich
  166. %{_bindir}/install-catalog
  167. %{_mandir}/man8/install-catalog.8*
  168. %{_mandir}/man1/sgmlwhich.1*
  169. %{_mandir}/man5/sgml.conf.5*
  170. %files -n xml-common
  171. %defattr (-,root,root)
  172. %license COPYING
  173. %doc AUTHORS NEWS ChangeLog README
  174. %dir %{_sysconfdir}/xml
  175. %dir %{_sysconfdir}/sgml
  176. %dir %{_sysconfdir}/sgml/docbook
  177. %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
  178. %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook/xmlcatalog
  179. %dir %{_datadir}/sgml
  180. %dir %{_datadir}/sgml/docbook
  181. %{_datadir}/sgml/docbook/xmlcatalog
  182. %dir %{_datadir}/xml
  183. %{_datadir}/xml/xml.xsd
  184. %{_datadir}/xml/xmldsig-core-schema.xsd
  185. %{_datadir}/xml/XMLSchema.dtd
  186. %{_datadir}/xml/datatypes.dtd
  187. %changelog
  188. * Sat Apr 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.3-42
  189. - imported Source6-10 from rawhide.
  190. * Sun Nov 16 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.6.3-41
  191. - updated based on Fedora 0.6.3-41
  192. * Thu Oct 11 2012 Ondrej Vasik <ovasik@redhat.com> 0.6.3-38
  193. - get rid of the explicit automake14 requirement
  194. * Sun Oct 30 2011 Ville Skyttä <ville.skytta@iki.fi> - 0.6.3-35
  195. - Include xml.xsd in xml-common (#750073).
  196. * Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.3-35
  197. - rebuild with VineSeed environment
  198. * Fri Apr 22 2011 IWAI, Masaharu <iwai@alib.jp> 0.6.3-34
  199. - sync Fedora 0.6.3-34
  200. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-34
  201. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  202. * Mon Jul 12 2010 Ondrej Vasik <ovasik@redhat.com> 0.6.3-33
  203. - ship COPYING file with both sgml-common and xml-common
  204. - ship documentation with xml-common
  205. * Sat Mar 6 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.3-33
  206. - updated based on FC 0.6.3-32
  207. * Tue Jul 01 2008 Ondrej Vasik <ovasik@redhat.com> 0.6.3-25
  208. - mark xmlcatalog config(noreplace) to prevent overwriting
  209. of the content, move it to sysconfdir and make symlink for
  210. it to silence rpmlint
  211. * Mon Jun 30 2008 Ondrej Vasik <ovasik@redhat.com> 0.6.3-24
  212. - mark catalog files as (not md5 size mtime) for verify to
  213. prevent info about changed files
  214. * Thu Nov 15 2007 Ondrej Vasik <ovasik@redhat.com> 0.6.3-22
  215. - Merge Review(226415)
  216. - changed: License Tag, using RPM macros instead of hardcoded
  217. dirs, summary ended with dot, added URL, removed CHANGES
  218. file as obsolete, preserved timestamps and some other cosmetic
  219. changes
  220. - no longer shipping old automake tarball, fixed issue with man8_DATA,
  221. BuildRequire:Automake,Autoconf again(see MergeReview discussion)
  222. * Sun Jun 8 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.3-22
  223. - updated Requires: coreutils instead of sh-utils fileutils textutils
  224. - applied new versioning policy
  225. * Sun Jul 8 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.3-21vl1
  226. - s/Copyright/License/
  227. - rebuilt based on Fedora development package 0.6.3-21
  228. * Mon May 28 2007 Ondrej Vasik <ovasik@redhat.com> 0.6.3-21
  229. - Fixed broken URL (changed to XML entity declarations) (bug #237726)
  230. * Tue May 15 2007 Tim Waugh <twaugh@redhat.com> 0.6.3-20
  231. - Added dist tag.
  232. - Fixed summary.
  233. - Removed build dependency on autoconf/automake.
  234. * Tue Oct 24 2006 Tim Waugh <twaugh@redhat.com> 0.6.3-19
  235. - Removed stale URL (bug #210848).
  236. * Tue Jun 3 2003 Jun Nishii <jun@vinelinux.org> 0.6.3-14vl2
  237. - added install-catalog process in post/preun scripts
  238. * Sat Apr 12 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 0.6.3-14vl1
  239. - sync Rawhide 0.6.3-14
  240. * Thu Jan 31 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 0.6.3-8vl1
  241. - sync Rawhide 0.6.3-8
  242. - added BuildRequires: libxml2 >= 2.4.8
  243. - Use (and handle) catalog files with quotes in install-catalog.
  244. (sgml-common-quotes.patch)
  245. - added sgml-common-xmldir.patch
  246. - use rpmmacros
  247. - obsoleted sgml-common-oldsyntax.patch ( upstream merged )
  248. * Thu Oct 11 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.5-7vl1
  249. - Rebuild for Vine.
  250. - Added a script to remove old catalog file.
  251. * Wed May 23 2001 Tim Waugh <twaugh@redhat.com> 0.5-7
  252. - Remove execute bit from data files.
  253. * Mon May 21 2001 Tim Waugh <twaugh@redhat.com> 0.5-6
  254. - install-catalog needs to make sure that it creates world-readable files
  255. (bug #41552).
  256. * Wed Mar 14 2001 Tim Powers <timp@redhat.com> 0.5-5
  257. - fixed license
  258. * Wed Jan 24 2001 Tim Waugh <twaugh@redhat.com>
  259. - Make install-catalog quieter during normal operation.
  260. * Tue Jan 23 2001 Tim Waugh <twaugh@redhat.com>
  261. - Require textutils, fileutils, grep (bug #24719).
  262. * Wed Jan 17 2001 Tim Waugh <twaugh@redhat.com>
  263. - Require sh-utils.
  264. * Mon Jan 15 2001 Tim Waugh <twaugh@redhat.com>
  265. - Don't play so many macro games.
  266. - Fix typo in install-catalog patch.
  267. * Mon Jan 08 2001 Tim Waugh <twaugh@redhat.com>
  268. - Change group.
  269. - Install by hand (man/en/...). Use %%{_mandir}.
  270. - Use %%{_tmppath}.
  271. - Make install-catalog fail silently if given the old syntax.
  272. - Add CHANGES file.
  273. - Change Copyright: to License:.
  274. - Remove Packager: line.
  275. * Mon Jan 08 2001 Tim Waugh <twaugh@redhat.com>
  276. - Based on Eric Bischoff's new-trials packages.