[8798] | 1 | %global version_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml} 4.{2,3,4,5}-rng 4.{2,3,4,5}-xsd" |
---|
| 2 | %global catalog_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml}" |
---|
| 3 | |
---|
[521] | 4 | Name: docbook-dtds |
---|
| 5 | Version: 1.0 |
---|
[8798] | 6 | Release: 57%{?_dist_release} |
---|
[521] | 7 | Group: Applications/Text |
---|
| 8 | |
---|
| 9 | Summary: SGML and XML document type definitions for DocBook. |
---|
| 10 | Summary(ja): DocBook 向け SGML/XML DTD |
---|
| 11 | |
---|
| 12 | License: Copyright only |
---|
| 13 | URL: http://www.oasis-open.org/docbook/ |
---|
| 14 | |
---|
| 15 | Obsoletes: docbook-dtd30-sgml < %{version}-%{release} |
---|
| 16 | Obsoletes: docbook-dtd31-sgml < %{version}-%{release} |
---|
| 17 | Obsoletes: docbook-dtd40-sgml < %{version}-%{release} |
---|
| 18 | Obsoletes: docbook-dtd41-sgml < %{version}-%{release} |
---|
| 19 | Obsoletes: docbook-dtd412-xml < %{version}-%{release} |
---|
| 20 | |
---|
| 21 | Provides: docbook-dtd-xml = %{version}-%{release} |
---|
| 22 | Provides: docbook-dtd-sgml = %{version}-%{release} |
---|
| 23 | Provides: docbook-dtd30-sgml = %{version}-%{release} |
---|
| 24 | Provides: docbook-dtd31-sgml = %{version}-%{release} |
---|
| 25 | Provides: docbook-dtd40-sgml = %{version}-%{release} |
---|
| 26 | Provides: docbook-dtd41-sgml = %{version}-%{release} |
---|
| 27 | Provides: docbook-dtd412-xml = %{version}-%{release} |
---|
| 28 | Provides: docbook-dtd42-sgml = %{version}-%{release} |
---|
| 29 | Provides: docbook-dtd42-xml = %{version}-%{release} |
---|
| 30 | Provides: docbook-dtd43-sgml = %{version}-%{release} |
---|
| 31 | Provides: docbook-dtd43-xml = %{version}-%{release} |
---|
| 32 | Provides: docbook-dtd44-sgml = %{version}-%{release} |
---|
| 33 | Provides: docbook-dtd44-xml = %{version}-%{release} |
---|
| 34 | Provides: docbook-dtd45-sgml = %{version}-%{release} |
---|
| 35 | Provides: docbook-dtd45-xml = %{version}-%{release} |
---|
| 36 | |
---|
| 37 | Requires(post): /usr/bin/xmlcatalog |
---|
| 38 | Requires(postun): /usr/bin/xmlcatalog |
---|
| 39 | Requires(post): /bin/chmod |
---|
[3636] | 40 | Requires(post,postun): sed |
---|
[521] | 41 | Requires: sgml-common >= 0.6.3-4 |
---|
| 42 | Requires: xml-common >= 0.6.3-8 |
---|
| 43 | |
---|
| 44 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 45 | |
---|
| 46 | BuildArch: noarch |
---|
| 47 | Source0: http://www.oasis-open.org/docbook/sgml/3.0/docbk30.zip |
---|
| 48 | Source1: http://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip |
---|
| 49 | Source2: http://www.oasis-open.org/docbook/sgml/4.0/docbk40.zip |
---|
| 50 | Source3: http://www.oasis-open.org/docbook/sgml/4.1/docbk41.zip |
---|
| 51 | Source4: http://www.oasis-open.org/docbook/xml/4.1.2/docbkx412.zip |
---|
| 52 | Source5: http://www.oasis-open.org/docbook/sgml/4.2/docbook-4.2.zip |
---|
| 53 | Source6: http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip |
---|
| 54 | Source7: http://www.docbook.org/sgml/4.3/docbook-4.3.zip |
---|
| 55 | Source8: http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip |
---|
| 56 | Source9: http://www.docbook.org/sgml/4.4/docbook-4.4.zip |
---|
| 57 | Source10: http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip |
---|
| 58 | Source11: http://www.docbook.org/sgml/4.5/docbook-4.5.zip |
---|
| 59 | Source12: http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip |
---|
[8798] | 60 | Source13: http://www.docbook.org/rng/4.2/docbook-rng-4.2.zip |
---|
| 61 | Source14: http://www.docbook.org/rng/4.3/docbook-rng-4.3.zip |
---|
| 62 | Source15: http://www.docbook.org/rng/4.4/docbook-rng-4.4.zip |
---|
| 63 | #compressed from http://www.docbook.org/rng/4.5/ upstream archive unavailable |
---|
| 64 | Source16: docbook-rng-4.5.zip |
---|
| 65 | Source17: http://www.docbook.org/xsd/4.2/docbook-xsd-4.2.zip |
---|
| 66 | Source18: http://www.docbook.org/xsd/4.3/docbook-xsd-4.3.zip |
---|
| 67 | Source19: http://www.docbook.org/xsd/4.4/docbook-xsd-4.4.zip |
---|
| 68 | #compressed from http://www.docbook.org/xsd/4.5/ upstream archive unavailable |
---|
| 69 | Source20: docbook-xsd-4.5.zip |
---|
[521] | 70 | # fix old catalog files |
---|
| 71 | Patch0: docbook-dtd30-sgml-1.0.catalog.patch |
---|
| 72 | Patch1: docbook-dtd31-sgml-1.0.catalog.patch |
---|
| 73 | Patch2: docbook-dtd40-sgml-1.0.catalog.patch |
---|
| 74 | Patch3: docbook-dtd41-sgml-1.0.catalog.patch |
---|
| 75 | Patch4: docbook-dtd42-sgml-1.0.catalog.patch |
---|
| 76 | # fix euro sign in 4.2 dtds |
---|
| 77 | Patch5: docbook-4.2-euro.patch |
---|
| 78 | # Fix ISO entities in 4.3/4.4/4.5 SGML |
---|
| 79 | Patch6: docbook-dtds-ents.patch |
---|
| 80 | # Use system rewrite for web URL's in sgml catalogs to prevent reading from the network(#478680) |
---|
| 81 | Patch7: docbook-sgml-systemrewrite.patch |
---|
| 82 | # use XML at the end of public identificators of XML 4.1.2 ISO entities |
---|
| 83 | Patch8: docbook-dtd412-entities.patch |
---|
| 84 | |
---|
| 85 | BuildRequires: unzip |
---|
| 86 | |
---|
| 87 | %define openjadever 1.3.2 |
---|
| 88 | #PreReq: openjade = %{openjadever} |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | %description |
---|
| 92 | The DocBook Document Type Definition (DTD) describes the syntax of |
---|
| 93 | technical documentation texts (articles, books and manual pages). |
---|
| 94 | This syntax is XML-compliant and is developed by the OASIS consortium. |
---|
| 95 | This package contains SGML and XML versions of the DocBook DTD. |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | %prep |
---|
| 99 | %setup -c -T |
---|
| 100 | # DocBook V3.0 |
---|
| 101 | mkdir 3.0-sgml |
---|
| 102 | cd 3.0-sgml |
---|
| 103 | unzip %{SOURCE0} |
---|
| 104 | %patch0 -p0 -b docbook.cat |
---|
| 105 | cd .. |
---|
| 106 | |
---|
| 107 | # DocBook V3.1 |
---|
| 108 | mkdir 3.1-sgml |
---|
| 109 | cd 3.1-sgml |
---|
| 110 | unzip %{SOURCE1} |
---|
| 111 | %patch1 -p0 -b docbook.cat |
---|
| 112 | cd .. |
---|
| 113 | |
---|
| 114 | # DocBook V4.0 |
---|
| 115 | mkdir 4.0-sgml |
---|
| 116 | cd 4.0-sgml |
---|
| 117 | unzip %{SOURCE2} |
---|
| 118 | %patch2 -p0 -b docbook.cat |
---|
| 119 | cd .. |
---|
| 120 | |
---|
| 121 | # DocBook V4.1 |
---|
| 122 | mkdir 4.1-sgml |
---|
| 123 | cd 4.1-sgml |
---|
| 124 | unzip %{SOURCE3} |
---|
| 125 | %patch3 -p0 -b docbook.cat |
---|
| 126 | cd .. |
---|
| 127 | |
---|
| 128 | # DocBook XML V4.1.2 |
---|
| 129 | mkdir 4.1.2-xml |
---|
| 130 | cd 4.1.2-xml |
---|
| 131 | unzip %{SOURCE4} |
---|
| 132 | cd .. |
---|
| 133 | |
---|
| 134 | # DocBook V4.2 |
---|
| 135 | mkdir 4.2-sgml |
---|
| 136 | cd 4.2-sgml |
---|
| 137 | unzip %{SOURCE5} |
---|
| 138 | %patch4 -p0 -b docbook.cat |
---|
| 139 | cd .. |
---|
| 140 | |
---|
| 141 | # DocBook XML V4.2 |
---|
| 142 | mkdir 4.2-xml |
---|
| 143 | cd 4.2-xml |
---|
| 144 | unzip %{SOURCE6} |
---|
| 145 | cd .. |
---|
| 146 | |
---|
| 147 | # DocBook V4.3 |
---|
| 148 | mkdir 4.3-sgml |
---|
| 149 | cd 4.3-sgml |
---|
| 150 | unzip %{SOURCE7} |
---|
| 151 | cd .. |
---|
| 152 | |
---|
| 153 | # DocBook XML V4.3 |
---|
| 154 | mkdir 4.3-xml |
---|
| 155 | cd 4.3-xml |
---|
| 156 | unzip %{SOURCE8} |
---|
| 157 | cd .. |
---|
| 158 | |
---|
| 159 | # DocBook V4.4 |
---|
| 160 | mkdir 4.4-sgml |
---|
| 161 | cd 4.4-sgml |
---|
| 162 | unzip %{SOURCE9} |
---|
| 163 | cd .. |
---|
| 164 | |
---|
| 165 | # DocBook XML V4.4 |
---|
| 166 | mkdir 4.4-xml |
---|
| 167 | cd 4.4-xml |
---|
| 168 | unzip %{SOURCE10} |
---|
| 169 | cd .. |
---|
| 170 | |
---|
| 171 | # DocBook v4.5 |
---|
| 172 | mkdir 4.5-sgml |
---|
| 173 | cd 4.5-sgml |
---|
| 174 | unzip %{SOURCE11} |
---|
| 175 | cd .. |
---|
| 176 | |
---|
| 177 | # DocBook XML v4.5 |
---|
| 178 | mkdir 4.5-xml |
---|
| 179 | cd 4.5-xml |
---|
| 180 | unzip %{SOURCE12} |
---|
| 181 | cd .. |
---|
| 182 | |
---|
[8798] | 183 | # Docbook RNG v4.2 |
---|
| 184 | mkdir 4.2-rng |
---|
| 185 | cd 4.2-rng |
---|
| 186 | unzip %{SOURCE13} |
---|
| 187 | cd .. |
---|
| 188 | |
---|
| 189 | # Docbook RNG v4.3 |
---|
| 190 | mkdir 4.3-rng |
---|
| 191 | cd 4.3-rng |
---|
| 192 | unzip %{SOURCE14} |
---|
| 193 | cd .. |
---|
| 194 | |
---|
| 195 | # Docbook RNG v4.4 |
---|
| 196 | mkdir 4.4-rng |
---|
| 197 | cd 4.4-rng |
---|
| 198 | unzip %{SOURCE15} |
---|
| 199 | cd .. |
---|
| 200 | |
---|
| 201 | # Docbook RNG v4.5 |
---|
| 202 | mkdir 4.5-rng |
---|
| 203 | cd 4.5-rng |
---|
| 204 | unzip %{SOURCE16} |
---|
| 205 | cd .. |
---|
| 206 | |
---|
| 207 | # Docbook XSD v4.2 |
---|
| 208 | mkdir 4.2-xsd |
---|
| 209 | cd 4.2-xsd |
---|
| 210 | unzip %{SOURCE17} |
---|
| 211 | cd .. |
---|
| 212 | |
---|
| 213 | # Docbook XSD v4.3 |
---|
| 214 | mkdir 4.3-xsd |
---|
| 215 | cd 4.3-xsd |
---|
| 216 | unzip %{SOURCE18} |
---|
| 217 | cd .. |
---|
| 218 | |
---|
| 219 | # Docbook XSD v4.4 |
---|
| 220 | mkdir 4.4-xsd |
---|
| 221 | cd 4.4-xsd |
---|
| 222 | unzip %{SOURCE19} |
---|
| 223 | cd .. |
---|
| 224 | |
---|
| 225 | # Docbook XSD v4.5 |
---|
| 226 | mkdir 4.5-xsd |
---|
| 227 | cd 4.5-xsd |
---|
| 228 | unzip %{SOURCE20} |
---|
| 229 | cd .. |
---|
| 230 | |
---|
[521] | 231 | # Fix € in SGML. |
---|
| 232 | %patch5 -p1 |
---|
| 233 | |
---|
| 234 | # Fix ISO entities in 4.3/4.4/4.5 SGML |
---|
| 235 | %patch6 -p1 |
---|
| 236 | |
---|
| 237 | # Rewrite SYSTEM to use local catalog instead web ones (#478680) |
---|
| 238 | %patch7 -p1 |
---|
| 239 | |
---|
| 240 | # Add XML to the end of public identificators of 4.1.2 XML entities |
---|
| 241 | %patch8 -p1 |
---|
| 242 | |
---|
| 243 | # Increase NAMELEN (bug #36058, bug #159382). |
---|
| 244 | sed -e's,\(NAMELEN\s\+\)44\(\s\*\)\?,\1256,' -i.namelen */docbook.dcl |
---|
| 245 | |
---|
| 246 | # fix of \r\n issue from rpmlint |
---|
| 247 | sed -i 's/\r//' */*.txt |
---|
| 248 | |
---|
| 249 | |
---|
| 250 | if [ `id -u` -eq 0 ]; then |
---|
| 251 | chown -R root:root . |
---|
| 252 | chmod -R a+rX,g-w,o-w . |
---|
| 253 | fi |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | %build |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | %install |
---|
| 260 | rm -rf $RPM_BUILD_ROOT |
---|
| 261 | |
---|
| 262 | # Symlinks |
---|
| 263 | mkdir -p $RPM_BUILD_ROOT/etc/sgml |
---|
| 264 | for fmt in sgml xml; do |
---|
[3812] | 265 | ln -s $fmt-docbook-4.5.cat \ |
---|
[521] | 266 | $RPM_BUILD_ROOT/etc/sgml/$fmt-docbook.cat |
---|
| 267 | done |
---|
| 268 | |
---|
| 269 | eval set %{version_list} |
---|
| 270 | for dir |
---|
| 271 | do |
---|
| 272 | cd $dir |
---|
[3812] | 273 | fmt=${dir#*-} ver=${dir%%-*} |
---|
[521] | 274 | case $fmt in |
---|
[8798] | 275 | sgml) DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-dtd-$ver ;; |
---|
| 276 | xml) DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-dtd-$ver ;; |
---|
| 277 | rng) DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-$ver ;; |
---|
| 278 | xsd) DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-$ver ;; |
---|
| 279 | esac |
---|
| 280 | case $fmt in |
---|
[521] | 281 | sgml) mkdir -p $DESTDIR ; install *.dcl $DESTDIR ;; |
---|
| 282 | xml) mkdir -p $DESTDIR/ent ; install ent/* $DESTDIR/ent ;; |
---|
[8798] | 283 | rng) mkdir -p $DESTDIR ; install *.r* $DESTDIR ;; |
---|
| 284 | xsd) mkdir -p $DESTDIR ; install *.xsd $DESTDIR;; |
---|
[521] | 285 | esac |
---|
[8798] | 286 | cd .. |
---|
| 287 | done |
---|
| 288 | |
---|
| 289 | eval set %{catalog_list} |
---|
| 290 | for dir |
---|
| 291 | do |
---|
| 292 | cd $dir |
---|
| 293 | fmt=${dir#*-} ver=${dir%%-*} |
---|
| 294 | DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-dtd-$ver |
---|
[521] | 295 | install *.dtd *.mod $DESTDIR |
---|
| 296 | install docbook.cat $DESTDIR/catalog |
---|
| 297 | cd .. |
---|
| 298 | # File for %%ghost |
---|
[3812] | 299 | touch $RPM_BUILD_ROOT/etc/sgml/$fmt-docbook-$ver.cat |
---|
[521] | 300 | done |
---|
| 301 | |
---|
[8798] | 302 | #workaround the missing support for --parents hack in rpm 4.11+ |
---|
| 303 | mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir} |
---|
| 304 | for i in */*.txt */ChangeLog */README |
---|
| 305 | do |
---|
| 306 | cp -pr --parents $i $RPM_BUILD_ROOT%{_pkgdocdir} |
---|
| 307 | done |
---|
[521] | 308 | |
---|
| 309 | %clean |
---|
| 310 | rm -rf $RPM_BUILD_ROOT |
---|
| 311 | |
---|
| 312 | |
---|
| 313 | %post |
---|
| 314 | catcmd='%{_bindir}/xmlcatalog --noout' |
---|
| 315 | xmlcatalog=%{_datadir}/sgml/docbook/xmlcatalog |
---|
| 316 | |
---|
| 317 | ## Clean up pre-docbook-dtds mess caused by broken trigger. |
---|
| 318 | for v in 3.0 3.1 4.0 4.1 4.2 |
---|
| 319 | do |
---|
| 320 | if [ -f /etc/sgml/sgml-docbook-$v.cat ] |
---|
| 321 | then |
---|
| 322 | $catcmd --sgml --del /etc/sgml/sgml-docbook-$v.cat \ |
---|
| 323 | %{_datadir}/sgml/openjade-1.3.1/catalog 2>/dev/null |
---|
| 324 | fi |
---|
| 325 | done |
---|
| 326 | |
---|
| 327 | # The STYLESHEETS/catalog command is for the case in which the style sheets |
---|
| 328 | # were installed after another DTD but before this DTD |
---|
[8798] | 329 | for STYLESHEETS in /usr/share/sgml/docbook/dsssl-stylesheets-*; do : ; done |
---|
[521] | 330 | case $STYLESHEETS in |
---|
| 331 | *-"*") STYLESHEETS= ;; |
---|
| 332 | esac |
---|
[8798] | 333 | eval set %{catalog_list} |
---|
[521] | 334 | for dir |
---|
| 335 | do |
---|
[3812] | 336 | fmt=${dir#*-} ver=${dir%%-*} |
---|
[8798] | 337 | sgmldir=/usr/share/sgml/docbook/$fmt-dtd-$ver |
---|
[521] | 338 | ## SGML catalog |
---|
| 339 | # Update the centralized catalog corresponding to this version of the DTD |
---|
[8798] | 340 | for cat_dir in /usr/share/sgml/sgml-iso-entities-8879.1986 $sgmldir $STYLESHEETS; do |
---|
[3812] | 341 | $catcmd --sgml --add /etc/sgml/$fmt-docbook-$ver.cat $cat_dir/catalog |
---|
[521] | 342 | done |
---|
| 343 | ## XML catalog |
---|
| 344 | if [ $fmt = xml -a -w $xmlcatalog ]; then |
---|
| 345 | while read f desc; do |
---|
| 346 | case $ver in 4.[45]) f=${f/-/} ;; esac |
---|
| 347 | $catcmd --add public "$desc" $sgmldir/$f $xmlcatalog |
---|
| 348 | done <<ENDENT |
---|
| 349 | ent/iso-pub.ent ISO 8879:1986//ENTITIES Publishing//EN |
---|
| 350 | ent/iso-grk1.ent ISO 8879:1986//ENTITIES Greek Letters//EN |
---|
| 351 | dbpoolx.mod -//OASIS//ELEMENTS DocBook XML Information Pool V$ver//EN |
---|
| 352 | ent/iso-box.ent ISO 8879:1986//ENTITIES Box and Line Drawing//EN |
---|
| 353 | docbookx.dtd -//OASIS//DTD DocBook XML V$ver//EN |
---|
| 354 | ent/iso-grk3.ent ISO 8879:1986//ENTITIES Greek Symbols//EN |
---|
| 355 | ent/iso-amsn.ent ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN |
---|
| 356 | ent/iso-num.ent ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN |
---|
| 357 | dbcentx.mod -//OASIS//ENTITIES DocBook XML Character Entities V$ver//EN |
---|
| 358 | ent/iso-grk4.ent ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN |
---|
| 359 | dbnotnx.mod -//OASIS//ENTITIES DocBook XML Notations V$ver//EN |
---|
| 360 | ent/iso-dia.ent ISO 8879:1986//ENTITIES Diacritical Marks//EN |
---|
| 361 | ent/iso-grk2.ent ISO 8879:1986//ENTITIES Monotoniko Greek//EN |
---|
| 362 | dbgenent.mod -//OASIS//ENTITIES DocBook XML Additional General Entities V$ver//EN |
---|
| 363 | dbhierx.mod -//OASIS//ELEMENTS DocBook XML Document Hierarchy V$ver//EN |
---|
| 364 | ent/iso-amsa.ent ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN |
---|
| 365 | ent/iso-amso.ent ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN |
---|
| 366 | ent/iso-cyr1.ent ISO 8879:1986//ENTITIES Russian Cyrillic//EN |
---|
| 367 | ent/iso-tech.ent ISO 8879:1986//ENTITIES General Technical//EN |
---|
| 368 | ent/iso-amsc.ent ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN |
---|
| 369 | soextblx.dtd -//OASIS//DTD XML Exchange Table Model 19990315//EN |
---|
| 370 | calstblx.dtd -//OASIS//DTD DocBook XML CALS Table Model V$ver//EN |
---|
| 371 | ent/iso-lat1.ent ISO 8879:1986//ENTITIES Added Latin 1//EN |
---|
| 372 | ent/iso-amsb.ent ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN |
---|
| 373 | ent/iso-lat2.ent ISO 8879:1986//ENTITIES Added Latin 2//EN |
---|
| 374 | ent/iso-amsr.ent ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN |
---|
| 375 | ent/iso-cyr2.ent ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN |
---|
| 376 | ENDENT |
---|
| 377 | for f in System URI; do |
---|
| 378 | $catcmd --add rewrite$f "http://www.oasis-open.org/docbook/xml/$ver" \ |
---|
| 379 | $sgmldir $xmlcatalog |
---|
| 380 | done |
---|
| 381 | fi |
---|
| 382 | done |
---|
| 383 | |
---|
| 384 | # Historic versions of this scriptlet contained the following comment: |
---|
| 385 | # <quote> |
---|
| 386 | # Fix up SGML super catalog so that there isn't an XML DTD before an |
---|
| 387 | # SGML one. We need to do this (*sigh*) because xmlcatalog messes up |
---|
| 388 | # the order of the lines, and SGML tools don't like to see XML things |
---|
| 389 | # they aren't expecting. |
---|
| 390 | # </quote> |
---|
| 391 | # But the code that followed just found the first XML DTD and the first |
---|
| 392 | # SGML DTD, swappinmg these two lines if the XML one preceded. |
---|
| 393 | # But that only ensures that there is an SGML DTD before all XML ones. |
---|
| 394 | # No one complained, so either this was enough, or the buggy SGML tools |
---|
| 395 | # are long dead, or their users do not use bugzilla. |
---|
| 396 | # Anyway, the following code, introduced in 1.0-46, does better: it ensures |
---|
| 397 | # that all XML DTDs are after all SGML ones, by moving them to the end. |
---|
| 398 | sed -ni ' |
---|
| 399 | /xml-docbook/ H |
---|
| 400 | /xml-docbook/ !p |
---|
| 401 | $ { |
---|
| 402 | g |
---|
| 403 | s/^\n//p |
---|
| 404 | } |
---|
| 405 | ' /etc/sgml/catalog |
---|
| 406 | |
---|
| 407 | # Finally, make sure everything in /etc/sgml is readable! |
---|
| 408 | /bin/chmod a+r /etc/sgml/* |
---|
| 409 | |
---|
| 410 | %postun |
---|
| 411 | catcmd='%{_bindir}/xmlcatalog --noout' |
---|
| 412 | xmlcatalog=%{_datadir}/sgml/docbook/xmlcatalog |
---|
| 413 | entities=" |
---|
| 414 | ent/iso-pub.ent |
---|
| 415 | ent/iso-grk1.ent |
---|
| 416 | dbpoolx.mod |
---|
| 417 | ent/iso-box.ent |
---|
| 418 | docbookx.dtd |
---|
| 419 | ent/iso-grk3.ent |
---|
| 420 | ent/iso-amsn.ent |
---|
| 421 | ent/iso-num.ent |
---|
| 422 | dbcentx.mod |
---|
| 423 | ent/iso-grk4.ent |
---|
| 424 | dbnotnx.mod |
---|
| 425 | ent/iso-dia.ent |
---|
| 426 | ent/iso-grk2.ent |
---|
| 427 | dbgenent.mod |
---|
| 428 | dbhierx.mod |
---|
| 429 | ent/iso-amsa.ent |
---|
| 430 | ent/iso-amso.ent |
---|
| 431 | ent/iso-cyr1.ent |
---|
| 432 | ent/iso-tech.ent |
---|
| 433 | ent/iso-amsc.ent |
---|
| 434 | soextblx.dtd |
---|
| 435 | calstblx.dtd |
---|
| 436 | ent/iso-lat1.ent |
---|
| 437 | ent/iso-amsb.ent |
---|
| 438 | ent/iso-lat2.ent |
---|
| 439 | ent/iso-amsr.ent |
---|
| 440 | ent/iso-cyr2.ent |
---|
| 441 | " |
---|
| 442 | eval set %{version_list} |
---|
| 443 | for dir |
---|
| 444 | do |
---|
[3812] | 445 | fmt=${dir#*-} ver=${dir%%-*} |
---|
| 446 | sgmldir=%{_datadir}/sgml/docbook/$fmt-dtd-$ver |
---|
[521] | 447 | ## SGML catalog |
---|
| 448 | # Update the centralized catalog corresponding to this version of the DTD |
---|
[3812] | 449 | $catcmd --sgml --del /etc/sgml/catalog /etc/sgml/$fmt-docbook-$ver.cat |
---|
| 450 | rm -f /etc/sgml/$fmt-docbook-$ver.cat |
---|
[521] | 451 | ## XML catalog |
---|
| 452 | if [ $fmt = xml -a -w $xmlcatalog ]; then |
---|
| 453 | for f in $entities; do |
---|
| 454 | case $ver in 4.[45]) f=${f/-/} ;; esac |
---|
| 455 | $catcmd --del $sgmldir/$f $xmlcatalog |
---|
| 456 | done |
---|
| 457 | $catcmd --del $sgmldir $xmlcatalog |
---|
| 458 | fi |
---|
| 459 | done |
---|
| 460 | |
---|
| 461 | # See the comment attached to this command in the %%post scriptlet. |
---|
| 462 | sed -ni ' |
---|
| 463 | /xml-docbook/ H |
---|
| 464 | /xml-docbook/ !p |
---|
| 465 | $ { |
---|
| 466 | g |
---|
| 467 | s/^\n//p |
---|
| 468 | } |
---|
| 469 | ' /etc/sgml/catalog |
---|
| 470 | |
---|
| 471 | |
---|
| 472 | %triggerin -- openjade >= %{openjadever} |
---|
| 473 | eval set %{version_list} |
---|
| 474 | for dir |
---|
| 475 | do |
---|
[3812] | 476 | fmt=${dir#*-} ver=${dir%%-*} |
---|
| 477 | %{_bindir}/xmlcatalog --sgml --noout --add /etc/sgml/$fmt-docbook-$ver.cat \ |
---|
[521] | 478 | %{_datadir}/sgml/openjade-%{openjadever}/catalog |
---|
| 479 | done |
---|
| 480 | |
---|
| 481 | |
---|
| 482 | %triggerun -- openjade >= %{openjadever} |
---|
| 483 | [ $2 = 0 ] || exit 0 |
---|
| 484 | eval set %{version_list} |
---|
| 485 | for dir |
---|
| 486 | do |
---|
[3812] | 487 | fmt=${dir#*-} ver=${dir%%-*} |
---|
| 488 | %{_bindir}/xmlcatalog --sgml --noout --del /etc/sgml/$fmt-docbook-$ver.cat \ |
---|
[521] | 489 | %{_datadir}/sgml/openjade-%{openjadever}/catalog |
---|
| 490 | done |
---|
| 491 | |
---|
| 492 | |
---|
| 493 | %files |
---|
| 494 | %defattr (-,root,root) |
---|
| 495 | %doc --parents 3.1-sgml/ChangeLog |
---|
| 496 | %doc --parents 4.1-sgml/ChangeLog |
---|
| 497 | %doc --parents */*.txt |
---|
| 498 | %config(noreplace) /etc/sgml/sgml-docbook.cat |
---|
| 499 | %config(noreplace) /etc/sgml/xml-docbook.cat |
---|
[8798] | 500 | %{_datadir}/sgml/docbook/*ml-dtd-* |
---|
| 501 | %{_datadir}/sgml/docbook/rng-* |
---|
| 502 | %{_datadir}/sgml/docbook/xsd-* |
---|
| 503 | %config(noreplace) /etc/sgml/*ml-docbook.cat |
---|
[3812] | 504 | %ghost %config(noreplace) /etc/sgml/*ml-docbook-*.cat |
---|
[521] | 505 | |
---|
| 506 | %changelog |
---|
[8798] | 507 | * Wed Jul 09 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 0.8-1 |
---|
| 508 | - add Relax NG schema format |
---|
| 509 | - add W3C XML (XSD) schema format |
---|
| 510 | |
---|
[8084] | 511 | * Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0-56 |
---|
| 512 | - rebuild with VineSeed environment |
---|
| 513 | |
---|
[3812] | 514 | * Sun May 8 2011 IWAI, Masaharu <iwai@alib.jp> 1.0-55 |
---|
| 515 | - drop %%{version}-%%{release} in file path |
---|
| 516 | |
---|
[3636] | 517 | * Fri Apr 22 2011 IWAI, Masaharu <iwai@alib.jp> 1.0-54 |
---|
| 518 | - add Requires(post,postun): sed |
---|
| 519 | |
---|
[521] | 520 | * Sun Mar 7 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-53 |
---|
| 521 | - updated based on FC 1.0-52 |
---|
| 522 | * Wed Mar 03 2010 Ondrej Vasik <ovasik@redhat.com> - 1.0-52 |
---|
| 523 | - remove explicit lib dependency (#225700) |
---|
| 524 | * Wed Mar 03 2010 Ondrej Vasik <ovasik@redhat.com> - 1.0-51 |
---|
| 525 | - fix Merge Review comments (#225700) - unversion requires, |
---|
| 526 | fix buildroot |
---|
| 527 | * Thu Dec 17 2009 Ondrej Vasik <ovasik@redhat.com> - 1.0-50 |
---|
| 528 | - comment patches |
---|
| 529 | - License: Copyright only |
---|
| 530 | * Tue Oct 27 2009 Ondrej Vasik <ovasik@redhat.com> - 1.0-49 |
---|
| 531 | - do not obsolete self |
---|
| 532 | * Mon May 11 2009 Ondrej Vasik <ovasik@redhat.com> - 1.0-47 |
---|
| 533 | - add requires(post) for /bin/chmod (#498680) |
---|
| 534 | * Wed Apr 8 2009 Stepan Kasal <skasal@redhat.com> - 1.0-46 |
---|
| 535 | - remove perl dependency (#462997) |
---|
| 536 | - make %%install and the scriptlets more compact |
---|
| 537 | * Thu Feb 19 2009 Ondrej Vasik <ovasik@redhat.com> - 1.0.44 |
---|
| 538 | - fix ISO entities for 4.5 SGML, use XML at the end of |
---|
| 539 | public identificators of XML 4.1.2 ISO entities |
---|
| 540 | * Thu Feb 19 2009 Ondrej Vasik <ovasik@redhat.com> - 1.0-43 |
---|
| 541 | - register sgml catalogs before xml catalogs in openjade |
---|
| 542 | (#486257) |
---|
| 543 | * Thu Feb 05 2009 Ondrej Vasik <ovasik@redhat.com> - 1.0-42 |
---|
| 544 | - Use SYSTEM rewrite for web URL's in sgml catalogs to |
---|
| 545 | prevent reading from the network(#478680) |
---|
| 546 | * Fri Sep 26 2008 Ondrej Vasik <ovasik@redhat.com> - 1.0-41 |
---|
| 547 | - Removed openjade requirement - registration reworked to |
---|
| 548 | triggers(#234345) |
---|
| 549 | * Fri Jul 11 2008 Ondrej Vasik <ovasik@redhat.com> - 1.0-38 |
---|
| 550 | - fixed typo in post scriptlet(causing mishandling of DocBook |
---|
| 551 | 4.4 and 4.5 DTDs,#453513) |
---|
| 552 | * Tue Oct 23 2007 Ondrej Vasik <ovasik@redhat.com> - 1.0-34 |
---|
| 553 | - corrected most of rpmlint issues |
---|
| 554 | - (PreReq, tab/spaces , wrong permissions on some files, |
---|
| 555 | - wrong file end encoding of txt files, non config files |
---|
| 556 | - in /etc, some requires issues, versioned provides and |
---|
| 557 | - obsoletes, fixed license tag) |
---|
| 558 | * Fri Oct 19 2007 Ondrej Vasik <ovasik@redhat.com> - 1.0-33 |
---|
| 559 | - fixed wrong attributes for docs(#326581) |
---|
| 560 | * Mon Oct 1 2007 Ondrej Vasik <ovasik@redhat.com> - 1.0-32 |
---|
| 561 | - DocBook 4.5 SGML and XML.(#312941) |
---|
| 562 | * Wed Jun 20 2007 Ondrej Vasik <ovasik@redhat.com> - 1.0-31 |
---|
| 563 | - .cat files touched and ghosted to be owned by package |
---|
| 564 | - (bug #193475) |
---|
| 565 | * Tue Dec 13 2005 Tim Waugh <twaugh@redhat.com> 1.0-30 |
---|
| 566 | - Fix ISO entities in 4.3/4.4 SGML. |
---|
| 567 | |
---|
| 568 | * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.0-27vl5 |
---|
| 569 | - applied new versioning policy, spec in utf-8 |
---|
| 570 | |
---|
[8084] | 571 | * Wed Jun 9 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-27vl1 |
---|
[521] | 572 | - based on Fedora 1.0-27 |
---|
| 573 | * Thu Jun 2 2005 Tim Waugh <twaugh@redhat.com> 1.0-27 |
---|
| 574 | - Increase NAMELEN (bug #36058, bug #159382). |
---|
| 575 | * Tue Feb 1 2005 Tim Waugh <twaugh@redhat.com> 1.0-26 |
---|
| 576 | - DocBook 4.4 SGML and XML. |
---|
| 577 | * Mon Sep 13 2004 Tim Waugh <twaugh@redhat.com> 1.0-25 |
---|
| 578 | - DocBook 4.3 SGML and XML (bug #131861). |
---|
| 579 | - added Japanese summary |
---|
| 580 | |
---|
| 581 | * Sat Mar 27 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-24vl1 |
---|
| 582 | - based on Fedora 1.0-24 |
---|
| 583 | * Mon Feb 23 2004 Tim Waugh <twaugh@redhat.com> 1.0-24 |
---|
| 584 | - Use ':' instead of '.' as separator for chown. |
---|
| 585 | |
---|
| 586 | * Tue Sep 30 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-22vl2 |
---|
| 587 | - fixed %postun to remove old version /etc/sgml-*.cat |
---|
| 588 | |
---|
| 589 | * Mon Sep 15 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-22vl1 |
---|
| 590 | - based on Rawhide 1.0-22.1 |
---|
| 591 | * Wed Aug 6 2003 Tim Waugh <twaugh@redhat.com> 1.0-22 |
---|
| 592 | - More work-arounds for buggy xmlcatalog. |
---|
| 593 | * Tue Jul 15 2003 Tim Waugh <twaugh@redhat.com> 1.0-21 |
---|
| 594 | - Fix € in SGML tools. |
---|
| 595 | * Wed May 28 2003 Tim Waugh <twaugh@redhat.com> 1.0-20 |
---|
| 596 | - Fix summary and description (bug #73005). |
---|
| 597 | |
---|
| 598 | * Tue Jun 3 2003 Jun Nishii <jun@vinelinux.org> 1.0-19vl2 |
---|
| 599 | - fixed some typo in scripts |
---|
| 600 | - use for loop in scripts |
---|
| 601 | |
---|
| 602 | * Sat May 3 2003 IWAI Masaharu <iwai@alib.jp> 1.0-19vl1 |
---|
| 603 | - update %%post and %%postun script from rawhide 1.0-19 |
---|
| 604 | - build with openjade-1.3.2 |
---|
| 605 | |
---|
| 606 | * Mon Nov 25 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.0-15vl2 |
---|
| 607 | - use PreReq rather than dual Conflicts (it's too bad for apt) |
---|
| 608 | |
---|
| 609 | * Mon Nov 25 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.0-15vl1 |
---|
| 610 | - based on 1.0-15 from Rawhide and rebuilt for Vine Linux |
---|
| 611 | |
---|
| 612 | * Wed Nov 20 2002 Tim Powers <timp@redhat.com> |
---|
| 613 | - rebuild in current collinst |
---|
| 614 | |
---|
[8084] | 615 | * Tue Jul 30 2002 Tim Waugh <twaugh@redhat.com> 1.0-14 |
---|
[521] | 616 | - Fix typo in XML catalog (Eric Raymond). |
---|
| 617 | |
---|
| 618 | * Tue Jul 23 2002 Tim Waugh <twaugh@redhat.com> 1.0-13 |
---|
| 619 | - Provide docbook-dtd42-sgml and docbook-dtd42-xml. |
---|
| 620 | |
---|
| 621 | * Thu Jul 18 2002 Tim Waugh <twaugh@redhat.com> 1.0-12 |
---|
| 622 | - Fix up SGML super catalog if necessary. |
---|
| 623 | |
---|
| 624 | * Wed Jul 17 2002 Tim Waugh <twaugh@redhat.com> 1.0-11 |
---|
| 625 | - Add DocBook V4.2. |
---|
| 626 | |
---|
| 627 | * Fri Jun 21 2002 Tim Powers <timp@redhat.com> 1.0-10 |
---|
| 628 | - automated rebuild |
---|
| 629 | |
---|
| 630 | * Thu May 23 2002 Tim Powers <timp@redhat.com> 1.0-9 |
---|
| 631 | - automated rebuild |
---|
| 632 | |
---|
| 633 | * Thu Mar 14 2002 Tim Waugh <twaugh@redhat.com> 1.0-8 |
---|
| 634 | - Allow for shared /usr/share (bug #61147). |
---|
| 635 | |
---|
| 636 | * Tue Mar 12 2002 Tim Waugh <twaugh@redhat.com> 1.0-7 |
---|
| 637 | - Make sure that the config files are readable. |
---|
| 638 | |
---|
| 639 | * Fri Mar 8 2002 Tim Waugh <twaugh@redhat.com> 1.0-6 |
---|
| 640 | - Make %%post scriptlet quiet (bug #60820). |
---|
| 641 | |
---|
| 642 | * Thu Feb 21 2002 Tim Waugh <twaugh@redhat.com> 1.0-5 |
---|
| 643 | - Make sure to clean up old catalog files. |
---|
| 644 | |
---|
| 645 | * Thu Feb 21 2002 Tim Waugh <twaugh@redhat.com> 1.0-3 |
---|
| 646 | - Rebuild in new environment. |
---|
| 647 | |
---|
| 648 | * Mon Jan 28 2002 Tim Waugh <twaugh@redhat.com> 1.0-2 |
---|
| 649 | - Prepare for openjade 1.3.1. |
---|
| 650 | |
---|
| 651 | * Thu Jan 17 2002 Tim Waugh <twaugh@redhat.com> 1.0-1 |
---|
| 652 | - Merged all the DTD packages into one (bug #58448). |
---|
| 653 | - Use /usr/share/sgml exclusively. |
---|
| 654 | - Prevent catalog files from disappearing on upgrade (bug #58463). |
---|
| 655 | |
---|
| 656 | * Wed Jan 09 2002 Tim Powers <timp@redhat.com> |
---|
| 657 | - automated rebuild |
---|
| 658 | |
---|
| 659 | * Mon Nov 5 2001 Tim Waugh <twaugh@redhat.com> 1.0-8 |
---|
| 660 | - Hmm, still need to depend on sgml-common for /etc/sgml. |
---|
| 661 | |
---|
| 662 | * Mon Nov 5 2001 Tim Waugh <twaugh@redhat.com> 1.0-7 |
---|
| 663 | - Use xmlcatalog (libxml2) instead of install-catalog (sgml-common) in |
---|
| 664 | scriptlets. |
---|
| 665 | - Conflict with install-catalog if it can't handle quotes in catalogs. |
---|
| 666 | - Use release number in centralized catalog name, so that the scriptlets |
---|
| 667 | work properly. |
---|
| 668 | |
---|
| 669 | * Wed Oct 10 2001 Tim Waugh <twaugh@redhat.com> 1.0-6 |
---|
| 670 | - Change some Requires: to PreReq:s (bug #54507). |
---|
| 671 | |
---|
| 672 | * Mon Oct 8 2001 Tim Waugh <twaugh@redhat.com> 1.0-5 |
---|
| 673 | - Use release number in the installed directory name, so that the |
---|
| 674 | package scripts work. |
---|
| 675 | |
---|
| 676 | * Sat Oct 6 2001 Tim Waugh <twaugh@redhat.com> 1.0-4 |
---|
| 677 | - Restore the /etc/sgml/catalog manipulation again. |
---|
| 678 | - Oops, fix DTD path. |
---|
| 679 | |
---|
| 680 | * Sat Oct 6 2001 Tim Waugh <twaugh@redhat.com> 1.0-2 |
---|
| 681 | - Require xml-common. Use xmlcatalog. |
---|
| 682 | - Move files to /usr/share/xml. |
---|
| 683 | |
---|
| 684 | * Tue Jun 12 2001 Tim Waugh <twaugh@redhat.com> 1.0-1 |
---|
| 685 | - Build for Red Hat Linux. |
---|
| 686 | |
---|
| 687 | * Sat Jun 09 2001 Chris Runge <crunge@pobox.com> |
---|
| 688 | - Provides: docbook-dtd-xml (not docbook-dtd-sgml) |
---|
| 689 | - undo catalog patch and dbcentx patch (this resulted in an effectively |
---|
| 690 | broken DTD when the document was processed with XSL stylesheets); added a |
---|
| 691 | symbolic link to retain docbook.cat -> catalog; added ent |
---|
| 692 | - added ChangeLog to doc |
---|
| 693 | |
---|
| 694 | * Fri Jun 08 2001 Chris Runge <crunge@pobox.com> |
---|
| 695 | - created a 4.1.2 version |
---|
| 696 | - update required a change to OTHERCAT in postun |
---|
| 697 | - update required a change to the Makefile patch (no dbgenent.ent any more, |
---|
| 698 | apparently) |
---|
| 699 | |
---|
| 700 | * Wed Jan 24 2001 Tim Waugh <twaugh@redhat.com> |
---|
| 701 | - Scripts require fileutils. |
---|
| 702 | - Make scripts quieter. |
---|
| 703 | |
---|
| 704 | * Mon Jan 15 2001 Tim Waugh <twaugh@redhat.com> |
---|
| 705 | - Don't play so many macro games. |
---|
| 706 | - Don't use 'rpm' in post scripts. |
---|
| 707 | - Be sure to own xml-dtd-4.1 directory. |
---|
| 708 | |
---|
| 709 | * Sun Jan 14 2001 Tim Waugh <twaugh@redhat.com> |
---|
| 710 | - Change requirement on /usr/bin/install-catalog to sgml-common. |
---|
| 711 | |
---|
| 712 | * Tue Jan 09 2001 Tim Waugh <twaugh@redhat.com> |
---|
| 713 | - Change group. |
---|
| 714 | - Use %%{_tmppath}. |
---|
| 715 | - Correct typo. |
---|
| 716 | - rm before install |
---|
| 717 | - openjade not jade. |
---|
| 718 | - Build requires unzip. |
---|
| 719 | - Require install-catalog for post and postun. |
---|
| 720 | - Change Copyright: to License:. |
---|
| 721 | - Remove Packager: line. |
---|
| 722 | |
---|
| 723 | * Tue Jan 09 2001 Tim Waugh <twaugh@redhat.com> |
---|
| 724 | - Based on Eric Bischoff's new-trials packages. |
---|