texlive-vl.spec 23 KB

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