texlive-vl.spec 25 KB

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