texlive-vl.spec 24 KB

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