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

Revision 3150, 24.4 KB checked in by munepi, 13 years ago (diff)

updated texlive-vl.spec, texlive-common-vl.spec task-texlive-vl.spec

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
34
35Autoreq: 0
36
37Summary: The TeX text formatting system
38Summary(ja): TeX 文書整形システム
39Name: texlive
40Version: 2009
41Release: 14%{?_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
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
189BuildRequires: 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
321make_option vartexfonts=%{vartexfonts}
322
323conf_option --enable-luatex
324conf_option --enable-xetex
325conf_option --enable-xdv2pdf
326conf_option --enable-xdvipdfmx
327
328conf_option --with-xdvi-x-toolkit=motif
329# conf_option --without-x
330# conf_option --disable-xdvik
331# conf_option --disable-oxdvik
332# conf_option --disable-pxdvik
333
334conf_option --with-system-ncurses
335conf_option --with-system-zlib
336conf_option --with-system-pnglib
337conf_option --with-system-t1lib
338conf_option --with-system-xpdf
339conf_option --with-system-freetype
340conf_option --with-system-freetype2
341conf_option --with-freetype2-include=`freetype-config --cflags | sed -e 's/-I//' -e 's/ .*//'`
342conf_option --with-system-gd
343EOF
344
345## For vl5, libkpathsea and libptexenc libraries are static link
346%if %{enable_sharedlib}
347%__cat <<EOF >> ptexlive.cfg
348conf_option --enable-shared
349EOF
350%endif
351
352%__cat <<EOF >> ptexlive.cfg
353conf_option --enable-kanji-iconv
354
355conf_option --disable-multiplatform
356make_option %{?_smp_mflags}
357EOF
358
359## exec 2extract-src.sh
360%__make x
361
362## texmf.cnf for Vine Linux
363%patch2 -p1 -b .orig
364
365## (p)xdvik for Vine Linux
366%patch10 -p1 -b .orig
367%patch11 -p1 -b .orig
368
369## dvipdfmx for Vine Linux
370%patch20 -p1 -b .orig
371
372## eptex
373(cd ..
374%__tar jxf %{SOURCE52}
375cd eptex-%{eptexver}
376%patch50 -p1 -b .orig
377%patch51 -p1 -b .orig
378## apply eptex: exec almost 0eptex.sh
379%if %with_eptex
380./0eptex.sh
381%endif
382)
383
384## texdoc
385#%patch90 -p0 -b .orig
386
387## libpoppler-0.12
388%if %{?_dist_release} != "vl5"
389(cd build/%{name}-%{texlivesrcver}-source
390%patch100 -p1 -b .xpdf
391%patch101 -p1 -b .xpdf
392)
393%endif
394
395## apply security patches
396(cd build/%{name}-%{texlivesrcver}-source
397#%patch1000
398%patch1001 -p1 -b .security
399%patch1002 -p1 -b .security
400)
401
402
403%build
404## NOTE:
405## In this setion,
406## execute almostly 3make-install.sh
407set -x
408unset TEXINPUTS || :
409unset HOME || :
410
411. ./common.sh
412
413export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LANG=C
414##%__make c
415
416PREF=${TEXSRC_EXTRACTED}/inst
417
418%__mkdir_p ${PREF}/texmf
419%__mkdir_p ${PREF}/../Work
420pushd ${PREF}/../Work
421../configure --host=%{_host} --build=%{_build} \
422    --prefix=${PREF} \
423    --datadir=${PREF} \
424    \
425    --disable-native-texlive-build \
426    --enable-multiplatform \
427    --disable-omfonts \
428    --enable-compiler-warnings=max \
429    --without-cxx-runtime-hack \
430    --enable-kanji=$KANJI_CODE \
431    --with-ptexenc=$KANJI_CODE \
432    --disable-all-pkgs \
433    --enable-web2c \
434    --disable-luatex \
435    --disable-xetex \
436    --enable-mf \
437    --enable-mf-nowin \
438    --enable-mp \
439    --enable-web-progs \
440    --enable-dvipdfmx \
441    --enable-dvipsk \
442    --enable-pdvipsk \
443    --enable-gsftopk \
444    --enable-makeindexk \
445    --enable-makejvf \
446    --enable-mendexk \
447    --enable-ps2pkm \
448    --enable-xdvik \
449    --enable-pxdvik \
450    --enable-tetex \
451    --enable-texlive \
452    $CONF_OPTION
453
454
455(cd ..
456## Avoid pollution from internal libraries.
457%__rm -rf ./libs/{expat,freetype,freetype2,gd,jpeg,libpng,libttf,ncurses,type1,t1lib,unzip,xpdf,zlib}
458
459## XXX Hacks to avoid accidental version clashs with system libraries.
460hack_libs=(
461    zlib
462    libpng
463    t1lib
464    freetype
465    freetype2
466    gd
467    xpdf
468)
469for i in  "${hack_libs[@]}"; do
470    %__mkdir_p ./libs/${i}
471    touch ./libs/${i}/configure
472done
473)
474
475%__make world $MAKE_OPTION %{?_smp_mflags}
476popd
477
478
479%install
480## prepare %%install session
481[ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot}
482
483set -x
484unset TEXINPUTS || :
485unset HOME || :
486
487. ./common.sh
488
489PREF=${TEXSRC_EXTRACTED}/inst
490
491pushd ${PREF}/../Work
492## the following two lines are useful for
493## "rpmbuild -ba --short-circuit  ~/rpm/SPECS/texlive-vl.spec"
494%__rm -rf ${PREF}
495%__make world $MAKE_OPTION
496popd
497
498## execute almostly 4extract-texmf.sh
499%__mv ${PREF}/texmf-dist ${PREF}/texmf-dist.install  || exit # never use
500%__mv ${PREF}/texmf ${PREF}/texmf.install            || exit
501%__cp -r %{texlive_src}/texmf ${PREF}/          || exit
502%__cp -rf ${PREF}/texmf.install/* ${PREF}/texmf/     || exit
503
504## copy almost compatible TeX system of teTeX-3.0
505## NOTE: The size of texmf-dist is about 2GB below:
506# 890M  doc
507# 660M  fonts
508# 103M  source
509#
510# 68M   tex/latex
511# 46M   tex/generic
512# 27M   tex/context
513##%__ln_s -f %{texlive_src}/texmf-dist ${PREF}/
514%__mkdir_p ${PREF}/texmf-dist
515##!! [FAKE] copy all directries except doc, fonts, source, tex4ht in texmf-dist
516(cd %{texlive_src}/texmf-dist
517    %__cp -r README metapost scripts bibtex dvips makeindex mft \
518             tlpkg context metafont tex omega vtex \
519        ${PREF}/texmf-dist/
520)
521## copy some fonts (almost tetex + tetex-extra)
522## NOTE: this part is in texlive-common since texlive-8vl6
523
524#### customize updmap.cfg for each font's map files
525%{!?with_firstbuild: \
526    %__sed -i -e "s,^\(Map\|MixedMap\),#! \1,g" ${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
646# ## compress pdf files in texmf/doc
647# find %{build_tex_destdir}/texmf/doc -name "*.pdf" -exec xz {} \;
648
649## compress info files
650%__rm -f %{buildroot}%{_infodir}/dir
651%__gzip -9nf %{buildroot}%{_infodir}/*info* ||:
652
653## desktop things
654%__mkdir_p %{buildroot}%{_datadir}/applications
655%__install -c %{SOURCE10} %{buildroot}%{_datadir}/applications/pxdvi.desktop
656
657# for created fonts
658%__mkdir_p %{buildroot}%{vartexfonts}
659%__mkdir_p %{buildroot}%{_sysconfdir}/cron.daily
660%__install -m 755 %{SOURCE100} %{buildroot}%{_sysconfdir}/cron.daily/
661
662## set executable bit for the library
663%if %{enable_sharedlib}
664%__chmod a+x %{buildroot}%{_libdir}/libkpathsea.so.*.*
665%__chmod a+x %{buildroot}%{_libdir}/libptexenc.so.*.*
666%endif
667
668## remove unpackaging files
669find %{buildroot} | %__grep -e "\\.\(la\|a\)$" | xargs %__rm -f
670find %{buildroot} | %__grep -e "\\.\(diff\|patch\)$" | xargs %__rm -f
671
672### Files list
673find %{buildroot} -type f -or -type l | \
674    %__sed -e "s|%{buildroot}||g" | \
675    %__grep -v -e "^%{_sysconfdir}" -e ".patch$" -e "\.diff$" -e "\.orig$" | \
676    %__grep -v "%{_includedir}" | \
677    %__grep -v "%{_libdir}" | \
678    %__grep -v "%{_infodir}" | \
679    %__sed -e "s|.*\.\(cnf\|cfg\)$|%config(noreplace) &|" \
680           -e "s|.*ls-R$|%ghost &|" \
681           -e "s|^.*/updmap$|%config &|" \
682           -e "s|%{texmf}*/dvips/config/\(psfonts.*\|ps2pk.*\|pdftex.*\|dvipdfm.*\|.*35\)\.map$|%ghost &|" \
683           -e "s|%{texmf}*/web2c/.*\.\(fmt\|efmt\|log\|base\|mem\|oft\)$|%config &|" \
684           -e "s|%{texmf}*/dvips/config/config\.\(generic\|pdf\|ps\|www\)$|%config &|" \
685           -e "s|%{texmf}*/tex/generic/config/.*|%config &|" \
686           -e "s|%{texmf}*/pdftex/config/pdftex.cfg$|%config &|" \
687           -e "s|%{texmf}*/xdvi/vfontmap$|%config &|" \
688           -e "s|%{texmf}*/xdvi/XDvi|%config &|" \
689           -e "s|%{_mandir}/.*|&*|" \
690        > filelist.full
691
692find %{buildroot}%{texmf} -type d | \
693    %__sed -e "s|^%{buildroot}|%dir |" \
694        -e "s|$|/|"                         >> filelist.full
695
696## subpackages
697%__grep "/texmf/doc/" filelist.full > filelist.doc
698cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp
699%__mv -f filelist.tmp filelist.full
700
701
702%clean
703%__rm -rf %{buildroot}
704
705
706%post
707## dvipdfmx
708## Create our own cid-x.map
709( %{exec_upddeffont} ) ||:
710
711%{exec_texhash}
712%{exec_updmap} --enable KanjiMap vine.map >/dev/null 2>&1
713# echo -n "    "
714# echo -n "Running updmap ... " && %{exec_updmap} >/dev/null 2>&1 && echo "done."
715# echo -n "    "
716# echo -n "Running fmtutil ... " && %{exec_fmtutil} && echo "done."
717
718
719%preun
720%__rm -rf %{_var}/lib/texmf/*
721if [ "$1" = 0 ]; then
722    ## dvipdfmx
723    for i in %{texmf}/fonts/truetype/*
724    do
725    if [ -L "$i" ]; then
726        %__rm -f "$i"
727    fi
728    done
729fi
730
731
732%if %{enable_sharedlib}
733%post -n libkpathsea
734/sbin/ldconfig
735# /sbin/install-info %{_infodir}/kpathsea.info.* %{_infodir}/dir
736
737%preun -n libkpathsea
738# if [ "$1" = 0 ]; then
739#     /sbin/install-info --delete %{_infodir}/kpathsea.info.* %{_infodir}/dir
740# fi
741
742%postun -n libkpathsea
743/sbin/ldconfig
744
745%post -n libptexenc
746/sbin/ldconfig
747
748%postun -n libptexenc
749/sbin/ldconfig
750%endif
751
752
753%triggerin -- ghostscript
754%__rm -f %{texmf}/fonts/cmap/ghostscript
755if [ -d "%{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap" ] ; then
756    %__ln_s %{_datadir}/ghostscript/$(gs --version| cut -d . -f 1-2)/Resource/CMap %{texmf}/fonts/cmap/ghostscript
757elif [ -d "%{_datadir}/ghostscript/Resource/CMap" ] ; then
758    %__ln_s %{_datadir}/ghostscript/Resource/CMap %{texmf}/fonts/cmap/ghostscript
759fi
760%{exec_texhash}
761
762
763%files -f filelist.full
764%defattr(-,root,root)
765%attr(1777,root,root) %dir %{_var}/lib/texmf
766%config %{_sysconfdir}/cron.daily/texlive.cron
767
768%files doc -f filelist.doc
769%defattr(-,root,root)
770
771%if %{enable_sharedlib}
772%files -n libkpathsea
773%defattr(-,root,root)
774%{_libdir}/libkpathsea.so.*
775# %{_infodir}/kpathsea.info*
776
777%files -n libkpathsea-devel
778%defattr(-,root,root)
779%{_libdir}/libkpathsea.so
780%dir %{_includedir}/kpathsea
781%{_includedir}/kpathsea/*
782
783%files -n libptexenc
784%defattr(-,root,root)
785%{_libdir}/libptexenc.so.*
786
787%files -n libptexenc-devel
788%defattr(-,root,root)
789%{_libdir}/libptexenc.so
790%dir %{_includedir}/ptexenc
791%{_includedir}/ptexenc/*
792%endif
793
794
795%changelog
796* Sun Mar 27 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-14
797- dropped Requires: texlive-macros
798
799* Sat Jan 15 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-13
800- updated ptexlive-20100711-pxdvik-vine.patch
801  and added texlive-20091107-xdvik-vine.patch
802  - fixed to adjust X resources in texmf/xdvi/XDvi for (p)xdvi
803
804* Sat Jan 08 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-12
805- supported Vine Linux 5
806  - for vl5, changed a requirement of Japanese VF package
807    - added Requires: texlive-jvf = 2009 (vl5)
808- dropped dependencies of Provides:/Obsoletes: tags
809  - merged these dependencies in texlive-common-vl.spec
810
811* Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 2009-11
812- rebuilt with poppler-0.14.2 (libpoppler has been up to so.7)
813
814* Fri Sep 24 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-10
815- applied some security patches from Debian
816  - texlive-2009-CVE-2010-0827.patch
817  - texlive-2009-CVE-2010-1440.patch
818- applied texlive-2009-pdftexdir-libpoppler-0.12.patch from Debian
819- applied texlive-2009-luatexdir-libpoppler-0.12.patch
820  based on texlive-2009-pdftexdir-libpoppler-0.12.patch
821- fixed some dependencies
822
823* Mon Aug 09 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-9
824- added BuildArch: noarch in %%package doc
825- removed some comment-out sentences
826
827* Tue Jul 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-8
828- separeted texmf-dist to texlive-common package
829
830* Mon Jul 19 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-7
831- unpacked texlive-20091107-source.tar.xz
832- babel is available now
833- applied eptex-100420 and some patches:
834  - eptex-100420-vine.patch
835  - eptex-100420-patch1.diff
836
837* Tue Jul 13 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-6
838- updated ptexlive-20100711
839
840* Sat Jun 12 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-5
841- customized updmap.cfg to correspond installed fonts
842
843* Mon May 31 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-4
844- fixed insttexfont()
845
846* Mon May 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-3
847- added jvf of MORISAWA basic 5 fonts
848- added cm-super, mathdesign in fntlst
849
850* Sun May 16 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2
851- define insttexfont() in %%install
852  - copy almost compatible tetex-3.0
853
854* Sat May 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1
855- ptexlive-20090322 + TeXLive 2009
856- added BuildRequires: openssl-devel
857
858* Sun Dec 06 2009 Munehiro Yamamoto <munepi@vinelinux.org> 2008-0.20091206
859- ptexlive-20091009 + TeXLive 2008
Note: See TracBrowser for help on using the repository browser.