texlive-vl.spec 25 KB

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