texlive-vl.spec 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  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 jvf
  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. ## For vl5, libkpathsea and libptexenc libraries are static link
  300. %if %{enable_sharedlib}
  301. %__cat <<EOF >> ptexlive.cfg
  302. conf_option --enable-shared
  303. EOF
  304. %endif
  305. %if %{?_dist_release} == "vl5"
  306. %__cat <<EOF >> ptexlive.cfg
  307. XZ="7za x -so"
  308. EOF
  309. %endif
  310. %__cat <<EOF >> ptexlive.cfg
  311. conf_option --enable-kanji-iconv
  312. conf_option --disable-multiplatform
  313. make_option %{?_smp_mflags}
  314. EOF
  315. ## exec 2extract-src.sh
  316. %__make x
  317. ## texmf.cnf for Vine Linux
  318. %patch2 -p1 -b .orig
  319. ## pxdvik for Vine Linux
  320. %patch10 -p1 -b .orig
  321. ## dvipdfmx for Vine Linux
  322. %patch20 -p1 -b .orig
  323. ## eptex
  324. (cd ..
  325. %__tar jxf %{SOURCE52}
  326. cd eptex-%{eptexver}
  327. %patch50 -p1 -b .orig
  328. %patch51 -p1 -b .orig
  329. ## apply eptex: exec almost 0eptex.sh
  330. %if %with_eptex
  331. ./0eptex.sh
  332. %endif
  333. )
  334. ## texdoc
  335. #%patch90 -p0 -b .orig
  336. ## libpoppler-0.12
  337. %if %{?_dist_release} != "vl5"
  338. (cd build/%{name}-%{texlivesrcver}-source
  339. %patch100 -p1 -b .xpdf
  340. %patch101 -p1 -b .xpdf
  341. )
  342. %endif
  343. ## apply security patches
  344. (cd build/%{name}-%{texlivesrcver}-source
  345. #%patch1000
  346. %patch1001 -p1 -b .security
  347. %patch1002 -p1 -b .security
  348. )
  349. %build
  350. ## NOTE:
  351. ## In this setion,
  352. ## execute almostly 3make-install.sh
  353. set -x
  354. unset TEXINPUTS || :
  355. unset HOME || :
  356. . ./common.sh
  357. export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LANG=C
  358. ##%__make c
  359. PREF=${TEXSRC_EXTRACTED}/inst
  360. %__mkdir_p ${PREF}/texmf
  361. %__mkdir_p ${PREF}/../Work
  362. pushd ${PREF}/../Work
  363. ../configure --host=%{_host} --build=%{_build} \
  364. --prefix=${PREF} \
  365. --datadir=${PREF} \
  366. \
  367. --disable-native-texlive-build \
  368. --enable-multiplatform \
  369. --disable-omfonts \
  370. --enable-compiler-warnings=max \
  371. --without-cxx-runtime-hack \
  372. --enable-kanji=$KANJI_CODE \
  373. --with-ptexenc=$KANJI_CODE \
  374. --disable-all-pkgs \
  375. --enable-web2c \
  376. --disable-luatex \
  377. --disable-xetex \
  378. --enable-mf \
  379. --enable-mf-nowin \
  380. --enable-mp \
  381. --enable-web-progs \
  382. --enable-dvipdfmx \
  383. --enable-dvipsk \
  384. --enable-pdvipsk \
  385. --enable-gsftopk \
  386. --enable-makeindexk \
  387. --enable-makejvf \
  388. --enable-mendexk \
  389. --enable-ps2pkm \
  390. --enable-xdvik \
  391. --enable-pxdvik \
  392. --enable-tetex \
  393. --enable-texlive \
  394. $CONF_OPTION
  395. (cd ..
  396. ## Avoid pollution from internal libraries.
  397. %__rm -rf ./libs/{expat,freetype,freetype2,gd,jpeg,libpng,libttf,ncurses,type1,t1lib,unzip,xpdf,zlib}
  398. ## XXX Hacks to avoid accidental version clashs with system libraries.
  399. hack_libs=(
  400. zlib
  401. libpng
  402. t1lib
  403. freetype
  404. freetype2
  405. gd
  406. xpdf
  407. )
  408. for i in "${hack_libs[@]}"; do
  409. %__mkdir_p ./libs/${i}
  410. touch ./libs/${i}/configure
  411. done
  412. )
  413. %__make world $MAKE_OPTION %{?_smp_mflags}
  414. popd
  415. %install
  416. ## prepare %%install session
  417. [ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot}
  418. set -x
  419. unset TEXINPUTS || :
  420. unset HOME || :
  421. . ./common.sh
  422. PREF=${TEXSRC_EXTRACTED}/inst
  423. pushd ${PREF}/../Work
  424. ## the following two lines are useful for
  425. ## "rpmbuild -ba --short-circuit ~/rpm/SPECS/texlive-vl.spec"
  426. %__rm -rf ${PREF}
  427. %__make world $MAKE_OPTION
  428. popd
  429. ## execute almostly 4extract-texmf.sh
  430. %__mv ${PREF}/texmf-dist ${PREF}/texmf-dist.install || exit # never use
  431. %__mv ${PREF}/texmf ${PREF}/texmf.install || exit
  432. %__cp -r %{texlive_src}/texmf ${PREF}/ || exit
  433. %__cp -rf ${PREF}/texmf.install/* ${PREF}/texmf/ || exit
  434. ## copy almost compatible TeX system of teTeX-3.0
  435. ## NOTE: The size of texmf-dist is about 2GB below:
  436. # 890M doc
  437. # 660M fonts
  438. # 103M source
  439. #
  440. # 68M tex/latex
  441. # 46M tex/generic
  442. # 27M tex/context
  443. ##%__ln_s -f %{texlive_src}/texmf-dist ${PREF}/
  444. %__mkdir_p ${PREF}/texmf-dist
  445. ##!! [FAKE] copy all directries except doc, fonts, source, tex4ht in texmf-dist
  446. (cd %{texlive_src}/texmf-dist
  447. %__cp -r README metapost scripts bibtex dvips makeindex mft \
  448. tlpkg context metafont tex omega vtex \
  449. ${PREF}/texmf-dist/
  450. )
  451. ## copy some fonts (almost tetex + tetex-extra)
  452. ## NOTE: this part is in texlive-common since texlive-8vl6
  453. #### customize updmap.cfg for each font's map files
  454. %{!?with_firstbuild: \
  455. %__sed -i -e "s,^\(Map\|MixedMap\),#! \1,g" ${PREF}/texmf/web2c/updmap.cfg}
  456. ## make some fundamental texmf trees
  457. %__mkdir_p ${PREF}/texmf-config
  458. %__mkdir_p ${PREF}/texmf-var
  459. %__mkdir_p ${PREF}/texmf-local
  460. ## NOTE: need texmf-dist/tex/latex/ltxmisc url.sty
  461. ./4extract-texmf.sh %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
  462. ## post 0eptex.sh
  463. %if %with_eptex
  464. (cd ../eptex-%{eptexver}
  465. ## copying distfiles
  466. echo "[copying] eptex.src"
  467. %__mkdir -p ${TEXMF}/ptex/plain/base
  468. %__cp eptex.src ${TEXMF}/ptex/plain/base/ || exit 1
  469. echo "[copying] eptexdefs.lib"
  470. cp eptexdefs.lib $TEXMF/ptex/plain/base/ || exit 1
  471. echo "[copying] language.def"
  472. %__mkdir -p ${TEXMF}/ptex/generic/config
  473. %__cp language.def ${TEXMF}/ptex/generic/config/ || exit 1
  474. )
  475. %endif
  476. ##!! DO NOT execute 5macro.sh
  477. # ./5macro.sh clean default utf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
  478. # ./5macro.sh otf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
  479. ## execute 6babel.sh
  480. %if %with_babel
  481. # %__unzip -o -d babel %{SOURCE40}
  482. # %__unzip -o -d babel %{SOURCE41}
  483. # %__install -m0644 \
  484. # babel/texmf/tex/generic/hyphen/cathyph.tex \
  485. # babel/texmf/tex/generic/hyphen/cyhyph.tex \
  486. # ${TEXMF}/tex/generic/hyphen/ || exit 1
  487. %{!?with_firstbuild: ../eptex-%{eptexver}/6babel.sh || exit 1}
  488. ## check 6babel.sh
  489. %{!?with_firstbuild: [ -f ${PREF}/texmf/doc/japanese/sample.tex ] || exit 1}
  490. %endif
  491. # ## update texdoc
  492. # cd texdoc-%{texdocver} || exit 1
  493. # %__rm -rf ${PREF}/texmf/texdoc || exit 1
  494. # %__mkdir_p ${PREF}/texmf/texdoc
  495. # %__cp -fa texdoc.cnf ${PREF}/texmf/texdoc/ || exit 1
  496. # %__rm -rf ${PREF}/texmf/scripts/texdoc || exit 1
  497. # %__rm -f script/*.orig || exit 1
  498. # %__cp -ra script ${PREF}/texmf/scripts/texdoc || exit 1
  499. # %__chmod 755 ${PREF}/texmf/scripts/texdoc/* || exit 1
  500. # %__rm -rf ${PREF}/texmf/doc/texdoc || exit 1
  501. # %__cp -ra doc ${PREF}/texmf/doc/texdoc || exit 1
  502. # %__cp -a News Todo ${PREF}/texmf/doc/texdoc/ || exit 1
  503. # cd -
  504. # # TODO:
  505. # # %{!?with_firstbuild: \
  506. # # cd ${PREF}/texmf/doc/texdoc && %__make || exit 1}
  507. ## install
  508. %__mkdir_p %{buildroot}%{_prefix}
  509. (cd ${PREF}
  510. %__rm -f bin/man
  511. %__cp -r bin %{buildroot}%{_bindir}
  512. %__cp -r lib %{buildroot}%{_libdir}
  513. %__cp -r include %{buildroot}%{_includedir}
  514. ##NOTE: use man, info files from texlive-sources
  515. %__rm -rf texmf/doc/info
  516. %__rm -rf texmf/doc/man
  517. %__mkdir_p %{build_tex_destdir}
  518. ## NOTE: texmf-dist is contained in texlive-common package
  519. ##%__cp -r texmf{,-dist,-config,-var,-local} %{build_tex_destdir}/ || exit 1
  520. %__cp -r texmf{,-config,-var,-local} %{build_tex_destdir}/ || exit 1
  521. )
  522. %__mkdir_p %{build_texmf}/fonts/truetype
  523. %__mkdir_p %{build_texmf}/fonts/opentype
  524. ## dvipdfmx: our map file
  525. %__mkdir_p %{build_texmf}/fonts/map/dvipdfmx
  526. touch %{build_texmf}/fonts/map/dvipdfmx/vine.map
  527. ## delete useless files (conflict with jvf package)
  528. # rm -rf %{build_texmf}/fonts/vf/ptex
  529. # rm -rf %{build_texmf}/fonts/tfm/ptex/*[a-zA-Z].tfm
  530. %__rm %{build_texmf}/fonts/vf/ptex/{min,tmin,goth,tgoth}{5,6,7,8,9,10}.vf || exit 1
  531. ## install jtygm.sty
  532. %__install -m0644 %{SOURCE102} %{build_texmf}/ptex/platex/base/ || exit 1
  533. ## morisawa map files remaped PS Kanji (CIDFont) Name
  534. %__install -m 0644 %{SOURCE103} %{SOURCE104} \
  535. %{buildroot}%{texmf}/fonts/map/dvipdfm/ptexlive/
  536. ## remove asymptote directries, which provides asymptote package
  537. find %{buildroot} -regex ".*asymptote.*" | xargs %__rm -rf
  538. # find %{buildroot} -name "Makefile" | xargs %__rm -f
  539. # ## remove xindy
  540. # find %{buildroot} -regex ".*xindy.*" | xargs %__rm -rf
  541. # ## remove tex4ht
  542. # find %{buildroot} -regex ".*tex4ht.*" | xargs %__rm -rf
  543. ## relocate binaries to %{_bindir} and fix relative symlinks
  544. pushd %{buildroot}%{_bindir}
  545. for i in `find . -type l`; do
  546. if [ "`readlink $i | grep '..' | wc -l`" == "1" ]; then
  547. l=`readlink $i | sed s,../,../share/,`
  548. %__ln_s -f $l $i
  549. fi
  550. done
  551. popd
  552. # ## compress pdf files in texmf/doc
  553. # find %{build_tex_destdir}/texmf/doc -name "*.pdf" -exec xz {} \;
  554. ## compress info files
  555. %__rm -f %{buildroot}%{_infodir}/dir
  556. %__gzip -9nf %{buildroot}%{_infodir}/*info* ||:
  557. ## desktop things
  558. %__mkdir_p %{buildroot}%{_datadir}/applications
  559. %__install -c %{SOURCE10} %{buildroot}%{_datadir}/applications/pxdvi.desktop
  560. # for created fonts
  561. %__mkdir_p %{buildroot}%{vartexfonts}
  562. %__mkdir_p %{buildroot}%{_sysconfdir}/cron.daily
  563. %__install -m 755 %{SOURCE100} %{buildroot}%{_sysconfdir}/cron.daily/
  564. ## set executable bit for the library
  565. %if %{enable_sharedlib}
  566. %__chmod a+x %{buildroot}%{_libdir}/libkpathsea.so.*.*
  567. %__chmod a+x %{buildroot}%{_libdir}/libptexenc.so.*.*
  568. %endif
  569. ## remove unpackaging files
  570. find %{buildroot} | %__grep -e "\\.\(la\|a\)$" | xargs %__rm -f
  571. find %{buildroot} | %__grep -e "\\.\(diff\|patch\)$" | xargs %__rm -f
  572. ### Files list
  573. find %{buildroot} -type f -or -type l | \
  574. %__sed -e "s|%{buildroot}||g" | \
  575. %__grep -v -e "^%{_sysconfdir}" -e ".patch$" -e "\.diff$" -e "\.orig$" | \
  576. %__grep -v "%{_includedir}" | \
  577. %__grep -v "%{_libdir}" | \
  578. %__grep -v "%{_infodir}" | \
  579. %__sed -e "s|.*\.\(cnf\|cfg\)$|%config(noreplace) &|" \
  580. -e "s|.*ls-R$|%ghost &|" \
  581. -e "s|^.*/updmap$|%config &|" \
  582. -e "s|%{texmf}*/dvips/config/\(psfonts.*\|ps2pk.*\|pdftex.*\|dvipdfm.*\|.*35\)\.map$|%ghost &|" \
  583. -e "s|%{texmf}*/web2c/.*\.\(fmt\|efmt\|log\|base\|mem\|oft\)$|%config &|" \
  584. -e "s|%{texmf}*/dvips/config/config\.\(generic\|pdf\|ps\|www\)$|%config &|" \
  585. -e "s|%{texmf}*/tex/generic/config/.*|%config &|" \
  586. -e "s|%{texmf}*/pdftex/config/pdftex.cfg$|%config &|" \
  587. -e "s|%{texmf}*/xdvi/vfontmap$|%config &|" \
  588. -e "s|%{texmf}*/xdvi/XDvi|%config &|" \
  589. -e "s|%{_mandir}/.*|&*|" \
  590. > filelist.full
  591. find %{buildroot}%{texmf} -type d | \
  592. %__sed -e "s|^%{buildroot}|%dir |" \
  593. -e "s|$|/|" >> filelist.full
  594. ## subpackages
  595. %__grep "/texmf/doc/" filelist.full > filelist.doc
  596. cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp
  597. %__mv -f filelist.tmp filelist.full
  598. %clean
  599. %__rm -rf %{buildroot}
  600. %post
  601. ## dvipdfmx
  602. ## Create our own cid-x.map
  603. ( %{exec_upddeffont} ) ||:
  604. %{exec_texhash}
  605. %{exec_updmap} --enable KanjiMap vine.map >/dev/null 2>&1
  606. # echo -n " "
  607. # echo -n "Running updmap ... " && %{exec_updmap} >/dev/null 2>&1 && echo "done."
  608. # echo -n " "
  609. # echo -n "Running fmtutil ... " && %{exec_fmtutil} && echo "done."
  610. %preun
  611. %__rm -rf %{_var}/lib/texmf/*
  612. if [ "$1" = 0 ]; then
  613. ## dvipdfmx
  614. for i in %{texmf}/fonts/truetype/*
  615. do
  616. if [ -L "$i" ]; then
  617. %__rm -f "$i"
  618. fi
  619. done
  620. fi
  621. %if %{enable_sharedlib}
  622. %post -n libkpathsea
  623. /sbin/ldconfig
  624. # /sbin/install-info %{_infodir}/kpathsea.info.* %{_infodir}/dir
  625. %preun -n libkpathsea
  626. # if [ "$1" = 0 ]; then
  627. # /sbin/install-info --delete %{_infodir}/kpathsea.info.* %{_infodir}/dir
  628. # fi
  629. %postun -n libkpathsea
  630. /sbin/ldconfig
  631. %post -n libptexenc
  632. /sbin/ldconfig
  633. %postun -n libptexenc
  634. /sbin/ldconfig
  635. %endif
  636. %triggerin -- ghostscript
  637. %__rm -f %{texmf}/fonts/cmap/ghostscript
  638. if [ -d "%{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap" ] ; then
  639. %__ln_s %{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap %{texmf}/fonts/cmap/ghostscript
  640. elif [ -d "%{_datadir}/ghostscript/Resource/CMap" ] ; then
  641. %__ln_s %{_datadir}/ghostscript/Resource/CMap %{texmf}/fonts/cmap/ghostscript
  642. fi
  643. %{exec_texhash}
  644. %files -f filelist.full
  645. %defattr(-,root,root)
  646. %attr(1777,root,root) %dir %{_var}/lib/texmf
  647. %config %{_sysconfdir}/cron.daily/texlive.cron
  648. %files doc -f filelist.doc
  649. %defattr(-,root,root)
  650. %if %{enable_sharedlib}
  651. %files -n libkpathsea
  652. %defattr(-,root,root)
  653. %{_libdir}/libkpathsea.so.*
  654. # %{_infodir}/kpathsea.info*
  655. %files -n libkpathsea-devel
  656. %defattr(-,root,root)
  657. %{_libdir}/libkpathsea.so
  658. %dir %{_includedir}/kpathsea
  659. %{_includedir}/kpathsea/*
  660. %files -n libptexenc
  661. %defattr(-,root,root)
  662. %{_libdir}/libptexenc.so.*
  663. %files -n libptexenc-devel
  664. %defattr(-,root,root)
  665. %{_libdir}/libptexenc.so
  666. %dir %{_includedir}/ptexenc
  667. %{_includedir}/ptexenc/*
  668. %endif
  669. %changelog
  670. * Sat Jan 08 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-12
  671. - supported Vine Linux 5
  672. - for vl5, changed a requirement of Japanese VF package
  673. - added Requires: texlive-jvf = 2009 (vl5)
  674. * Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 2009-11
  675. - rebuilt with poppler-0.14.2 (libpoppler has been up to so.7)
  676. * Fri Sep 24 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-10
  677. - applied some security patches from Debian
  678. - texlive-2009-CVE-2010-0827.patch
  679. - texlive-2009-CVE-2010-1440.patch
  680. - applied texlive-2009-pdftexdir-libpoppler-0.12.patch from Debian
  681. - applied texlive-2009-luatexdir-libpoppler-0.12.patch
  682. based on texlive-2009-pdftexdir-libpoppler-0.12.patch
  683. - fixed some dependencies
  684. * Mon Aug 09 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-9
  685. - added BuildArch: noarch in %%package doc
  686. - removed some comment-out sentences
  687. * Tue Jul 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-8
  688. - separeted texmf-dist to texlive-common package
  689. * Mon Jul 19 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-7
  690. - unpacked texlive-20091107-source.tar.xz
  691. - babel is available now
  692. - applied eptex-100420 and some patches:
  693. - eptex-100420-vine.patch
  694. - eptex-100420-patch1.diff
  695. * Tue Jul 13 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-6
  696. - updated ptexlive-20100711
  697. * Sat Jun 12 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-5
  698. - customized updmap.cfg to correspond installed fonts
  699. * Mon May 31 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-4
  700. - fixed insttexfont()
  701. * Mon May 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-3
  702. - added jvf of MORISAWA basic 5 fonts
  703. - added cm-super, mathdesign in fntlst
  704. * Sun May 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2
  705. - define insttexfont() in %%install
  706. - copy almost compatible tetex-3.0
  707. * Sat May 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1
  708. - ptexlive-20090322 + TeXLive 2009
  709. - added BuildRequires: openssl-devel
  710. * Sun Dec 06 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2008-0.20091206
  711. - ptexlive-20091009 + TeXLive 2008