source: projects/specs/trunk/t/texlive/texlive-vl.spec @ 3944

Revision 3944, 31.8 KB checked in by munepi, 13 years ago (diff)

updated texlive and its related packages: ready for Vine Linux 6 release

Line 
1## -*- coding: utf-8-unix -*-
2%bcond_with firstbuild
3
4%define enable_sharedlib 1
5%if %{?_dist_release} == "vl5"
6%define enable_sharedlib 0
7%endif
8
9%define with_babel 1
10
11%define ptexlivever     20100711
12%define texlivesrcver   20091107
13%define texlivever      20091107
14
15## we provides e-pTeX and upTeX
16%define with_uptex      0
17%define with_eptex      1
18%define uptexver        0.30
19%define uptex_fontver   0.30
20%define eptexver        100420
21
22%define tex_destdir     %{_datadir}
23%define texmf           %{tex_destdir}/texmf
24%define texlive_src     %{tex_destdir}/texlive-sources
25%define build_tex_destdir       %{buildroot}%{tex_destdir}
26%define build_texmf     %{buildroot}%{texmf}
27
28%define exec_mktexlsr  [ -x %{_bindir}/texconfig-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/texconfig-sys rehash
29%define exec_texhash  [ -x %{_bindir}/texhash ] && PATH=%{_bindir}:$PATH %{_bindir}/texhash
30%define exec_updmap   [ -x %{_bindir}/updmap-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/updmap-sys --nostop
31%define exec_fmtutil  [ -x %{_bindir}/fmtutil-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/fmtutil-sys --all >/dev/null
32%define exec_upddeffont    [ -x %{_sbindir}/update-defaultfont ] && %{_sbindir}/update-defaultfont 2> /dev/null
33%define vartexfonts %{_var}/lib/texmf/fonts
34
35Autoreq: 0
36
37Summary: The TeX text formatting system
38Summary(ja): TeX 文書整形システム
39Name: texlive
40Version: 2009
41Release: 19%{?_dist_release}
42License: distributable
43Group: Applications/Publishing
44## The TeX Live is located on http://www.tug.org/texlive/
45## e-pTeX: http://eptex.sourceforge.jp/
46## upTeX: http://homepage3.nifty.com/ttk/comp/tex/uptex.html
47URL: http://tutimura.ath.cx/ptexlive/
48
49## original TeX Live sources
50Source: http://tutimura.ath.cx/~nob/tex/ptexlive/ptexlive-%{ptexlivever}.tar.gz
51
52##Source1: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivesrcver}-source.tar.xz
53##Source2: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivever}-texmf.tar.xz
54##Source3: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivever}-extra.tar.xz
55##Source4: ftp://tug.org/historic/systems/texlive/2009/%{name}-%{texlivever}-bin.tar.xz
56##Source5: ftp://tug.org/historic/systems/texlive/2009/tlnet/install-tl-unx.tar.gz
57
58## pxdvi
59Source10: pxdvi.desktop
60
61## dvipdfmx
62#Source20:
63
64## texdoc
65## http://github.com/mpg/texdoc
66## Downloaded mpg-texdoc-0.72-0-gfdb7657.tar.gz
67## Renamed this archive:
68# $ tar zxf mpg-texdoc-0.72-0-gfdb7657.tar.gz
69# $ mv mpg-texdoc-b66e1e3 texdoc-0.72
70# $ tar zcf texdoc-0.72.tar.gz texdoc-0.72
71#Source90: texdoc-%{texdocver}.tar.gz
72
73## Japanese ptex
74
75
76# ## Babel
77# ## See [texqa:37398] http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/37398.html
78# Source40: http://www.ctan.org/tex-archive/obsolete/systems/win32/fptex/0.7/collection/tex-langother.zip
79# Source41: http://www.ctan.org/tex-archive/obsolete/systems/win32/fptex/0.7/package/texlive-base.zip
80
81
82## e-pTeX, upTeX
83Source50: http://homepage3.nifty.com/ttk/comp/tex/uptex-%{uptexver}.tar.gz
84Source51: http://homepage3.nifty.com/ttk/comp/tex/uptex_font-%{uptex_fontver}.tar.gz
85Source52: http://sourceforge.jp/projects/eptex/downloads/43841/eptex-%{eptexver}.tar.bz2
86
87## etc...
88Source100: texlive.cron
89Source101: dvi-to-ps.fpi
90Source102: http://auemath.aichi-edu.ac.jp/~khotta/ghost/disk1/jtygm.sty
91Source103: ps-morisawa.map
92Source104: ps-morisawa-noEmbed.map
93
94
95# ## do not provide any perl deps (#516350)
96# %define __perl_provides       %{nil}
97
98
99######
100# TeX patches
101######
102
103## vine
104Patch0:         ptexlive-%{ptexlivever}-vine.patch
105Patch1:         texlive-%{texlivesrcver}-set-selfautodir.patch
106##Patch1:       texlive-2009-texmfcnf-selfautodir-vine.patch
107Patch2:         texlive-%{texlivesrcver}-texmfcnf-vine.patch
108
109## (p)xdvik
110Patch10:        ptexlive-%{ptexlivever}-pxdvik-vine.patch
111Patch11:        texlive-%{texlivesrcver}-xdvik-vine.patch
112
113## dvipdfmx
114Patch20:        ptexlive-%{ptexlivever}-dvipdfmx-vine.patch
115
116## e-pTeX + upTeX
117Patch50:        eptex-100420-vine.patch
118Patch51:        http://sourceforge.jp/projects/eptex/wiki/FrontPage/attach/eptex-100420-patch1.diff
119
120## texdoc
121#Patch90:       texdoc-0.72-support-zipped-vine.patch
122
123## others
124## libpoppler-0.12 from texlive-bin_2009-7.diff.gz
125Patch100:       texlive-2009-pdftexdir-libpoppler-0.12.patch
126Patch101:       texlive-2009-luatexdir-libpoppler-0.12.patch
127
128## security
129## from Debian
130#Patch1000:     texlive-2009-CVE-2010-0739.patch
131Patch1001:      texlive-2009-CVE-2010-0827.patch
132## this overrides the incomplete fix for CVE-2010-0793
133Patch1002:      texlive-2009-CVE-2010-1440.patch
134
135
136Requires:    coreutils
137Requires:    ed mktemp
138Requires:    tmpwatch
139Requires:    zlib
140Requires:    libpng
141Requires:    gd
142Requires:    ncurses
143Requires:    libjpeg
144Requires:    t1lib
145Requires:    freetype2
146Requires:    openMotif
147Requires:    poppler
148Requires:    openssl
149Requires:    libpaper
150Requires:    fontconfig
151Requires:    perl-Tk perl-Tk-TableMatrix
152Requires:    nkf
153Requires:    ghostscript >= 8.63
154%if %{?_dist_release} == "vl6"
155Requires:    libkpathsea = %{version}-%{release}
156Requires:    libptexenc = %{version}-%{release}
157%endif
158#%{!?with_firstbuild:Requires: texlive-common = %{version}}
159%if %{?_dist_release} == "vl6"
160%{!?with_firstbuild:Requires: jvf >= 2.0-5}
161%endif
162%if %{?_dist_release} == "vl5"
163%{!?with_firstbuild:Requires: texlive-jvf >= 2.0-5}
164%endif
165Requires:    fontconfig >= 2.6.0-2
166Requires(post,postun): fontconfig >= 2.6.0-2
167Requires(post): ed mktemp
168Requires(post): vutils >= 2.0.5
169%{!?with_firstbuild:BuildRequires: texlive-common = %{version}}
170BuildRequires: texlive-sources = %{version}
171BuildRequires: xz
172BuildRequires: unzip
173BuildRequires: bison flex
174BuildRequires: zlib-devel
175BuildRequires: libpng-devel
176BuildRequires: gd-devel
177BuildRequires: ncurses-devel
178BuildRequires: libjpeg-devel
179BuildRequires: t1lib-devel
180BuildRequires: XOrg-devel
181BuildRequires: freetype2-devel >= 2.1.10
182BuildRequires: autoconf >= 2.63
183BuildRequires: openMotif-devel
184BuildRequires: poppler-devel
185BuildRequires: openssl-devel
186BuildRequires: libpaper-devel
187BuildRequires: fontconfig-devel
188BuildRequires: nkf
189#BuildRequires: t1utils
190
191Buildroot:    %{_tmppath}/%{name}-%{version}-root
192
193Vendor:       Project Vine
194Distribution: Vine Linux
195Packager:     munepi
196
197
198%description
199The TeX Live software distribution offers a complete TeX system for a
200variety of Unix, Macintosh, Windows and other platforms. It
201encompasses programs for editing, typesetting, previewing and printing
202of TeX documents in many different languages, and a large collection
203of TeX macros and font libraries.
204
205The distribution includes extensive general documentation about TeX,
206as well as the documentation for the included software packages.
207
208This package provides a Japanese TeX environment
209based on ptexlive-%{ptexlivever}.
210
211
212%description -l ja
213TeX Live ソフトウェアディストリビューションは、
214さまざまな Unix, Macintosh, Windows、および
215他のプラットホームに対して完全な TeX システムを提供します。
216多くの異なった言語を含む TeX ドキュメントの
217編集、組版、閲覧、印刷するためのプログラム、
218そして、TeX マクロやフォントライブラリの大きなコレクションを
219同梱しています。
220
221このディストリビューションは
222同梱しているソフトウェアパッケージのためのドキュメントばかりでなく、
223TeX に関するたくさんの一般的なドキュメントを含んでいます。
224
225このパッケージは ptexlive-%{ptexlivever} を元にした
226日本語 TeX 環境を提供します。
227
228
229%package doc
230Summary: TeX Live: Documentation files of %{name}
231Group: Applications/Publishing
232Requires: %{name} = %{version}-%{release}
233%if %{?_dist_release} != "vl5"
234BuildArch: noarch
235%endif
236
237%description doc
238This package contains documentation files of %{name}.
239
240%if %{enable_sharedlib}
241%package -n libkpathsea
242Summary: path search library for the TeX Live
243Summary(ja): TeX Live 用パス検索ライブラリ
244Group: System Environment/Libraries
245
246%description -n libkpathsea
247This package includes runtime part of the Kpathsea library.
248
249
250%package -n libkpathsea-devel
251Summary: path search libary and header files for the TeX Live
252Summary(ja): TeX Live 用パス検索ライブラリとヘッダファイル
253Group: Development/Libraries
254Requires: libkpathsea = %{version}-%{release}
255
256%description -n libkpathsea-devel
257This package includes static library and header files of the Kpathsea library.
258
259
260%package -n libptexenc
261Summary: Kanji code convert library for Japanese pTeX
262Summary(ja): 日本語 pTeX 用漢字コード変換ライブラリ
263Group: System Environment/Libraries
264Requires: libkpathsea = %{version}-%{release}
265
266%description -n libptexenc
267This package includes runtime part of the ptexenc library.
268
269
270%package -n libptexenc-devel
271Summary: Kanji code convert library and header files for Japanese pTeX
272Summary(ja): 日本語 pTeX 用漢字コード変換ライブラリとヘッダファイル
273Group: Development/Libraries
274Requires: libptexenc = %{version}-%{release}
275
276%description -n libptexenc-devel
277This package includes header files of the ptexenc library.
278%endif
279
280
281%prep
282[ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot}
283
284#% setup -q -n ptexlive-%{ptexlivever} -a 90
285%setup -q -n ptexlive-%{ptexlivever}
286
287## extract texlive-source
288%__tar Jxf %{texlive_src}/source/%{name}-%{texlivesrcver}-source.tar.xz || exit 1
289
290## move texlive-source to build/
291%__mkdir_p build && \
292    %__mv %{name}-%{texlivesrcver}-source build/ || exit 1
293
294## apply ptexlive
295%patch0 -p1 -b .orig
296
297## fix $SELFAUTODIR to /usr/share
298%patch1 -p1 -b .orig
299
300%__cat <<EOF > ptexlive.cfg
301#KANJI_CODE=EUC
302KANJI_CODE=UTF8
303
304TEXLIVE_VERSION=2009
305ISO_DIR=%{texlive_src}
306TEXLIVE_DIR=%{texlive_src}
307##SRC_DIR=%{_sourcedir}
308SRC_TAR=%{SOURCE0}
309
310##PREFIX=%{tex_destdir}
311PREFIX=$(pwd)/Vine
312TMP_PREFIX=$(pwd)/build
313TEXSRC_EXTRACTED=$(pwd)/build/%{name}-%{texlivesrcver}-source
314##SRC_TAR=%{SOURCE1}
315##TEXMFDIST=$(pwd)/build/%{name}-%{texlivesrcver}-source/inst/texmf-dist
316TEXMFDIST=%{texlive_src}/texmf-dist
317
318XDVI=echo
319PSPDF=echo
320
321conf_option --enable-luatex
322conf_option --enable-xetex
323conf_option --enable-xdv2pdf
324conf_option --enable-xdvipdfmx
325
326conf_option --with-xdvi-x-toolkit=motif
327# conf_option --without-x
328# conf_option --disable-xdvik
329# conf_option --disable-oxdvik
330# conf_option --disable-pxdvik
331
332conf_option --with-system-ncurses
333conf_option --with-system-zlib
334conf_option --with-system-pnglib
335conf_option --with-system-t1lib
336conf_option --with-system-xpdf
337conf_option --with-system-freetype
338conf_option --with-system-freetype2
339conf_option --with-freetype2-include=`freetype-config --cflags | sed -e 's/-I//' -e 's/ .*//'`
340conf_option --with-system-gd
341EOF
342
343## For vl5, libkpathsea and libptexenc libraries are static link
344%if %{enable_sharedlib}
345%__cat <<EOF >> ptexlive.cfg
346conf_option --enable-shared
347EOF
348%endif
349
350%__cat <<EOF >> ptexlive.cfg
351conf_option --enable-kanji-iconv
352
353conf_option --disable-multiplatform
354make_option %{?_smp_mflags}
355EOF
356
357## exec 2extract-src.sh
358%__make x
359
360## texmf.cnf for Vine Linux
361%patch2 -p1 -b .orig
362
363## (p)xdvik for Vine Linux
364%patch10 -p1 -b .orig
365%patch11 -p1 -b .orig
366
367## dvipdfmx for Vine Linux
368%patch20 -p1 -b .orig
369
370## eptex
371(cd ..
372%__tar jxf %{SOURCE52}
373cd eptex-%{eptexver}
374%patch50 -p1 -b .orig
375%patch51 -p1 -b .orig
376## apply eptex: exec almost 0eptex.sh
377%if %with_eptex
378./0eptex.sh
379%endif
380)
381
382## texdoc
383#%patch90 -p0 -b .orig
384
385## libpoppler-0.12
386%if %{?_dist_release} != "vl5"
387(cd build/%{name}-%{texlivesrcver}-source
388%patch100 -p1 -b .xpdf
389%patch101 -p1 -b .xpdf
390)
391%endif
392
393## apply security patches
394(cd build/%{name}-%{texlivesrcver}-source
395#%patch1000
396%patch1001 -p1 -b .security
397%patch1002 -p1 -b .security
398)
399
400
401%build
402## NOTE:
403## In this setion,
404## execute almostly 3make-install.sh
405set -x
406unset TEXINPUTS || :
407unset HOME || :
408
409. ./common.sh
410
411export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LANG=C
412##%__make c
413
414PREF=${TEXSRC_EXTRACTED}/inst
415
416%__mkdir_p ${PREF}/texmf
417%__mkdir_p ${PREF}/../Work
418pushd ${PREF}/../Work
419../configure --host=%{_host} --build=%{_build} \
420    --prefix=${PREF} \
421    --datadir=${PREF} \
422    \
423    --disable-native-texlive-build \
424    --enable-multiplatform \
425    --disable-omfonts \
426    --enable-compiler-warnings=max \
427    --without-cxx-runtime-hack \
428    --enable-kanji=$KANJI_CODE \
429    --with-ptexenc=$KANJI_CODE \
430    --disable-all-pkgs \
431    --enable-web2c \
432    --disable-luatex \
433    --disable-xetex \
434    --enable-mf \
435    --enable-mf-nowin \
436    --enable-mp \
437    --enable-web-progs \
438    --enable-dvipdfmx \
439    --enable-dvipsk \
440    --enable-pdvipsk \
441    --enable-gsftopk \
442    --enable-makeindexk \
443    --enable-makejvf \
444    --enable-mendexk \
445    --enable-ps2pkm \
446    --enable-xdvik \
447    --enable-pxdvik \
448    --enable-tetex \
449    --enable-texlive \
450    $CONF_OPTION
451
452
453(cd ..
454## Avoid pollution from internal libraries.
455%__rm -rf ./libs/{expat,freetype,freetype2,gd,jpeg,libpng,libttf,ncurses,type1,t1lib,unzip,xpdf,zlib}
456
457## XXX Hacks to avoid accidental version clashs with system libraries.
458hack_libs=(
459    zlib
460    libpng
461    t1lib
462    freetype
463    freetype2
464    gd
465    xpdf
466)
467for i in  "${hack_libs[@]}"; do
468    %__mkdir_p ./libs/${i}
469    touch ./libs/${i}/configure
470done
471)
472
473%__make world $MAKE_OPTION %{?_smp_mflags}
474popd
475
476
477%install
478## prepare %%install session
479[ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot}
480
481set -x
482unset TEXINPUTS || :
483unset HOME || :
484
485. ./common.sh
486
487PREF=${TEXSRC_EXTRACTED}/inst
488
489pushd ${PREF}/../Work
490## the following two lines are useful for
491## "rpmbuild -ba --short-circuit  ~/rpm/SPECS/texlive-vl.spec"
492%__rm -rf ${PREF}
493%__make world $MAKE_OPTION
494popd
495
496## execute almostly 4extract-texmf.sh
497%__mv ${PREF}/texmf-dist ${PREF}/texmf-dist.install  || exit # never use
498%__mv ${PREF}/texmf ${PREF}/texmf.install            || exit
499%__cp -r %{texlive_src}/texmf ${PREF}/          || exit
500%__cp -rf ${PREF}/texmf.install/* ${PREF}/texmf/     || exit
501
502## copy almost compatible TeX system of teTeX-3.0
503## NOTE: The size of texmf-dist is about 2GB below:
504# 890M  doc
505# 660M  fonts
506# 103M  source
507#
508# 68M   tex/latex
509# 46M   tex/generic
510# 27M   tex/context
511##%__ln_s -f %{texlive_src}/texmf-dist ${PREF}/
512%__mkdir_p ${PREF}/texmf-dist
513##!! [FAKE] copy all directries except doc, fonts, source, tex4ht in texmf-dist
514(cd %{texlive_src}/texmf-dist
515    %__cp -r README metapost scripts bibtex dvips makeindex mft \
516             tlpkg context metafont tex omega vtex \
517        ${PREF}/texmf-dist/
518)
519## copy some fonts (almost tetex + tetex-extra)
520## NOTE: this part is in texlive-common since texlive-8vl6
521
522#### customize updmap.cfg for each font's map files
523%{!?with_firstbuild: \
524    %__sed -i -e "s,^\(Map\|MixedMap\),#! \1,g" ${PREF}/texmf/web2c/updmap.cfg}
525%{!?with_firstbuild: \
526    %__sed -i -e "s,Map[[:blank:]]*euler.map,Map euler.map," ${PREF}/texmf/web2c/updmap.cfg}
527
528## make some fundamental texmf trees
529%__mkdir_p ${PREF}/texmf-config
530%__mkdir_p ${PREF}/texmf-var
531%__mkdir_p ${PREF}/texmf-local
532
533## NOTE: need texmf-dist/tex/latex/ltxmisc url.sty
534./4extract-texmf.sh %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
535
536## post 0eptex.sh
537%if %with_eptex
538(cd ../eptex-%{eptexver}
539## copying distfiles
540echo "[copying]    eptex.src"
541%__mkdir -p ${TEXMF}/ptex/plain/base
542%__cp eptex.src ${TEXMF}/ptex/plain/base/ || exit 1
543echo "[copying]    eptexdefs.lib"
544cp eptexdefs.lib $TEXMF/ptex/plain/base/ || exit 1
545echo "[copying]    language.def"
546%__mkdir -p ${TEXMF}/ptex/generic/config
547%__cp language.def ${TEXMF}/ptex/generic/config/ || exit 1
548)
549%endif
550
551##!! DO NOT execute 5macro.sh
552# ./5macro.sh clean default utf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
553# ./5macro.sh otf %{?with_firstbuild: || :}%{!?with_firstbuild: || exit 1}
554
555## execute 6babel.sh
556%if %with_babel
557# %__unzip -o -d babel %{SOURCE40}
558# %__unzip -o -d babel %{SOURCE41}
559# %__install -m0644 \
560#       babel/texmf/tex/generic/hyphen/cathyph.tex \
561#       babel/texmf/tex/generic/hyphen/cyhyph.tex \
562#     ${TEXMF}/tex/generic/hyphen/ || exit 1
563%{!?with_firstbuild: ../eptex-%{eptexver}/6babel.sh || exit 1}
564## check 6babel.sh
565%{!?with_firstbuild: [ -f ${PREF}/texmf/doc/japanese/sample.tex ] || exit 1}
566%endif
567
568# ## update texdoc
569# cd texdoc-%{texdocver} || exit 1
570# %__rm -rf ${PREF}/texmf/texdoc || exit 1
571# %__mkdir_p ${PREF}/texmf/texdoc
572# %__cp -fa texdoc.cnf ${PREF}/texmf/texdoc/ || exit 1
573
574# %__rm -rf ${PREF}/texmf/scripts/texdoc || exit 1
575# %__rm -f script/*.orig || exit 1
576# %__cp -ra script ${PREF}/texmf/scripts/texdoc || exit 1
577# %__chmod 755 ${PREF}/texmf/scripts/texdoc/* || exit 1
578
579# %__rm -rf ${PREF}/texmf/doc/texdoc || exit 1
580# %__cp -ra doc ${PREF}/texmf/doc/texdoc || exit 1
581# %__cp -a News Todo ${PREF}/texmf/doc/texdoc/ || exit 1
582# cd -
583# # TODO:
584# # %{!?with_firstbuild: \
585# #     cd ${PREF}/texmf/doc/texdoc && %__make || exit 1}
586
587
588## install
589%__mkdir_p %{buildroot}%{_prefix}
590(cd ${PREF}
591%__rm -f bin/man
592%__cp -r bin %{buildroot}%{_bindir}
593%__cp -r lib %{buildroot}%{_libdir}
594%__cp -r include %{buildroot}%{_includedir}
595
596##NOTE: use man, info files from texlive-sources
597%__rm -rf texmf/doc/info
598%__rm -rf texmf/doc/man
599
600%__mkdir_p %{build_tex_destdir}
601## NOTE: texmf-dist is contained in texlive-common package
602##%__cp -r texmf{,-dist,-config,-var,-local} %{build_tex_destdir}/ || exit 1
603%__cp -r texmf{,-config,-var,-local} %{build_tex_destdir}/ || exit 1
604)
605
606%__mkdir_p %{build_texmf}/fonts/truetype
607%__mkdir_p %{build_texmf}/fonts/opentype
608
609## dvipdfmx: our map file
610%__mkdir_p %{build_texmf}/fonts/map/dvipdfmx
611touch %{build_texmf}/fonts/map/dvipdfmx/vine.map
612
613## delete useless files (conflict with jvf package)
614# rm -rf %{build_texmf}/fonts/vf/ptex
615# rm -rf %{build_texmf}/fonts/tfm/ptex/*[a-zA-Z].tfm
616%__rm %{build_texmf}/fonts/vf/ptex/{min,tmin,goth,tgoth}{5,6,7,8,9,10}.vf || exit 1
617
618## install jtygm.sty
619%__install -m0644 %{SOURCE102} %{build_texmf}/ptex/platex/base/ || exit 1
620
621## morisawa map files remaped PS Kanji (CIDFont) Name
622%__install -m 0644 %{SOURCE103} %{SOURCE104} \
623    %{buildroot}%{texmf}/fonts/map/dvipdfm/ptexlive/
624
625
626## remove asymptote directries, which provides asymptote package
627find %{buildroot} -regex ".*asymptote.*" | xargs %__rm -rf
628# find %{buildroot} -name "Makefile" | xargs %__rm -f
629
630# ## remove xindy
631# find %{buildroot} -regex ".*xindy.*" | xargs %__rm -rf
632
633# ## remove tex4ht
634# find %{buildroot} -regex ".*tex4ht.*" | xargs %__rm -rf
635
636## relocate binaries to %{_bindir} and fix relative symlinks
637pushd %{buildroot}%{_bindir}
638for i in `find . -type l`; do
639if [ "`readlink $i | grep '..' | wc -l`" == "1" ]; then
640l=`readlink $i | sed s,../,../share/,`
641%__ln_s -f $l $i
642fi
643done
644popd
645## if the real file of a symlink on /usr/bin is contained
646## in texlive-collection-*, remove its symlink
647del_symlnks=(
648texlive-collection-binextra,/usr/bin/dviasm,/usr/share/texmf-dist/scripts/dviasm/dviasm.py
649texlive-collection-binextra,/usr/bin/findhyph,/usr/share/texmf-dist/scripts/findhyph/findhyph
650texlive-collection-binextra,/usr/bin/fragmaster,/usr/share/texmf-dist/scripts/fragmaster/fragmaster.pl
651texlive-collection-binextra,/usr/bin/latex2man,/usr/share/texmf-dist/scripts/latex2man/latex2man
652texlive-collection-binextra,/usr/bin/latexmk,/usr/share/texmf-dist/scripts/latexmk/latexmk.pl
653texlive-collection-binextra,/usr/bin/listings-ext.sh,/usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh
654texlive-collection-binextra,/usr/bin/mkjobtexmf,/usr/share/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl
655texlive-collection-binextra,/usr/bin/pdfcrop,/usr/share/texmf-dist/scripts/pdfcrop/pdfcrop.pl
656texlive-collection-binextra,/usr/bin/pkfix,/usr/share/texmf-dist/scripts/pkfix/pkfix.pl
657texlive-collection-binextra,/usr/bin/pkfix-helper,/usr/share/texmf-dist/scripts/pkfix-helper/pkfix-helper
658texlive-collection-binextra,/usr/bin/purifyeps,/usr/share/texmf-dist/scripts/purifyeps/purifyeps
659texlive-collection-binextra,/usr/bin/texcount,/usr/share/texmf-dist/scripts/texcount/texcount.pl
660texlive-collection-binextra,/usr/bin/texdiff,/usr/share/texmf-dist/scripts/texdiff/texdiff
661texlive-collection-binextra,/usr/bin/texdirflatten,/usr/share/texmf-dist/scripts/texdirflatten/texdirflatten
662texlive-collection-binextra,/usr/bin/texloganalyser,/usr/share/texmf-dist/scripts/texloganalyser/texloganalyser
663texlive-collection-context,/usr/bin/context,/usr/share/texmf-dist/scripts/context/stubs/unix/context
664texlive-collection-context,/usr/bin/ctxtools,/usr/share/texmf-dist/scripts/context/stubs/unix/ctxtools
665texlive-collection-context,/usr/bin/luatools,/usr/share/texmf-dist/scripts/context/lua/luatools.lua
666texlive-collection-context,/usr/bin/makempy,/usr/share/texmf-dist/scripts/context/stubs/unix/makempy
667texlive-collection-context,/usr/bin/mpstools,/usr/share/texmf-dist/scripts/context/stubs/unix/mpstools
668texlive-collection-context,/usr/bin/mptopdf,/usr/share/texmf-dist/scripts/context/stubs/unix/mptopdf
669texlive-collection-context,/usr/bin/mtxrun,/usr/share/texmf-dist/scripts/context/lua/mtxrun.lua
670texlive-collection-context,/usr/bin/mtxtools,/usr/share/texmf-dist/scripts/context/stubs/unix/mtxtools
671texlive-collection-context,/usr/bin/pdftools,/usr/share/texmf-dist/scripts/context/stubs/unix/pdftools
672texlive-collection-context,/usr/bin/pstopdf,/usr/share/texmf-dist/scripts/context/stubs/unix/pstopdf
673texlive-collection-context,/usr/bin/rlxtools,/usr/share/texmf-dist/scripts/context/stubs/unix/rlxtools
674texlive-collection-context,/usr/bin/runtools,/usr/share/texmf-dist/scripts/context/stubs/unix/runtools
675texlive-collection-context,/usr/bin/texexec,/usr/share/texmf-dist/scripts/context/stubs/unix/texexec
676texlive-collection-context,/usr/bin/texfont,/usr/share/texmf-dist/scripts/context/stubs/unix/texfont
677texlive-collection-context,/usr/bin/texmfstart,/usr/share/texmf-dist/scripts/context/ruby/texmfstart.rb
678texlive-collection-context,/usr/bin/textools,/usr/share/texmf-dist/scripts/context/stubs/unix/textools
679texlive-collection-context,/usr/bin/texutil,/usr/share/texmf-dist/scripts/context/stubs/unix/texutil
680texlive-collection-context,/usr/bin/tmftools,/usr/share/texmf-dist/scripts/context/stubs/unix/tmftools
681texlive-collection-context,/usr/bin/xmltools,/usr/share/texmf-dist/scripts/context/stubs/unix/xmltools
682texlive-collection-fontutils,/usr/bin/afm2afm,/usr/share/texmf-dist/scripts/fontools/afm2afm
683texlive-collection-fontutils,/usr/bin/autoinst,/usr/share/texmf-dist/scripts/fontools/autoinst
684texlive-collection-fontutils,/usr/bin/cmap2enc,/usr/share/texmf-dist/scripts/fontools/cmap2enc
685texlive-collection-fontutils,/usr/bin/epstopdf,/usr/share/texmf-dist/scripts/epstopdf/epstopdf.pl
686texlive-collection-fontutils,/usr/bin/font2afm,/usr/share/texmf-dist/scripts/fontools/font2afm
687texlive-collection-fontutils,/usr/bin/mkt1font,/usr/share/texmf-dist/scripts/accfonts/mkt1font
688texlive-collection-fontutils,/usr/bin/ot2kpx,/usr/share/texmf-dist/scripts/fontools/ot2kpx
689texlive-collection-fontutils,/usr/bin/pfm2kpx,/usr/share/texmf-dist/scripts/fontools/pfm2kpx
690texlive-collection-fontutils,/usr/bin/showglyphs,/usr/share/texmf-dist/scripts/fontools/showglyphs
691texlive-collection-fontutils,/usr/bin/vpl2ovp,/usr/share/texmf-dist/scripts/accfonts/vpl2ovp
692texlive-collection-fontutils,/usr/bin/vpl2vpl,/usr/share/texmf-dist/scripts/accfonts/vpl2vpl
693texlive-collection-langgreek,/usr/bin/mkgrkindex,/usr/share/texmf-dist/scripts/mkgrkindex/mkgrkindex
694texlive-collection-langindic,/usr/bin/ebong,/usr/share/texmf-dist/scripts/bengali/ebong.py
695texlive-collection-latex,/usr/bin/pdfatfi,/usr/share/texmf-dist/scripts/oberdiek/pdfatfi.pl
696texlive-collection-latexextra,/usr/bin/makeglossaries,/usr/share/texmf-dist/scripts/glossaries/makeglossaries
697texlive-collection-latexextra,/usr/bin/pdfannotextractor,/usr/share/texmf-dist/scripts/pax/pdfannotextractor.pl
698texlive-collection-latexextra,/usr/bin/pdfthumb,/usr/share/texmf-dist/scripts/ppower4/pdfthumb.tlu
699texlive-collection-latexextra,/usr/bin/perltex,/usr/share/texmf-dist/scripts/perltex/perltex
700texlive-collection-latexextra,/usr/bin/ppower4,/usr/share/texmf-dist/scripts/ppower4/ppower4.tlu
701texlive-collection-latexextra,/usr/bin/ps4pdf,/usr/share/texmf-dist/scripts/pst-pdf/ps4pdf
702texlive-collection-latexextra,/usr/bin/splitindex,/usr/share/texmf-dist/scripts/splitindex/perl/splitindex.pl
703texlive-collection-latexextra,/usr/bin/svn-multi,/usr/share/texmf-dist/scripts/svn-multi/svn-multi.pl
704texlive-collection-latexextra,/usr/bin/vpe,/usr/share/texmf-dist/scripts/vpe/vpe.pl
705texlive-collection-latexrecommended,/usr/bin/thumbpdf,/usr/share/texmf-dist/scripts/thumbpdf/thumbpdf.pl
706texlive-collection-pictures,/usr/bin/cachepic,/usr/share/texmf-dist/scripts/cachepic/cachepic.tlu
707texlive-collection-pictures,/usr/bin/epspdf,/usr/share/texmf-dist/scripts/epspdf/epspdf
708texlive-collection-pictures,/usr/bin/epspdftk,/usr/share/texmf-dist/scripts/epspdf/epspdftk
709texlive-collection-pictures,/usr/bin/fig4latex,/usr/share/texmf-dist/scripts/fig4latex/fig4latex
710texlive-collection-pstricks,/usr/bin/pst2pdf,/usr/share/texmf-dist/scripts/pst2pdf/pst2pdf.pl
711texlive-collection-science,/usr/bin/ulqda,/usr/share/texmf-dist/scripts/ulqda/ulqda.pl
712)
713for i in ${del_symlnks[@]}; do
714    %__rm -f %{buildroot}$(echo $i | cut -f 2 -d",") || exit 1
715done
716
717# ## compress pdf files in texmf/doc
718# find %{build_tex_destdir}/texmf/doc -name "*.pdf" -exec xz {} \;
719
720## compress info files
721%__rm -f %{buildroot}%{_infodir}/dir
722%__gzip -9nf %{buildroot}%{_infodir}/*info* ||:
723
724## desktop things
725%__mkdir_p %{buildroot}%{_datadir}/applications
726%__install -c %{SOURCE10} %{buildroot}%{_datadir}/applications/pxdvi.desktop
727
728# for created fonts
729%__mkdir_p %{buildroot}%{vartexfonts}
730%__mkdir_p %{buildroot}%{_sysconfdir}/cron.daily
731%__install -m 755 %{SOURCE100} %{buildroot}%{_sysconfdir}/cron.daily/
732
733## set executable bit for the library
734%if %{enable_sharedlib}
735%__chmod a+x %{buildroot}%{_libdir}/libkpathsea.so.*.*
736%__chmod a+x %{buildroot}%{_libdir}/libptexenc.so.*.*
737%endif
738
739## remove unpackaging files
740find %{buildroot} | %__grep -e "\\.\(la\|a\)$" | xargs %__rm -f
741find %{buildroot} | %__grep -e "\\.\(diff\|patch\)$" | xargs %__rm -f
742
743### Files list
744find %{buildroot} -type f -or -type l | \
745    %__sed -e "s|%{buildroot}||g" | \
746    %__grep -v -e "^%{_sysconfdir}" -e ".patch$" -e "\.diff$" -e "\.orig$" | \
747    %__grep -v "%{_includedir}" | \
748    %__grep -v "%{_libdir}" | \
749    %__grep -v "%{_infodir}" | \
750    %__sed -e "s|.*\.\(cnf\|cfg\)$|%config(noreplace) &|" \
751           -e "s|.*ls-R$|%ghost &|" \
752           -e "s|^.*/updmap$|%config &|" \
753           -e "s|%{texmf}*/dvips/config/\(psfonts.*\|ps2pk.*\|pdftex.*\|dvipdfm.*\|.*35\)\.map$|%ghost &|" \
754           -e "s|%{texmf}*/web2c/.*\.\(fmt\|efmt\|log\|base\|mem\|oft\)$|%config &|" \
755           -e "s|%{texmf}*/dvips/config/config\.\(generic\|pdf\|ps\|www\)$|%config &|" \
756           -e "s|%{texmf}*/tex/generic/config/.*|%config &|" \
757           -e "s|%{texmf}*/pdftex/config/pdftex.cfg$|%config &|" \
758           -e "s|%{texmf}*/xdvi/vfontmap$|%config &|" \
759           -e "s|%{texmf}*/xdvi/XDvi|%config &|" \
760           -e "s|%{_mandir}/.*|&*|" \
761        > filelist.full
762
763find %{buildroot}%{texmf} -type d | \
764    %__sed -e "s|^%{buildroot}|%dir |" \
765        -e "s|$|/|"                         >> filelist.full
766
767## subpackages
768%__grep "/texmf/doc/" filelist.full > filelist.doc
769cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp
770%__mv -f filelist.tmp filelist.full
771
772
773%clean
774%__rm -rf %{buildroot}
775
776
777%post
778## dvipdfmx
779## Create our own cid-x.map
780( %{exec_upddeffont} ) ||:
781
782%{exec_texhash}
783%{exec_updmap} --enable KanjiMap vine.map >/dev/null 2>&1
784# echo -n "    "
785# echo -n "Running updmap ... " && %{exec_updmap} >/dev/null 2>&1 && echo "done."
786# echo -n "    "
787# echo -n "Running fmtutil ... " && %{exec_fmtutil} && echo "done."
788
789
790%preun
791if [ "$1" = 0 ]; then
792    %__rm -rf %{vartexfonts}
793
794    ## dvipdfmx
795    for i in %{texmf}/fonts/truetype/*
796    do
797    if [ -L "$i" ]; then
798        %__rm -f "$i"
799    fi
800    done
801fi
802
803
804%if %{enable_sharedlib}
805%post -n libkpathsea
806/sbin/ldconfig
807# /sbin/install-info %{_infodir}/kpathsea.info.* %{_infodir}/dir
808
809%preun -n libkpathsea
810# if [ "$1" = 0 ]; then
811#     /sbin/install-info --delete %{_infodir}/kpathsea.info.* %{_infodir}/dir
812# fi
813
814%postun -n libkpathsea
815/sbin/ldconfig
816
817%post -n libptexenc
818/sbin/ldconfig
819
820%postun -n libptexenc
821/sbin/ldconfig
822%endif
823
824%triggerpostun -- texlive < 2009-17vl6
825%__mkdir_p %{vartexfonts}
826%__chmod -R 1777 %{vartexfonts}/..
827
828%triggerin -- ghostscript
829%__rm -f %{texmf}/fonts/cmap/ghostscript
830if [ -d "%{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap" ] ; then
831    %__ln_s %{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap %{texmf}/fonts/cmap/ghostscript
832elif [ -d "%{_datadir}/ghostscript/Resource/CMap" ] ; then
833    %__ln_s %{_datadir}/ghostscript/Resource/CMap %{texmf}/fonts/cmap/ghostscript
834fi
835%{exec_texhash}
836
837
838%files -f filelist.full
839%defattr(-,root,root)
840%attr(1777,root,root) %dir %{vartexfonts}
841%config %{_sysconfdir}/cron.daily/texlive.cron
842
843%files doc -f filelist.doc
844%defattr(-,root,root)
845
846%if %{enable_sharedlib}
847%files -n libkpathsea
848%defattr(-,root,root)
849%{_libdir}/libkpathsea.so.*
850# %{_infodir}/kpathsea.info*
851
852%files -n libkpathsea-devel
853%defattr(-,root,root)
854%{_libdir}/libkpathsea.so
855%dir %{_includedir}/kpathsea
856%{_includedir}/kpathsea/*
857
858%files -n libptexenc
859%defattr(-,root,root)
860%{_libdir}/libptexenc.so.*
861
862%files -n libptexenc-devel
863%defattr(-,root,root)
864%{_libdir}/libptexenc.so
865%dir %{_includedir}/ptexenc
866%{_includedir}/ptexenc/*
867%endif
868
869
870%changelog
871* Sun May 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-19
872- dropped Requires: texlive-common
873- added perl-Tk-TableMatrix
874  - supported texdoctk
875- removed broken symbolic links in /usr/bin
876  - for each these symbolic links, the package of its real file/path
877    should be its owner.
878
879* Thu May 19 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-18
880- added %%triggerpostun -- texlive < 2009-17vl6
881  - make the directory VARTEXFONTS
882
883* Tue May 10 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-17
884- fixed %%dir VARTEXFONTS around in %%files
885- dropped BuildRequires: t1utils
886
887* Tue Apr 26 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-16
888- updated texlive-20091107-texmfcnf-vine.patch, texlive.cron
889  - changed VARTEXFONTS to /var/lib/texmf/fonts
890
891* Mon Apr 25 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-15
892- fixed updmap.cfg
893
894* Sun Mar 27 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-14
895- dropped Requires: texlive-macros
896
897* Sat Jan 15 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-13
898- updated ptexlive-20100711-pxdvik-vine.patch
899  and added texlive-20091107-xdvik-vine.patch
900  - fixed to adjust X resources in texmf/xdvi/XDvi for (p)xdvi
901
902* Sat Jan 08 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-12
903- supported Vine Linux 5
904  - for vl5, changed a requirement of Japanese VF package
905    - added Requires: texlive-jvf = 2009 (vl5)
906- dropped dependencies of Provides:/Obsoletes: tags
907  - merged these dependencies in texlive-common-vl.spec
908
909* Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 2009-11
910- rebuilt with poppler-0.14.2 (libpoppler has been up to so.7)
911
912* Fri Sep 24 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-10
913- applied some security patches from Debian
914  - texlive-2009-CVE-2010-0827.patch
915  - texlive-2009-CVE-2010-1440.patch
916- applied texlive-2009-pdftexdir-libpoppler-0.12.patch from Debian
917- applied texlive-2009-luatexdir-libpoppler-0.12.patch
918  based on texlive-2009-pdftexdir-libpoppler-0.12.patch
919- fixed some dependencies
920
921* Mon Aug 09 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-9
922- added BuildArch: noarch in %%package doc
923- removed some comment-out sentences
924
925* Tue Jul 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-8
926- separeted texmf-dist to texlive-common package
927
928* Mon Jul 19 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-7
929- unpacked texlive-20091107-source.tar.xz
930- babel is available now
931- applied eptex-100420 and some patches:
932  - eptex-100420-vine.patch
933  - eptex-100420-patch1.diff
934
935* Tue Jul 13 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-6
936- updated ptexlive-20100711
937
938* Sat Jun 12 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-5
939- customized updmap.cfg to correspond installed fonts
940
941* Mon May 31 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-4
942- fixed insttexfont()
943
944* Mon May 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-3
945- added jvf of MORISAWA basic 5 fonts
946- added cm-super, mathdesign in fntlst
947
948* Sun May 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2
949- define insttexfont() in %%install
950  - copy almost compatible tetex-3.0
951
952* Sat May 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1
953- ptexlive-20090322 + TeXLive 2009
954- added BuildRequires: openssl-devel
955
956* Sun Dec 06 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2008-0.20091206
957- ptexlive-20091009 + TeXLive 2008
Note: See TracBrowser for help on using the repository browser.