texlive-vl.spec 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  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: 14%{?_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. ## make some fundamental texmf trees
  427. %__mkdir_p ${PREF}/texmf-config
  428. %__mkdir_p ${PREF}/texmf-var
  429. %__mkdir_p ${PREF}/texmf-local
  430. ## NOTE: need texmf-dist/tex/latex/ltxmisc url.sty
  431. ./4extract-texmf.sh %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
  432. ## post 0eptex.sh
  433. %if %with_eptex
  434. (cd ../eptex-%{eptexver}
  435. ## copying distfiles
  436. echo "[copying] eptex.src"
  437. %__mkdir -p ${TEXMF}/ptex/plain/base
  438. %__cp eptex.src ${TEXMF}/ptex/plain/base/ || exit 1
  439. echo "[copying] eptexdefs.lib"
  440. cp eptexdefs.lib $TEXMF/ptex/plain/base/ || exit 1
  441. echo "[copying] language.def"
  442. %__mkdir -p ${TEXMF}/ptex/generic/config
  443. %__cp language.def ${TEXMF}/ptex/generic/config/ || exit 1
  444. )
  445. %endif
  446. ##!! DO NOT execute 5macro.sh
  447. # ./5macro.sh clean default utf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
  448. # ./5macro.sh otf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
  449. ## execute 6babel.sh
  450. %if %with_babel
  451. # %__unzip -o -d babel %{SOURCE40}
  452. # %__unzip -o -d babel %{SOURCE41}
  453. # %__install -m0644 \
  454. # babel/texmf/tex/generic/hyphen/cathyph.tex \
  455. # babel/texmf/tex/generic/hyphen/cyhyph.tex \
  456. # ${TEXMF}/tex/generic/hyphen/ || exit 1
  457. %{!?with_firstbuild: ../eptex-%{eptexver}/6babel.sh || exit 1}
  458. ## check 6babel.sh
  459. %{!?with_firstbuild: [ -f ${PREF}/texmf/doc/japanese/sample.tex ] || exit 1}
  460. %endif
  461. # ## update texdoc
  462. # cd texdoc-%{texdocver} || exit 1
  463. # %__rm -rf ${PREF}/texmf/texdoc || exit 1
  464. # %__mkdir_p ${PREF}/texmf/texdoc
  465. # %__cp -fa texdoc.cnf ${PREF}/texmf/texdoc/ || exit 1
  466. # %__rm -rf ${PREF}/texmf/scripts/texdoc || exit 1
  467. # %__rm -f script/*.orig || exit 1
  468. # %__cp -ra script ${PREF}/texmf/scripts/texdoc || exit 1
  469. # %__chmod 755 ${PREF}/texmf/scripts/texdoc/* || exit 1
  470. # %__rm -rf ${PREF}/texmf/doc/texdoc || exit 1
  471. # %__cp -ra doc ${PREF}/texmf/doc/texdoc || exit 1
  472. # %__cp -a News Todo ${PREF}/texmf/doc/texdoc/ || exit 1
  473. # cd -
  474. # # TODO:
  475. # # %{!?with_firstbuild: \
  476. # # cd ${PREF}/texmf/doc/texdoc && %__make || exit 1}
  477. ## install
  478. %__mkdir_p %{buildroot}%{_prefix}
  479. (cd ${PREF}
  480. %__rm -f bin/man
  481. %__cp -r bin %{buildroot}%{_bindir}
  482. %__cp -r lib %{buildroot}%{_libdir}
  483. %__cp -r include %{buildroot}%{_includedir}
  484. ##NOTE: use man, info files from texlive-sources
  485. %__rm -rf texmf/doc/info
  486. %__rm -rf texmf/doc/man
  487. %__mkdir_p %{build_tex_destdir}
  488. ## NOTE: texmf-dist is contained in texlive-common package
  489. ##%__cp -r texmf{,-dist,-config,-var,-local} %{build_tex_destdir}/ || exit 1
  490. %__cp -r texmf{,-config,-var,-local} %{build_tex_destdir}/ || exit 1
  491. )
  492. %__mkdir_p %{build_texmf}/fonts/truetype
  493. %__mkdir_p %{build_texmf}/fonts/opentype
  494. ## dvipdfmx: our map file
  495. %__mkdir_p %{build_texmf}/fonts/map/dvipdfmx
  496. touch %{build_texmf}/fonts/map/dvipdfmx/vine.map
  497. ## delete useless files (conflict with jvf package)
  498. # rm -rf %{build_texmf}/fonts/vf/ptex
  499. # rm -rf %{build_texmf}/fonts/tfm/ptex/*[a-zA-Z].tfm
  500. %__rm %{build_texmf}/fonts/vf/ptex/{min,tmin,goth,tgoth}{5,6,7,8,9,10}.vf || exit 1
  501. ## install jtygm.sty
  502. %__install -m0644 %{SOURCE102} %{build_texmf}/ptex/platex/base/ || exit 1
  503. ## morisawa map files remaped PS Kanji (CIDFont) Name
  504. %__install -m 0644 %{SOURCE103} %{SOURCE104} \
  505. %{buildroot}%{texmf}/fonts/map/dvipdfm/ptexlive/
  506. ## remove asymptote directries, which provides asymptote package
  507. find %{buildroot} -regex ".*asymptote.*" | xargs %__rm -rf
  508. # find %{buildroot} -name "Makefile" | xargs %__rm -f
  509. # ## remove xindy
  510. # find %{buildroot} -regex ".*xindy.*" | xargs %__rm -rf
  511. # ## remove tex4ht
  512. # find %{buildroot} -regex ".*tex4ht.*" | xargs %__rm -rf
  513. ## relocate binaries to %{_bindir} and fix relative symlinks
  514. pushd %{buildroot}%{_bindir}
  515. for i in `find . -type l`; do
  516. if [ "`readlink $i | grep '..' | wc -l`" == "1" ]; then
  517. l=`readlink $i | sed s,../,../share/,`
  518. %__ln_s -f $l $i
  519. fi
  520. done
  521. popd
  522. # ## compress pdf files in texmf/doc
  523. # find %{build_tex_destdir}/texmf/doc -name "*.pdf" -exec xz {} \;
  524. ## compress info files
  525. %__rm -f %{buildroot}%{_infodir}/dir
  526. %__gzip -9nf %{buildroot}%{_infodir}/*info* ||:
  527. ## desktop things
  528. %__mkdir_p %{buildroot}%{_datadir}/applications
  529. %__install -c %{SOURCE10} %{buildroot}%{_datadir}/applications/pxdvi.desktop
  530. # for created fonts
  531. %__mkdir_p %{buildroot}%{vartexfonts}
  532. %__mkdir_p %{buildroot}%{_sysconfdir}/cron.daily
  533. %__install -m 755 %{SOURCE100} %{buildroot}%{_sysconfdir}/cron.daily/
  534. ## set executable bit for the library
  535. %if %{enable_sharedlib}
  536. %__chmod a+x %{buildroot}%{_libdir}/libkpathsea.so.*.*
  537. %__chmod a+x %{buildroot}%{_libdir}/libptexenc.so.*.*
  538. %endif
  539. ## remove unpackaging files
  540. find %{buildroot} | %__grep -e "\\.\(la\|a\)$" | xargs %__rm -f
  541. find %{buildroot} | %__grep -e "\\.\(diff\|patch\)$" | xargs %__rm -f
  542. ### Files list
  543. find %{buildroot} -type f -or -type l | \
  544. %__sed -e "s|%{buildroot}||g" | \
  545. %__grep -v -e "^%{_sysconfdir}" -e ".patch$" -e "\.diff$" -e "\.orig$" | \
  546. %__grep -v "%{_includedir}" | \
  547. %__grep -v "%{_libdir}" | \
  548. %__grep -v "%{_infodir}" | \
  549. %__sed -e "s|.*\.\(cnf\|cfg\)$|%config(noreplace) &|" \
  550. -e "s|.*ls-R$|%ghost &|" \
  551. -e "s|^.*/updmap$|%config &|" \
  552. -e "s|%{texmf}*/dvips/config/\(psfonts.*\|ps2pk.*\|pdftex.*\|dvipdfm.*\|.*35\)\.map$|%ghost &|" \
  553. -e "s|%{texmf}*/web2c/.*\.\(fmt\|efmt\|log\|base\|mem\|oft\)$|%config &|" \
  554. -e "s|%{texmf}*/dvips/config/config\.\(generic\|pdf\|ps\|www\)$|%config &|" \
  555. -e "s|%{texmf}*/tex/generic/config/.*|%config &|" \
  556. -e "s|%{texmf}*/pdftex/config/pdftex.cfg$|%config &|" \
  557. -e "s|%{texmf}*/xdvi/vfontmap$|%config &|" \
  558. -e "s|%{texmf}*/xdvi/XDvi|%config &|" \
  559. -e "s|%{_mandir}/.*|&*|" \
  560. > filelist.full
  561. find %{buildroot}%{texmf} -type d | \
  562. %__sed -e "s|^%{buildroot}|%dir |" \
  563. -e "s|$|/|" >> filelist.full
  564. ## subpackages
  565. %__grep "/texmf/doc/" filelist.full > filelist.doc
  566. cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp
  567. %__mv -f filelist.tmp filelist.full
  568. %clean
  569. %__rm -rf %{buildroot}
  570. %post
  571. ## dvipdfmx
  572. ## Create our own cid-x.map
  573. ( %{exec_upddeffont} ) ||:
  574. %{exec_texhash}
  575. %{exec_updmap} --enable KanjiMap vine.map >/dev/null 2>&1
  576. # echo -n " "
  577. # echo -n "Running updmap ... " && %{exec_updmap} >/dev/null 2>&1 && echo "done."
  578. # echo -n " "
  579. # echo -n "Running fmtutil ... " && %{exec_fmtutil} && echo "done."
  580. %preun
  581. %__rm -rf %{_var}/lib/texmf/*
  582. if [ "$1" = 0 ]; then
  583. ## dvipdfmx
  584. for i in %{texmf}/fonts/truetype/*
  585. do
  586. if [ -L "$i" ]; then
  587. %__rm -f "$i"
  588. fi
  589. done
  590. fi
  591. %if %{enable_sharedlib}
  592. %post -n libkpathsea
  593. /sbin/ldconfig
  594. # /sbin/install-info %{_infodir}/kpathsea.info.* %{_infodir}/dir
  595. %preun -n libkpathsea
  596. # if [ "$1" = 0 ]; then
  597. # /sbin/install-info --delete %{_infodir}/kpathsea.info.* %{_infodir}/dir
  598. # fi
  599. %postun -n libkpathsea
  600. /sbin/ldconfig
  601. %post -n libptexenc
  602. /sbin/ldconfig
  603. %postun -n libptexenc
  604. /sbin/ldconfig
  605. %endif
  606. %triggerin -- ghostscript
  607. %__rm -f %{texmf}/fonts/cmap/ghostscript
  608. if [ -d "%{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap" ] ; then
  609. %__ln_s %{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap %{texmf}/fonts/cmap/ghostscript
  610. elif [ -d "%{_datadir}/ghostscript/Resource/CMap" ] ; then
  611. %__ln_s %{_datadir}/ghostscript/Resource/CMap %{texmf}/fonts/cmap/ghostscript
  612. fi
  613. %{exec_texhash}
  614. %files -f filelist.full
  615. %defattr(-,root,root)
  616. %attr(1777,root,root) %dir %{_var}/lib/texmf
  617. %config %{_sysconfdir}/cron.daily/texlive.cron
  618. %files doc -f filelist.doc
  619. %defattr(-,root,root)
  620. %if %{enable_sharedlib}
  621. %files -n libkpathsea
  622. %defattr(-,root,root)
  623. %{_libdir}/libkpathsea.so.*
  624. # %{_infodir}/kpathsea.info*
  625. %files -n libkpathsea-devel
  626. %defattr(-,root,root)
  627. %{_libdir}/libkpathsea.so
  628. %dir %{_includedir}/kpathsea
  629. %{_includedir}/kpathsea/*
  630. %files -n libptexenc
  631. %defattr(-,root,root)
  632. %{_libdir}/libptexenc.so.*
  633. %files -n libptexenc-devel
  634. %defattr(-,root,root)
  635. %{_libdir}/libptexenc.so
  636. %dir %{_includedir}/ptexenc
  637. %{_includedir}/ptexenc/*
  638. %endif
  639. %changelog
  640. * Sun Mar 27 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-14
  641. - dropped Requires: texlive-macros
  642. * Sat Jan 15 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-13
  643. - updated ptexlive-20100711-pxdvik-vine.patch
  644. and added texlive-20091107-xdvik-vine.patch
  645. - fixed to adjust X resources in texmf/xdvi/XDvi for (p)xdvi
  646. * Sat Jan 08 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-12
  647. - supported Vine Linux 5
  648. - for vl5, changed a requirement of Japanese VF package
  649. - added Requires: texlive-jvf = 2009 (vl5)
  650. - dropped dependencies of Provides:/Obsoletes: tags
  651. - merged these dependencies in texlive-common-vl.spec
  652. * Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 2009-11
  653. - rebuilt with poppler-0.14.2 (libpoppler has been up to so.7)
  654. * Fri Sep 24 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-10
  655. - applied some security patches from Debian
  656. - texlive-2009-CVE-2010-0827.patch
  657. - texlive-2009-CVE-2010-1440.patch
  658. - applied texlive-2009-pdftexdir-libpoppler-0.12.patch from Debian
  659. - applied texlive-2009-luatexdir-libpoppler-0.12.patch
  660. based on texlive-2009-pdftexdir-libpoppler-0.12.patch
  661. - fixed some dependencies
  662. * Mon Aug 09 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-9
  663. - added BuildArch: noarch in %%package doc
  664. - removed some comment-out sentences
  665. * Tue Jul 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-8
  666. - separeted texmf-dist to texlive-common package
  667. * Mon Jul 19 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-7
  668. - unpacked texlive-20091107-source.tar.xz
  669. - babel is available now
  670. - applied eptex-100420 and some patches:
  671. - eptex-100420-vine.patch
  672. - eptex-100420-patch1.diff
  673. * Tue Jul 13 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-6
  674. - updated ptexlive-20100711
  675. * Sat Jun 12 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-5
  676. - customized updmap.cfg to correspond installed fonts
  677. * Mon May 31 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-4
  678. - fixed insttexfont()
  679. * Mon May 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-3
  680. - added jvf of MORISAWA basic 5 fonts
  681. - added cm-super, mathdesign in fntlst
  682. * Sun May 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2
  683. - define insttexfont() in %%install
  684. - copy almost compatible tetex-3.0
  685. * Sat May 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1
  686. - ptexlive-20090322 + TeXLive 2009
  687. - added BuildRequires: openssl-devel
  688. * Sun Dec 06 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2008-0.20091206
  689. - ptexlive-20091009 + TeXLive 2008