texlive-vl.spec 22 KB

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