[1533] | 1 | ## -*- coding: utf-8-unix -*- |
---|
| 2 | %bcond_with firstbuild |
---|
| 3 | |
---|
| 4 | %define with_babel 1 |
---|
| 5 | |
---|
| 6 | %define ptexlivever 20100711 |
---|
| 7 | %define texlivesrcver 20091107 |
---|
| 8 | %define texlivever 20091107 |
---|
| 9 | |
---|
| 10 | ## we provides e-pTeX and upTeX |
---|
| 11 | %define with_uptex 0 |
---|
| 12 | %define with_eptex 1 |
---|
| 13 | %define uptexver 0.30 |
---|
| 14 | %define uptex_fontver 0.30 |
---|
| 15 | %define eptexver 100420 |
---|
| 16 | |
---|
| 17 | %define tex_destdir %{_datadir} |
---|
| 18 | %define texmf %{tex_destdir}/texmf |
---|
| 19 | %define texlive_src %{tex_destdir}/texlive-sources |
---|
| 20 | %define build_tex_destdir %{buildroot}%{tex_destdir} |
---|
| 21 | %define build_texmf %{buildroot}%{texmf} |
---|
| 22 | |
---|
| 23 | %define exec_mktexlsr [ -x %{_bindir}/texconfig-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/texconfig-sys rehash |
---|
| 24 | %define exec_texhash [ -x %{_bindir}/texhash ] && PATH=%{_bindir}:$PATH %{_bindir}/texhash |
---|
| 25 | %define exec_updmap [ -x %{_bindir}/updmap-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/updmap-sys --nostop |
---|
| 26 | %define exec_fmtutil [ -x %{_bindir}/fmtutil-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/fmtutil-sys --all >/dev/null |
---|
| 27 | %define exec_upddeffont [ -x %{_sbindir}/update-defaultfont ] && %{_sbindir}/update-defaultfont 2> /dev/null |
---|
| 28 | %define vartexfonts %{_var}/lib/texmf |
---|
| 29 | |
---|
| 30 | Autoreq: 0 |
---|
| 31 | |
---|
| 32 | Summary: The TeX text formatting system |
---|
| 33 | Summary(ja): TeX 文書整形システム |
---|
| 34 | Name: texlive |
---|
| 35 | Version: 2009 |
---|
[1542] | 36 | Release: 9%{?_dist_release} |
---|
[1533] | 37 | License: distributable |
---|
| 38 | Group: Applications/Publishing |
---|
| 39 | ## The TeX Live is located on http://www.tug.org/texlive/ |
---|
| 40 | ## e-pTeX: http://eptex.sourceforge.jp/ |
---|
| 41 | ## upTeX: http://homepage3.nifty.com/ttk/comp/tex/uptex.html |
---|
| 42 | URL: http://tutimura.ath.cx/ptexlive/ |
---|
| 43 | |
---|
| 44 | ## original TeX Live sources |
---|
| 45 | Source: http://tutimura.ath.cx/~nob/tex/ptexlive/ptexlive-%{ptexlivever}.tar.gz |
---|
| 46 | |
---|
| 47 | ##Source1: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivesrcver}-source.tar.xz |
---|
| 48 | ##Source2: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivever}-texmf.tar.xz |
---|
| 49 | ##Source3: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivever}-extra.tar.xz |
---|
| 50 | ##Source4: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivever}-bin.tar.xz |
---|
| 51 | ##Source5: ftp://tug.org/historic/systems/texlive/2009/tlnet/install-tl-unx.tar.gz |
---|
| 52 | |
---|
| 53 | ## pxdvi |
---|
| 54 | Source10: pxdvi.desktop |
---|
| 55 | |
---|
| 56 | ## dvipdfmx |
---|
| 57 | #Source20: |
---|
| 58 | |
---|
| 59 | ## texdoc |
---|
| 60 | ## http://github.com/mpg/texdoc |
---|
| 61 | ## Downloaded mpg-texdoc-0.72-0-gfdb7657.tar.gz |
---|
| 62 | ## Renamed this archive: |
---|
| 63 | # $ tar zxf mpg-texdoc-0.72-0-gfdb7657.tar.gz |
---|
| 64 | # $ mv mpg-texdoc-b66e1e3 texdoc-0.72 |
---|
| 65 | # $ tar zcf texdoc-0.72.tar.gz texdoc-0.72 |
---|
| 66 | #Source90: texdoc-%{texdocver}.tar.gz |
---|
| 67 | |
---|
| 68 | ## Japanese ptex |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | # ## Babel |
---|
| 72 | # ## See [texqa:37398] http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/37398.html |
---|
| 73 | # Source40: http://www.ctan.org/tex-archive/obsolete/systems/win32/fptex/0.7/collection/tex-langother.zip |
---|
| 74 | # Source41: http://www.ctan.org/tex-archive/obsolete/systems/win32/fptex/0.7/package/texlive-base.zip |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | ## e-pTeX, upTeX |
---|
| 78 | Source50: http://homepage3.nifty.com/ttk/comp/tex/uptex-%{uptexver}.tar.gz |
---|
| 79 | Source51: http://homepage3.nifty.com/ttk/comp/tex/uptex_font-%{uptex_fontver}.tar.gz |
---|
| 80 | Source52: http://sourceforge.jp/projects/eptex/downloads/43841/eptex-%{eptexver}.tar.bz2 |
---|
| 81 | |
---|
| 82 | ## etc... |
---|
| 83 | Source100: texlive.cron |
---|
| 84 | Source101: dvi-to-ps.fpi |
---|
| 85 | Source102: http://auemath.aichi-edu.ac.jp/~khotta/ghost/disk1/jtygm.sty |
---|
| 86 | Source103: ps-morisawa.map |
---|
| 87 | Source104: ps-morisawa-noEmbed.map |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | # ## do not provide any perl deps (#516350) |
---|
| 91 | # %define __perl_provides %{nil} |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | ###### |
---|
| 95 | # TeX patches |
---|
| 96 | ###### |
---|
| 97 | |
---|
| 98 | ## vine |
---|
| 99 | Patch0: ptexlive-%{ptexlivever}-vine.patch |
---|
| 100 | Patch1: texlive-%{texlivesrcver}-set-selfautodir.patch |
---|
| 101 | ##Patch1: texlive-2009-texmfcnf-selfautodir-vine.patch |
---|
| 102 | Patch2: texlive-%{texlivesrcver}-texmfcnf-vine.patch |
---|
| 103 | |
---|
| 104 | ## pxdvi |
---|
| 105 | Patch10: ptexlive-%{ptexlivever}-pxdvik-vine.patch |
---|
| 106 | |
---|
| 107 | ## dvipdfmx |
---|
| 108 | Patch20: ptexlive-%{ptexlivever}-dvipdfmx-vine.patch |
---|
| 109 | |
---|
| 110 | ## e-pTeX + upTeX |
---|
| 111 | Patch50: eptex-100420-vine.patch |
---|
| 112 | Patch51: http://sourceforge.jp/projects/eptex/wiki/FrontPage/attach/eptex-100420-patch1.diff |
---|
| 113 | |
---|
| 114 | ## texdoc |
---|
| 115 | #Patch90: texdoc-0.72-support-zipped-vine.patch |
---|
| 116 | |
---|
| 117 | ## others |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | Requires: coreutils ghostscript >= 8.63 |
---|
| 121 | Requires: tmpwatch libpng |
---|
| 122 | Requires: ed mktemp |
---|
| 123 | Requires: openMotif |
---|
| 124 | Requires: poppler |
---|
| 125 | Requires: openssl |
---|
| 126 | Requires: libpaper |
---|
| 127 | Requires: perl-Tk |
---|
| 128 | Requires: nkf |
---|
| 129 | Requires: libkpathsea = %{version}-%{release} |
---|
| 130 | Requires: libptexenc = %{version}-%{release} |
---|
| 131 | %{!?with_firstbuild:Requires: texlive-common = %{version}} |
---|
| 132 | %{!?with_firstbuild:Requires: texlive-macros = %{version}} |
---|
| 133 | %{!?with_firstbuild:Requires: jvf >= 2.0-5} |
---|
| 134 | Requires: fontconfig >= 2.6.0-2 |
---|
| 135 | Requires(post,postun): fontconfig >= 2.6.0-2 |
---|
| 136 | Requires(post): ed mktemp |
---|
| 137 | Requires(post): vutils >= 2.0.5 |
---|
| 138 | %{!?with_firstbuild:BuildRequires: texlive-common = %{version}} |
---|
| 139 | BuildRequires: texlive-sources = %{version} |
---|
| 140 | %if %{?_dist_release} == "vl6" |
---|
| 141 | BuildRequires: xz |
---|
| 142 | %endif |
---|
| 143 | %if %{?_dist_release} == "vl5" |
---|
| 144 | BuildRequires: lzma |
---|
| 145 | %endif |
---|
| 146 | BuildRequires: unzip |
---|
| 147 | BuildRequires: bison flex |
---|
| 148 | BuildRequires: zlib-devel libpng-devel gd-devel ncurses-devel libjpeg-devel |
---|
| 149 | BuildRequires: t1lib-devel |
---|
| 150 | BuildRequires: XOrg-devel |
---|
| 151 | BuildRequires: freetype2-devel >= 2.1.10 |
---|
| 152 | BuildRequires: autoconf >= 2.63 |
---|
| 153 | BuildRequires: openMotif-devel |
---|
| 154 | BuildRequires: poppler-devel |
---|
| 155 | BuildRequires: openssl-devel |
---|
| 156 | BuildRequires: libpaper-devel |
---|
| 157 | BuildRequires: fontconfig-devel |
---|
| 158 | BuildRequires: nkf |
---|
| 159 | BuildRequires: t1utils |
---|
| 160 | |
---|
| 161 | Provides: jadetex |
---|
| 162 | Obsoletes: jadetex <= 3.12-9 |
---|
| 163 | Obsoletes: tetex <= 3.0 |
---|
| 164 | Obsoletes: dvipdfmx <= 20090522 |
---|
| 165 | Obsoletes: xdvik <= 22.84.14, xdvik-motif <= 22.84.14 |
---|
| 166 | |
---|
| 167 | Obsoletes: tetex-latex tetex-afm tetex-type1 tetex-devel |
---|
| 168 | Obsoletes: pTeX pLaTeX2e pLaTeX2e_Macros dvipsk |
---|
| 169 | Obsoletes: dvipdfm texmacro-aps |
---|
| 170 | Obsoletes: makejvf <= 1.1a |
---|
| 171 | Conflicts: task-texmacro-phys < 1.1 |
---|
| 172 | # Provides: tetex-latex |
---|
| 173 | |
---|
| 174 | Buildroot: %{_tmppath}/%{name}-%{version}-root |
---|
| 175 | |
---|
| 176 | Vendor: Project Vine |
---|
| 177 | Distribution: Vine Linux |
---|
| 178 | Packager: munepi |
---|
| 179 | |
---|
| 180 | |
---|
| 181 | %description |
---|
| 182 | The TeX Live software distribution offers a complete TeX system for a |
---|
| 183 | variety of Unix, Macintosh, Windows and other platforms. It |
---|
| 184 | encompasses programs for editing, typesetting, previewing and printing |
---|
| 185 | of TeX documents in many different languages, and a large collection |
---|
| 186 | of TeX macros and font libraries. |
---|
| 187 | |
---|
| 188 | The distribution includes extensive general documentation about TeX, |
---|
| 189 | as well as the documentation for the included software packages. |
---|
| 190 | |
---|
| 191 | This package provides a Japanese TeX environment |
---|
| 192 | based on ptexlive-%{ptexlivever}. |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | %description -l ja |
---|
| 196 | TeX Live ソフトウェアディストリビューションは、 |
---|
| 197 | さまざまな Unix, Macintosh, Windows、および |
---|
| 198 | 他のプラットホームに対して完全な TeX システムを提供します。 |
---|
| 199 | 多くの異なった言語を含む TeX ドキュメントの |
---|
| 200 | 編集、組版、閲覧、印刷するためのプログラム、 |
---|
| 201 | そして、TeX マクロやフォントライブラリの大きなコレクションを |
---|
| 202 | 同梱しています。 |
---|
| 203 | |
---|
| 204 | このディストリビューションは |
---|
| 205 | 同梱しているソフトウェアパッケージのためのドキュメントばかりでなく、 |
---|
| 206 | TeX に関するたくさんの一般的なドキュメントを含んでいます。 |
---|
| 207 | |
---|
| 208 | このパッケージは ptexlive-%{ptexlivever} を元にした |
---|
| 209 | 日本語 TeX 環境を提供します。 |
---|
| 210 | |
---|
| 211 | |
---|
| 212 | %package doc |
---|
| 213 | Summary: TeX Live: Documentation files of %{name} |
---|
| 214 | Group: Applications/Publishing |
---|
| 215 | Requires: %{name} = %{version}-%{release} |
---|
[1542] | 216 | BuildArch: noarch |
---|
[1533] | 217 | |
---|
| 218 | %description doc |
---|
| 219 | This package contains documentation files of %{name}. |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | %package -n libkpathsea |
---|
| 223 | Summary: path search library for the TeX Live |
---|
| 224 | Summary(ja): TeX Live 用パス検索ライブラリ |
---|
| 225 | Group: System Environment/Libraries |
---|
| 226 | |
---|
| 227 | %description -n libkpathsea |
---|
| 228 | This package includes runtime part of the Kpathsea library. |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | %package -n libkpathsea-devel |
---|
| 232 | Summary: path search libary and header files for the TeX Live |
---|
| 233 | Summary(ja): TeX Live 用パス検索ライブラリとヘッダファイル |
---|
| 234 | Group: Development/Libraries |
---|
| 235 | Requires: libkpathsea = %{version}-%{release} |
---|
| 236 | |
---|
| 237 | %description -n libkpathsea-devel |
---|
| 238 | This package includes static library and header files of the Kpathsea library. |
---|
| 239 | |
---|
| 240 | |
---|
| 241 | %package -n libptexenc |
---|
| 242 | Summary: Kanji code convert library for Japanese pTeX |
---|
| 243 | Summary(ja): 日本語 pTeX 用漢字コード変換ライブラリ |
---|
| 244 | Group: System Environment/Libraries |
---|
| 245 | Requires: libkpathsea = %{version}-%{release} |
---|
| 246 | |
---|
| 247 | %description -n libptexenc |
---|
| 248 | This package includes runtime part of the ptexenc library. |
---|
| 249 | |
---|
| 250 | |
---|
| 251 | %package -n libptexenc-devel |
---|
| 252 | Summary: Kanji code convert library and header files for Japanese pTeX |
---|
| 253 | Summary(ja): 日本語 pTeX 用漢字コード変換ライブラリとヘッダファイル |
---|
| 254 | Group: Development/Libraries |
---|
| 255 | Requires: libptexenc = %{version}-%{release} |
---|
| 256 | |
---|
| 257 | %description -n libptexenc-devel |
---|
| 258 | This package includes header files of the ptexenc library. |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | %prep |
---|
| 262 | [ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot} |
---|
| 263 | |
---|
| 264 | #% setup -q -n ptexlive-%{ptexlivever} -a 90 |
---|
| 265 | %setup -q -n ptexlive-%{ptexlivever} |
---|
| 266 | |
---|
| 267 | ## extract texlive-source |
---|
| 268 | %__tar Jxf %{texlive_src}/source/%{name}-%{texlivesrcver}-source.tar.xz || exit 1 |
---|
| 269 | |
---|
| 270 | ## move texlive-source to build/ |
---|
| 271 | %__mkdir_p build && \ |
---|
| 272 | %__mv %{name}-%{texlivesrcver}-source build/ || exit 1 |
---|
| 273 | |
---|
| 274 | ## apply ptexlive |
---|
| 275 | %patch0 -p1 -b .orig |
---|
| 276 | |
---|
| 277 | ## fix $SELFAUTODIR to /usr/share |
---|
| 278 | %patch1 -p1 -b .orig |
---|
| 279 | |
---|
| 280 | %__cat <<EOF > ptexlive.cfg |
---|
| 281 | #KANJI_CODE=EUC |
---|
| 282 | KANJI_CODE=UTF8 |
---|
| 283 | |
---|
| 284 | TEXLIVE_VERSION=2009 |
---|
| 285 | ISO_DIR=%{texlive_src} |
---|
| 286 | TEXLIVE_DIR=%{texlive_src} |
---|
| 287 | ##SRC_DIR=%{_sourcedir} |
---|
| 288 | SRC_TAR=%{SOURCE0} |
---|
| 289 | |
---|
| 290 | ##PREFIX=%{tex_destdir} |
---|
| 291 | PREFIX=$(pwd)/Vine |
---|
| 292 | TMP_PREFIX=$(pwd)/build |
---|
| 293 | TEXSRC_EXTRACTED=$(pwd)/build/%{name}-%{texlivesrcver}-source |
---|
| 294 | ##SRC_TAR=%{SOURCE1} |
---|
| 295 | ##TEXMFDIST=$(pwd)/build/%{name}-%{texlivesrcver}-source/inst/texmf-dist |
---|
| 296 | TEXMFDIST=%{texlive_src}/texmf-dist |
---|
| 297 | |
---|
| 298 | XDVI=echo |
---|
| 299 | PSPDF=echo |
---|
| 300 | |
---|
| 301 | make_option vartexfonts=%{vartexfonts} |
---|
| 302 | |
---|
| 303 | conf_option --enable-luatex |
---|
| 304 | conf_option --enable-xetex |
---|
| 305 | conf_option --enable-xdv2pdf |
---|
| 306 | conf_option --enable-xdvipdfmx |
---|
| 307 | |
---|
| 308 | conf_option --with-xdvi-x-toolkit=motif |
---|
| 309 | # conf_option --without-x |
---|
| 310 | # conf_option --disable-xdvik |
---|
| 311 | # conf_option --disable-oxdvik |
---|
| 312 | # conf_option --disable-pxdvik |
---|
| 313 | |
---|
| 314 | conf_option --with-system-ncurses |
---|
| 315 | conf_option --with-system-zlib |
---|
| 316 | conf_option --with-system-pnglib |
---|
| 317 | conf_option --with-system-t1lib |
---|
| 318 | conf_option --without-system-icu |
---|
| 319 | conf_option --with-system-freetype |
---|
| 320 | conf_option --with-system-freetype2 |
---|
| 321 | conf_option --with-freetype2-include=`freetype-config --cflags | sed -e 's/-I//' -e 's/ .*//'` |
---|
| 322 | conf_option --with-system-gd |
---|
| 323 | conf_option --enable-shared |
---|
| 324 | conf_option --enable-kanji-iconv |
---|
| 325 | |
---|
| 326 | conf_option --disable-multiplatform |
---|
| 327 | make_option %{?_smp_mflags} |
---|
| 328 | EOF |
---|
| 329 | |
---|
| 330 | ## exec 2extract-src.sh |
---|
| 331 | %__make x |
---|
| 332 | |
---|
| 333 | ## texmf.cnf for Vine Linux |
---|
| 334 | %patch2 -p1 -b .orig |
---|
| 335 | |
---|
| 336 | ## pxdvik for Vine Linux |
---|
| 337 | %patch10 -p1 -b .orig |
---|
| 338 | |
---|
| 339 | ## dvipdfmx for Vine Linux |
---|
| 340 | %patch20 -p1 -b .orig |
---|
| 341 | |
---|
| 342 | ## eptex |
---|
| 343 | (cd .. |
---|
| 344 | %__tar jxf %{SOURCE52} |
---|
| 345 | cd eptex-%{eptexver} |
---|
| 346 | %patch50 -p1 -b .orig |
---|
| 347 | %patch51 -p1 -b .orig |
---|
| 348 | ## apply eptex: exec almost 0eptex.sh |
---|
| 349 | %if %with_eptex |
---|
| 350 | ./0eptex.sh |
---|
| 351 | %endif |
---|
| 352 | ) |
---|
| 353 | |
---|
| 354 | ## texdoc |
---|
| 355 | #%patch90 -p0 -b .orig |
---|
| 356 | |
---|
| 357 | |
---|
| 358 | %build |
---|
| 359 | ## NOTE: |
---|
| 360 | ## In this setion, |
---|
| 361 | ## execute almostly 3make-install.sh |
---|
| 362 | set -x |
---|
| 363 | unset TEXINPUTS || : |
---|
| 364 | unset HOME || : |
---|
| 365 | |
---|
| 366 | . ./common.sh |
---|
| 367 | |
---|
| 368 | export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LANG=C |
---|
| 369 | ##%__make c |
---|
| 370 | |
---|
| 371 | PREF=${TEXSRC_EXTRACTED}/inst |
---|
| 372 | |
---|
| 373 | %__mkdir_p ${PREF}/texmf |
---|
| 374 | %__mkdir_p ${PREF}/../Work |
---|
| 375 | pushd ${PREF}/../Work |
---|
| 376 | ../configure --host=%{_host} --build=%{_build} \ |
---|
| 377 | --prefix=${PREF} \ |
---|
| 378 | --datadir=${PREF} \ |
---|
| 379 | \ |
---|
| 380 | --disable-native-texlive-build \ |
---|
| 381 | --enable-multiplatform \ |
---|
| 382 | --disable-omfonts \ |
---|
| 383 | --enable-compiler-warnings=max \ |
---|
| 384 | --without-cxx-runtime-hack \ |
---|
| 385 | --enable-kanji=$KANJI_CODE \ |
---|
| 386 | --with-ptexenc=$KANJI_CODE \ |
---|
| 387 | --disable-all-pkgs \ |
---|
| 388 | --enable-web2c \ |
---|
| 389 | --disable-luatex \ |
---|
| 390 | --disable-xetex \ |
---|
| 391 | --enable-mf \ |
---|
| 392 | --enable-mf-nowin \ |
---|
| 393 | --enable-mp \ |
---|
| 394 | --enable-web-progs \ |
---|
| 395 | --enable-dvipdfmx \ |
---|
| 396 | --enable-dvipsk \ |
---|
| 397 | --enable-pdvipsk \ |
---|
| 398 | --enable-gsftopk \ |
---|
| 399 | --enable-makeindexk \ |
---|
| 400 | --enable-makejvf \ |
---|
| 401 | --enable-mendexk \ |
---|
| 402 | --enable-ps2pkm \ |
---|
| 403 | --enable-xdvik \ |
---|
| 404 | --enable-pxdvik \ |
---|
| 405 | --enable-tetex \ |
---|
| 406 | --enable-texlive \ |
---|
| 407 | $CONF_OPTION |
---|
| 408 | |
---|
| 409 | |
---|
| 410 | (cd .. |
---|
| 411 | ## Avoid pollution from internal libraries. |
---|
| 412 | %__rm -rf ./libs/{expat,freetype,freetype2,gd,jpeg,libpng,libttf,ncurses,type1,t1lib,zlib} |
---|
| 413 | |
---|
| 414 | ## XXX Hacks to avoid accidental version clashs with system libraries. |
---|
| 415 | hack_libs=( |
---|
| 416 | zlib |
---|
| 417 | libpng |
---|
| 418 | t1lib |
---|
| 419 | freetype |
---|
| 420 | freetype2 |
---|
| 421 | gd |
---|
| 422 | ) |
---|
| 423 | for i in "${hack_libs[@]}"; do |
---|
| 424 | %__mkdir_p ./libs/${i} |
---|
| 425 | touch ./libs/${i}/configure |
---|
| 426 | done |
---|
| 427 | ) |
---|
| 428 | |
---|
| 429 | %__make world $MAKE_OPTION %{?_smp_mflags} |
---|
| 430 | popd |
---|
| 431 | |
---|
| 432 | |
---|
| 433 | %install |
---|
[1542] | 434 | ## prepare %%install session |
---|
[1533] | 435 | [ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot} |
---|
| 436 | |
---|
| 437 | set -x |
---|
| 438 | unset TEXINPUTS || : |
---|
| 439 | unset HOME || : |
---|
| 440 | |
---|
| 441 | . ./common.sh |
---|
| 442 | |
---|
| 443 | PREF=${TEXSRC_EXTRACTED}/inst |
---|
| 444 | |
---|
| 445 | pushd ${PREF}/../Work |
---|
| 446 | ## the following two lines are useful for |
---|
| 447 | ## "rpmbuild -ba --short-circuit ~/rpm/SPECS/texlive-vl.spec" |
---|
| 448 | %__rm -rf ${PREF} |
---|
| 449 | %__make world $MAKE_OPTION |
---|
| 450 | popd |
---|
| 451 | |
---|
| 452 | ## execute almostly 4extract-texmf.sh |
---|
| 453 | %__mv ${PREF}/texmf-dist ${PREF}/texmf-dist.install || exit # never use |
---|
| 454 | %__mv ${PREF}/texmf ${PREF}/texmf.install || exit |
---|
| 455 | %__cp -r %{texlive_src}/texmf ${PREF}/ || exit |
---|
| 456 | %__cp -rf ${PREF}/texmf.install/* ${PREF}/texmf/ || exit |
---|
| 457 | |
---|
| 458 | ## copy almost compatible TeX system of teTeX-3.0 |
---|
| 459 | ## NOTE: The size of texmf-dist is about 2GB below: |
---|
| 460 | # 890M doc |
---|
| 461 | # 660M fonts |
---|
| 462 | # 103M source |
---|
| 463 | # |
---|
| 464 | # 68M tex/latex |
---|
| 465 | # 46M tex/generic |
---|
| 466 | # 27M tex/context |
---|
| 467 | ##%__ln_s -f %{texlive_src}/texmf-dist ${PREF}/ |
---|
| 468 | %__mkdir_p ${PREF}/texmf-dist |
---|
| 469 | ##!! [FAKE] copy all directries except doc, fonts, source, tex4ht in texmf-dist |
---|
| 470 | (cd %{texlive_src}/texmf-dist |
---|
| 471 | %__cp -r README metapost scripts bibtex dvips makeindex mft \ |
---|
| 472 | tlpkg context metafont tex omega vtex \ |
---|
| 473 | ${PREF}/texmf-dist/ |
---|
| 474 | ) |
---|
| 475 | ## copy some fonts (almost tetex + tetex-extra) |
---|
| 476 | ## NOTE: this part is in texlive-common since texlive-8vl6 |
---|
| 477 | |
---|
| 478 | #### customize updmap.cfg for each font's map files |
---|
| 479 | %{!?with_firstbuild: \ |
---|
| 480 | %__sed -i -e "s,^\(Map\|MixedMap\),#! \1,g" ${PREF}/texmf/web2c/updmap.cfg} |
---|
| 481 | |
---|
| 482 | ## make some fundamental texmf trees |
---|
| 483 | %__mkdir_p ${PREF}/texmf-config |
---|
| 484 | %__mkdir_p ${PREF}/texmf-var |
---|
| 485 | %__mkdir_p ${PREF}/texmf-local |
---|
| 486 | |
---|
| 487 | ## NOTE: need texmf-dist/tex/latex/ltxmisc url.sty |
---|
| 488 | ./4extract-texmf.sh %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1} |
---|
| 489 | |
---|
| 490 | ## post 0eptex.sh |
---|
| 491 | %if %with_eptex |
---|
| 492 | (cd ../eptex-%{eptexver} |
---|
| 493 | ## copying distfiles |
---|
| 494 | echo "[copying] eptex.src" |
---|
| 495 | %__mkdir -p ${TEXMF}/ptex/plain/base |
---|
| 496 | %__cp eptex.src ${TEXMF}/ptex/plain/base/ || exit 1 |
---|
| 497 | echo "[copying] eptexdefs.lib" |
---|
| 498 | cp eptexdefs.lib $TEXMF/ptex/plain/base/ || exit 1 |
---|
| 499 | echo "[copying] language.def" |
---|
| 500 | %__mkdir -p ${TEXMF}/ptex/generic/config |
---|
| 501 | %__cp language.def ${TEXMF}/ptex/generic/config/ || exit 1 |
---|
| 502 | ) |
---|
| 503 | %endif |
---|
| 504 | |
---|
| 505 | ##!! DO NOT execute 5macro.sh |
---|
| 506 | # ./5macro.sh clean default utf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1} |
---|
| 507 | # ./5macro.sh otf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1} |
---|
| 508 | |
---|
| 509 | ## execute 6babel.sh |
---|
| 510 | %if %with_babel |
---|
| 511 | # %__unzip -o -d babel %{SOURCE40} |
---|
| 512 | # %__unzip -o -d babel %{SOURCE41} |
---|
| 513 | # %__install -m0644 \ |
---|
| 514 | # babel/texmf/tex/generic/hyphen/cathyph.tex \ |
---|
| 515 | # babel/texmf/tex/generic/hyphen/cyhyph.tex \ |
---|
| 516 | # ${TEXMF}/tex/generic/hyphen/ || exit 1 |
---|
| 517 | %{!?with_firstbuild: ../eptex-%{eptexver}/6babel.sh || exit 1} |
---|
| 518 | ## check 6babel.sh |
---|
| 519 | %{!?with_firstbuild: [ -f ${PREF}/texmf/doc/japanese/sample.tex ] || exit 1} |
---|
| 520 | %endif |
---|
| 521 | |
---|
| 522 | # ## update texdoc |
---|
| 523 | # cd texdoc-%{texdocver} || exit 1 |
---|
| 524 | # %__rm -rf ${PREF}/texmf/texdoc || exit 1 |
---|
| 525 | # %__mkdir_p ${PREF}/texmf/texdoc |
---|
| 526 | # %__cp -fa texdoc.cnf ${PREF}/texmf/texdoc/ || exit 1 |
---|
| 527 | |
---|
| 528 | # %__rm -rf ${PREF}/texmf/scripts/texdoc || exit 1 |
---|
| 529 | # %__rm -f script/*.orig || exit 1 |
---|
| 530 | # %__cp -ra script ${PREF}/texmf/scripts/texdoc || exit 1 |
---|
| 531 | # %__chmod 755 ${PREF}/texmf/scripts/texdoc/* || exit 1 |
---|
| 532 | |
---|
| 533 | # %__rm -rf ${PREF}/texmf/doc/texdoc || exit 1 |
---|
| 534 | # %__cp -ra doc ${PREF}/texmf/doc/texdoc || exit 1 |
---|
| 535 | # %__cp -a News Todo ${PREF}/texmf/doc/texdoc/ || exit 1 |
---|
| 536 | # cd - |
---|
| 537 | # # TODO: |
---|
| 538 | # # %{!?with_firstbuild: \ |
---|
| 539 | # # cd ${PREF}/texmf/doc/texdoc && %__make || exit 1} |
---|
| 540 | |
---|
| 541 | |
---|
| 542 | ## install |
---|
| 543 | %__mkdir_p %{buildroot}%{_prefix} |
---|
| 544 | (cd ${PREF} |
---|
| 545 | %__rm -f bin/man |
---|
| 546 | %__cp -r bin %{buildroot}%{_bindir} |
---|
| 547 | %__cp -r lib %{buildroot}%{_libdir} |
---|
| 548 | %__cp -r include %{buildroot}%{_includedir} |
---|
| 549 | |
---|
| 550 | ##NOTE: use man, info files from texlive-sources |
---|
| 551 | %__rm -rf texmf/doc/info |
---|
| 552 | %__rm -rf texmf/doc/man |
---|
| 553 | |
---|
| 554 | %__mkdir_p %{build_tex_destdir} |
---|
| 555 | ## NOTE: texmf-dist is contained in texlive-common package |
---|
| 556 | ##%__cp -r texmf{,-dist,-config,-var,-local} %{build_tex_destdir}/ || exit 1 |
---|
| 557 | %__cp -r texmf{,-config,-var,-local} %{build_tex_destdir}/ || exit 1 |
---|
| 558 | ) |
---|
| 559 | |
---|
| 560 | %__mkdir_p %{build_texmf}/fonts/truetype |
---|
| 561 | %__mkdir_p %{build_texmf}/fonts/opentype |
---|
| 562 | |
---|
| 563 | ## dvipdfmx: our map file |
---|
| 564 | %__mkdir_p %{build_texmf}/fonts/map/dvipdfmx |
---|
| 565 | touch %{build_texmf}/fonts/map/dvipdfmx/vine.map |
---|
| 566 | |
---|
| 567 | ## delete useless files (conflict with jvf package) |
---|
| 568 | # rm -rf %{build_texmf}/fonts/vf/ptex |
---|
| 569 | # rm -rf %{build_texmf}/fonts/tfm/ptex/*[a-zA-Z].tfm |
---|
| 570 | %__rm %{build_texmf}/fonts/vf/ptex/{min,tmin,goth,tgoth}{5,6,7,8,9,10}.vf || exit 1 |
---|
| 571 | |
---|
| 572 | ## install jtygm.sty |
---|
| 573 | %__install -m0644 %{SOURCE102} %{build_texmf}/ptex/platex/base/ || exit 1 |
---|
| 574 | |
---|
| 575 | ## morisawa map files remaped PS Kanji (CIDFont) Name |
---|
| 576 | %__install -m 0644 %{SOURCE103} %{SOURCE104} \ |
---|
| 577 | %{buildroot}%{texmf}/fonts/map/dvipdfm/ptexlive/ |
---|
| 578 | |
---|
| 579 | |
---|
| 580 | ## remove asymptote directries, which provides asymptote package |
---|
| 581 | find %{buildroot} -regex ".*asymptote.*" | xargs %__rm -rf |
---|
| 582 | # find %{buildroot} -name "Makefile" | xargs %__rm -f |
---|
| 583 | |
---|
| 584 | # ## remove xindy |
---|
| 585 | # find %{buildroot} -regex ".*xindy.*" | xargs %__rm -rf |
---|
| 586 | |
---|
| 587 | # ## remove tex4ht |
---|
| 588 | # find %{buildroot} -regex ".*tex4ht.*" | xargs %__rm -rf |
---|
| 589 | |
---|
| 590 | ## relocate binaries to %{_bindir} and fix relative symlinks |
---|
| 591 | pushd %{buildroot}%{_bindir} |
---|
| 592 | for i in `find . -type l`; do |
---|
| 593 | if [ "`readlink $i | grep '..' | wc -l`" == "1" ]; then |
---|
| 594 | l=`readlink $i | sed s,../,../share/,` |
---|
| 595 | %__ln_s -f $l $i |
---|
| 596 | fi |
---|
| 597 | done |
---|
| 598 | popd |
---|
| 599 | |
---|
| 600 | # ## compress pdf files in texmf/doc |
---|
| 601 | # find %{build_tex_destdir}/texmf/doc -name "*.pdf" -exec xz {} \; |
---|
| 602 | |
---|
| 603 | ## compress info files |
---|
| 604 | %__rm -f %{buildroot}%{_infodir}/dir |
---|
| 605 | %__gzip -9nf %{buildroot}%{_infodir}/*info* ||: |
---|
| 606 | |
---|
| 607 | ## desktop things |
---|
| 608 | %__mkdir_p %{buildroot}%{_datadir}/applications |
---|
| 609 | %__install -c %{SOURCE10} %{buildroot}%{_datadir}/applications/pxdvi.desktop |
---|
| 610 | |
---|
| 611 | # for created fonts |
---|
| 612 | %__mkdir_p %{buildroot}%{vartexfonts} |
---|
| 613 | %__mkdir_p %{buildroot}%{_sysconfdir}/cron.daily |
---|
| 614 | %__install -m 755 %{SOURCE100} %{buildroot}%{_sysconfdir}/cron.daily/ |
---|
| 615 | |
---|
| 616 | ## set executable bit for the library |
---|
| 617 | %__chmod a+x %{buildroot}%{_libdir}/libkpathsea.so.*.* |
---|
| 618 | %__chmod a+x %{buildroot}%{_libdir}/libptexenc.so.*.* |
---|
| 619 | |
---|
| 620 | ## remove unpackaging files |
---|
| 621 | find %{buildroot} | %__grep -e "\\.\(la\|a\)$" | xargs %__rm -f |
---|
| 622 | find %{buildroot} | %__grep -e "\\.\(diff\|patch\)$" | xargs %__rm -f |
---|
| 623 | |
---|
| 624 | ### Files list |
---|
| 625 | find %{buildroot} -type f -or -type l | \ |
---|
| 626 | %__sed -e "s|%{buildroot}||g" | \ |
---|
| 627 | %__grep -v -e "^%{_sysconfdir}" -e ".patch$" -e "\.diff$" -e "\.orig$" | \ |
---|
| 628 | %__grep -v "%{_includedir}" | \ |
---|
| 629 | %__grep -v "%{_libdir}" | \ |
---|
| 630 | %__grep -v "%{_infodir}" | \ |
---|
| 631 | %__sed -e "s|.*\.\(cnf\|cfg\)$|%config(noreplace) &|" \ |
---|
| 632 | -e "s|.*ls-R$|%ghost &|" \ |
---|
| 633 | -e "s|^.*/updmap$|%config &|" \ |
---|
| 634 | -e "s|%{texmf}*/dvips/config/\(psfonts.*\|ps2pk.*\|pdftex.*\|dvipdfm.*\|.*35\)\.map$|%ghost &|" \ |
---|
| 635 | -e "s|%{texmf}*/web2c/.*\.\(fmt\|efmt\|log\|base\|mem\|oft\)$|%config &|" \ |
---|
| 636 | -e "s|%{texmf}*/dvips/config/config\.\(generic\|pdf\|ps\|www\)$|%config &|" \ |
---|
| 637 | -e "s|%{texmf}*/tex/generic/config/.*|%config &|" \ |
---|
| 638 | -e "s|%{texmf}*/pdftex/config/pdftex.cfg$|%config &|" \ |
---|
| 639 | -e "s|%{texmf}*/xdvi/vfontmap$|%config &|" \ |
---|
| 640 | -e "s|%{texmf}*/xdvi/XDvi|%config &|" \ |
---|
| 641 | -e "s|%{_mandir}/.*|&*|" \ |
---|
| 642 | > filelist.full |
---|
| 643 | |
---|
| 644 | find %{buildroot}%{texmf} -type d | \ |
---|
| 645 | %__sed -e "s|^%{buildroot}|%dir |" \ |
---|
| 646 | -e "s|$|/|" >> filelist.full |
---|
| 647 | |
---|
| 648 | ## subpackages |
---|
| 649 | %__grep "/texmf/doc/" filelist.full > filelist.doc |
---|
| 650 | cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp |
---|
| 651 | %__mv -f filelist.tmp filelist.full |
---|
| 652 | |
---|
| 653 | |
---|
| 654 | %clean |
---|
| 655 | %__rm -rf %{buildroot} |
---|
| 656 | |
---|
| 657 | |
---|
| 658 | %post |
---|
| 659 | ## dvipdfmx |
---|
| 660 | ## Create our own cid-x.map |
---|
| 661 | ( %{exec_upddeffont} ) ||: |
---|
| 662 | |
---|
| 663 | %{exec_texhash} |
---|
| 664 | %{exec_updmap} --enable KanjiMap vine.map >/dev/null 2>&1 |
---|
| 665 | # echo -n " " |
---|
| 666 | # echo -n "Running updmap ... " && %{exec_updmap} >/dev/null 2>&1 && echo "done." |
---|
| 667 | # echo -n " " |
---|
| 668 | # echo -n "Running fmtutil ... " && %{exec_fmtutil} && echo "done." |
---|
| 669 | |
---|
| 670 | |
---|
| 671 | %preun |
---|
| 672 | %__rm -rf %{_var}/lib/texmf/* |
---|
| 673 | if [ "$1" = 0 ]; then |
---|
| 674 | ## dvipdfmx |
---|
| 675 | for i in %{texmf}/fonts/truetype/* |
---|
| 676 | do |
---|
| 677 | if [ -L "$i" ]; then |
---|
| 678 | %__rm -f "$i" |
---|
| 679 | fi |
---|
| 680 | done |
---|
| 681 | fi |
---|
| 682 | |
---|
| 683 | |
---|
| 684 | %post -n libkpathsea |
---|
| 685 | /sbin/ldconfig |
---|
| 686 | # /sbin/install-info %{_infodir}/kpathsea.info.* %{_infodir}/dir |
---|
| 687 | |
---|
| 688 | %preun -n libkpathsea |
---|
| 689 | # if [ "$1" = 0 ]; then |
---|
| 690 | # /sbin/install-info --delete %{_infodir}/kpathsea.info.* %{_infodir}/dir |
---|
| 691 | # fi |
---|
| 692 | |
---|
| 693 | %postun -n libkpathsea |
---|
| 694 | /sbin/ldconfig |
---|
| 695 | |
---|
| 696 | %post -n libptexenc |
---|
| 697 | /sbin/ldconfig |
---|
| 698 | |
---|
| 699 | %postun -n libptexenc |
---|
| 700 | /sbin/ldconfig |
---|
| 701 | |
---|
| 702 | |
---|
| 703 | %triggerin -- ghostscript |
---|
| 704 | %__rm -f %{texmf}/fonts/cmap/ghostscript |
---|
| 705 | if [ -d "%{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap" ] ; then |
---|
| 706 | %__ln_s %{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap %{texmf}/fonts/cmap/ghostscript |
---|
| 707 | elif [ -d "%{_datadir}/ghostscript/Resource/CMap" ] ; then |
---|
| 708 | %__ln_s %{_datadir}/ghostscript/Resource/CMap %{texmf}/fonts/cmap/ghostscript |
---|
| 709 | fi |
---|
| 710 | %{exec_texhash} |
---|
| 711 | |
---|
| 712 | |
---|
| 713 | %files -f filelist.full |
---|
| 714 | %defattr(-,root,root) |
---|
| 715 | %attr(1777,root,root) %dir %{_var}/lib/texmf |
---|
| 716 | %config %{_sysconfdir}/cron.daily/texlive.cron |
---|
| 717 | |
---|
| 718 | %files doc -f filelist.doc |
---|
| 719 | %defattr(-,root,root) |
---|
| 720 | |
---|
| 721 | %files -n libkpathsea |
---|
| 722 | %defattr(-,root,root) |
---|
| 723 | %{_libdir}/libkpathsea.so.* |
---|
| 724 | # %{_infodir}/kpathsea.info* |
---|
| 725 | |
---|
| 726 | %files -n libkpathsea-devel |
---|
| 727 | %defattr(-,root,root) |
---|
| 728 | %{_libdir}/libkpathsea.so |
---|
| 729 | %dir %{_includedir}/kpathsea |
---|
| 730 | %{_includedir}/kpathsea/* |
---|
| 731 | |
---|
| 732 | %files -n libptexenc |
---|
| 733 | %defattr(-,root,root) |
---|
| 734 | %{_libdir}/libptexenc.so.* |
---|
| 735 | |
---|
| 736 | %files -n libptexenc-devel |
---|
| 737 | %defattr(-,root,root) |
---|
| 738 | %{_libdir}/libptexenc.so |
---|
| 739 | %dir %{_includedir}/ptexenc |
---|
| 740 | %{_includedir}/ptexenc/* |
---|
| 741 | |
---|
| 742 | |
---|
| 743 | %changelog |
---|
[1542] | 744 | * Mon Aug 09 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-9 |
---|
| 745 | - added BuildArch: noarch in %%package doc |
---|
| 746 | - removed some comment-out sentences |
---|
| 747 | |
---|
[1533] | 748 | * Tue Jul 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-8 |
---|
| 749 | - separeted texmf-dist to texlive-common package |
---|
| 750 | |
---|
| 751 | * Mon Jul 19 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-7 |
---|
| 752 | - unpacked texlive-20091107-source.tar.xz |
---|
| 753 | - babel is available now |
---|
| 754 | - applied eptex-100420 and some patches: |
---|
| 755 | - eptex-100420-vine.patch |
---|
| 756 | - eptex-100420-patch1.diff |
---|
| 757 | |
---|
| 758 | * Tue Jul 13 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-6 |
---|
| 759 | - updated ptexlive-20100711 |
---|
| 760 | |
---|
| 761 | * Sat Jun 12 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-5 |
---|
| 762 | - customized updmap.cfg to correspond installed fonts |
---|
| 763 | |
---|
| 764 | * Mon May 31 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-4 |
---|
| 765 | - fixed insttexfont() |
---|
| 766 | |
---|
| 767 | * Mon May 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-3 |
---|
| 768 | - added jvf of MORISAWA basic 5 fonts |
---|
| 769 | - added cm-super, mathdesign in fntlst |
---|
| 770 | |
---|
| 771 | * Sun May 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2 |
---|
| 772 | - define insttexfont() in %%install |
---|
| 773 | - copy almost compatible tetex-3.0 |
---|
| 774 | |
---|
| 775 | * Sat May 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1 |
---|
| 776 | - ptexlive-20090322 + TeXLive 2009 |
---|
| 777 | - added BuildRequires: openssl-devel |
---|
| 778 | |
---|
| 779 | * Sun Dec 06 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2008-0.20091206 |
---|
| 780 | - ptexlive-20091009 + TeXLive 2008 |
---|