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

Revision 1973, 23.6 KB checked in by munepi, 14 years ago (diff)

texlive: rebuilt zlib-1.2.5; applied security patches and some patches for libpoppler-0.12

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