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

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

updated texlive packages: supported VinePlus?/5, more; improved some %%post scripts

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