talimat 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. # Description: XML veri dosyalarının DocBook kural setine göre doğrulanması için bir doküman tipi tanımları
  2. # URL: http://www.docbook.org/
  3. # Packager: milisarge
  4. # Depends on: libxml2 unzip
  5. name=docbook-xml
  6. version=4.5
  7. release=1
  8. source=(http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
  9. http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip
  10. http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip
  11. http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip
  12. http://www.docbook.org/xml/4.1.2/docbkx412.zip)
  13. unpack_source() {
  14. # similarly-named versions first
  15. local DTDVERSION
  16. for DTDVERSION in 4.5 4.4 4.3 4.2; do
  17. install -d $SRC/$name-$DTDVERSION
  18. unzip -q -d $SRC/$name-$DTDVERSION $DERLEME_KAYNAKDIZIN/$name-$DTDVERSION.zip
  19. done
  20. # now 4.1.2, named differently
  21. install -d $SRC/$name-4.1.2
  22. unzip -q -d $SRC/$name-4.1.2 $DERLEME_KAYNAKDIZIN/docbkx412.zip
  23. }
  24. build() {
  25. # copy to proper locations
  26. for DTDVERSION in 4.5 4.4 4.3 4.2 4.1.2
  27. do
  28. install -d $PKG/usr/share/xml/docbook/xml-dtd-$DTDVERSION
  29. cp -a $SRC/$name-$DTDVERSION/{ent,docbook.cat,*.dtd,*.mod} \
  30. $PKG/usr/share/xml/docbook/xml-dtd-$DTDVERSION/
  31. done
  32. find $PKG -type f \( -perm -g=r -o -perm -g=w \) -exec chmod -g=rw {} \+
  33. # create initial docbook-xml catalog
  34. install -d $PKG/etc/xml
  35. xmlcatalog --noout --create $PKG/etc/xml/$name
  36. # add each version to the initial catalog
  37. #
  38. # 4.5
  39. xmlcatalog --noout --add "public" \
  40. "-//OASIS//DTD DocBook XML V4.5//EN" \
  41. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
  42. $PKG/etc/xml/$name
  43. xmlcatalog --noout --add "public" \
  44. "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
  45. "http://www.oasis-open.org/docbook/xml/4.5/calstblx.dtd" \
  46. $PKG/etc/xml/$name
  47. xmlcatalog --noout --add "public" \
  48. "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
  49. "http://www.oasis-open.org/docbook/xml/4.5/soextblx.dtd" \
  50. $PKG/etc/xml/$name
  51. xmlcatalog --noout --add "public" \
  52. "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
  53. "http://www.oasis-open.org/docbook/xml/4.5/dbpoolx.mod" \
  54. $PKG/etc/xml/$name
  55. xmlcatalog --noout --add "public" \
  56. "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
  57. "http://www.oasis-open.org/docbook/xml/4.5/dbhierx.mod" \
  58. $PKG/etc/xml/$name
  59. xmlcatalog --noout --add "public" \
  60. "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
  61. "http://www.oasis-open.org/docbook/xml/4.5/htmltblx.mod" \
  62. $PKG/etc/xml/$name
  63. xmlcatalog --noout --add "public" \
  64. "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
  65. "http://www.oasis-open.org/docbook/xml/4.5/dbnotx.mod" \
  66. $PKG/etc/xml/$name
  67. xmlcatalog --noout --add "public" \
  68. "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
  69. "http://www.oasis-open.org/docbook/xml/4.5/dbcentx.mod" \
  70. $PKG/etc/xml/$name
  71. xmlcatalog --noout --add "public" \
  72. "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
  73. "http://www.oasis-open.org/docbook/xml/4.5/dbgenent.mod" \
  74. $PKG/etc/xml/$name
  75. xmlcatalog --noout --add "rewriteSystem" \
  76. "http://www.oasis-open.org/docbook/xml/4.5" \
  77. "file:///usr/share/xml/docbook/xml-dtd-4.5" \
  78. $PKG/etc/xml/$name
  79. xmlcatalog --noout --add "rewriteURI" \
  80. "http://www.oasis-open.org/docbook/xml/4.5" \
  81. "file:///usr/share/xml/docbook/xml-dtd-4.5" \
  82. $PKG/etc/xml/$name
  83. # 4.4
  84. xmlcatalog --noout --add "public" \
  85. "-//OASIS//DTD DocBook XML V4.4//EN" \
  86. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \
  87. $PKG/etc/xml/$name
  88. xmlcatalog --noout --add "public" \
  89. "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \
  90. "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \
  91. $PKG/etc/xml/$name
  92. xmlcatalog --noout --add "public" \
  93. "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \
  94. "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \
  95. $PKG/etc/xml/$name
  96. xmlcatalog --noout --add "public" \
  97. "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
  98. "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \
  99. $PKG/etc/xml/$name
  100. xmlcatalog --noout --add "public" \
  101. "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \
  102. "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \
  103. $PKG/etc/xml/$name
  104. xmlcatalog --noout --add "public" \
  105. "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \
  106. "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \
  107. $PKG/etc/xml/$name
  108. xmlcatalog --noout --add "public" \
  109. "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \
  110. "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \
  111. $PKG/etc/xml/$name
  112. xmlcatalog --noout --add "public" \
  113. "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \
  114. "http://www.oasis-open.org/docbook/xml/4.4/dbnotx.mod" \
  115. $PKG/etc/xml/$name
  116. xmlcatalog --noout --add "public" \
  117. "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \
  118. "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \
  119. $PKG/etc/xml/$name
  120. xmlcatalog --noout --add "rewriteSystem" \
  121. "http://www.oasis-open.org/docbook/xml/4.4" \
  122. "file:///usr/share/xml/docbook/xml-dtd-4.4" \
  123. $PKG/etc/xml/$name
  124. xmlcatalog --noout --add "rewriteURI" \
  125. "http://www.oasis-open.org/docbook/xml/4.4" \
  126. "file:///usr/share/xml/docbook/xml-dtd-4.4" \
  127. $PKG/etc/xml/$name
  128. # 4.3
  129. xmlcatalog --noout --add "public" \
  130. "-//OASIS//DTD DocBook XML V4.3//EN" \
  131. "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
  132. $PKG/etc/xml/$name
  133. xmlcatalog --noout --add "public" \
  134. "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \
  135. "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \
  136. $PKG/etc/xml/$name
  137. xmlcatalog --noout --add "public" \
  138. "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
  139. "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \
  140. $PKG/etc/xml/$name
  141. xmlcatalog --noout --add "public" \
  142. "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \
  143. "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \
  144. $PKG/etc/xml/$name
  145. xmlcatalog --noout --add "public" \
  146. "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \
  147. "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \
  148. $PKG/etc/xml/$name
  149. xmlcatalog --noout --add "public" \
  150. "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \
  151. "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \
  152. $PKG/etc/xml/$name
  153. xmlcatalog --noout --add "public" \
  154. "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \
  155. "http://www.oasis-open.org/docbook/xml/4.3/dbnotx.mod" \
  156. $PKG/etc/xml/$name
  157. xmlcatalog --noout --add "public" \
  158. "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \
  159. "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \
  160. $PKG/etc/xml/$name
  161. xmlcatalog --noout --add "rewriteSystem" \
  162. "http://www.oasis-open.org/docbook/xml/4.3" \
  163. "file:///usr/share/xml/docbook/xml-dtd-4.3" \
  164. $PKG/etc/xml/$name
  165. xmlcatalog --noout --add "rewriteURI" \
  166. "http://www.oasis-open.org/docbook/xml/4.3" \
  167. "file:///usr/share/xml/docbook/xml-dtd-4.3" \
  168. $PKG/etc/xml/$name
  169. # 4.2
  170. xmlcatalog --noout --add "public" \
  171. "-//OASIS/DTD DocBook XML V4.2//EN" \
  172. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \
  173. $PKG/etc/xml/$name
  174. xmlcatalog --noout --add "public" \
  175. "-//OASIS/DTD DocBook CALS Table Model V4.2//EN" \
  176. "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \
  177. $PKG/etc/xml/$name
  178. xmlcatalog --noout --add "public" \
  179. "-//OASIS/DTD XML Exchange Table Model 19990315//EN" \
  180. "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \
  181. $PKG/etc/xml/$name
  182. xmlcatalog --noout --add "public" \
  183. "-//OASIS/ELEMENTS DocBook Information Pool V4.2//EN" \
  184. "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \
  185. $PKG/etc/xml/$name
  186. xmlcatalog --noout --add "public" \
  187. "-//OASIS/ELEMENTS DocBook Document Hierarchy V4.2//EN" \
  188. "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \
  189. $PKG/etc/xml/$name
  190. xmlcatalog --noout --add "public" \
  191. "-//OASIS/ENTITIES DocBook Additional General Entities V4.2//EN" \
  192. "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \
  193. $PKG/etc/xml/$name
  194. xmlcatalog --noout --add "public" \
  195. "-//OASIS/ENTITIES DocBook Notations V4.2//EN" \
  196. "http://www.oasis-open.org/docbook/xml/4.2/dbnotx.mod" \
  197. $PKG/etc/xml/$name
  198. xmlcatalog --noout --add "public" \
  199. "-//OASIS/ENTITIES DocBook Character Entities V4.2//EN" \
  200. "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \
  201. $PKG/etc/xml/$name
  202. xmlcatalog --noout --add "rewriteSystem" \
  203. "http://www.oasis-open.org/docbook/xml/4.2" \
  204. "file:///usr/share/xml/docbook/xml-dtd-4.2" \
  205. $PKG/etc/xml/$name
  206. xmlcatalog --noout --add "rewriteURI" \
  207. "http://www.oasis-open.org/docbook/xml/4.2" \
  208. "file:///usr/share/xml/docbook/xml-dtd-4.2" \
  209. $PKG/etc/xml/$name
  210. # 4.1.2
  211. xmlcatalog --noout --add "public" \
  212. "-//OASIS//DTD DocBook XML V4.1.2//EN" \
  213. "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
  214. $PKG/etc/xml/$name
  215. xmlcatalog --noout --add "public" \
  216. "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
  217. "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
  218. $PKG/etc/xml/$name
  219. xmlcatalog --noout --add "public" \
  220. "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
  221. "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \
  222. $PKG/etc/xml/$name
  223. xmlcatalog --noout --add "public" \
  224. "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
  225. "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \
  226. $PKG/etc/xml/$name
  227. xmlcatalog --noout --add "public" \
  228. "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
  229. "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \
  230. $PKG/etc/xml/$name
  231. xmlcatalog --noout --add "public" \
  232. "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
  233. "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \
  234. $PKG/etc/xml/$name
  235. xmlcatalog --noout --add "public" \
  236. "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
  237. "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotx.mod" \
  238. $PKG/etc/xml/$name
  239. xmlcatalog --noout --add "public" \
  240. "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
  241. "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \
  242. $PKG/etc/xml/$name
  243. xmlcatalog --noout --add "rewriteSystem" \
  244. "http://www.oasis-open.org/docbook/xml/4.1.2" \
  245. "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
  246. $PKG/etc/xml/$name
  247. xmlcatalog --noout --add "rewriteURI" \
  248. "http://www.oasis-open.org/docbook/xml/4.1.2" \
  249. "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
  250. $PKG/etc/xml/$name
  251. rm $PKG/usr/share/xml/docbook/xml-dtd-4.{4,5}/ent/README
  252. }