%define source_date 20091011 %define tl_version 2009 %define tl_release 3.%{source_date}%{?dist} %define tl_noarch_release 2 %define _binary_payload w6.xzdio %define source_name texlive-%{source_date}-source %{!?_texdir: %global _texdir %{_datadir}/%{name}} %{!?_texmf_var: %global _texmf_var %{_var}/lib/texmf} # don't figure any perl requires %define __perl_requires %{nil} Name: texlive Version: %{tl_version} Release: %{tl_release} Summary: TeX formatting system Group: Applications/Publishing License: Artistic 2.0 and GPLv2 and GPLv2+ and LGPLv2+ and LPPL and MIT and Public Domain and UCD and Utopia URL: http://tug.org/texlive/ BuildRequires: xz libXaw-devel ncurses-devel byacc ed BuildRequires: gd-devel teckit-devel freetype-devel t1lib-devel libpng-devel zlib-devel poppler-devel t1utils #BuildRequires: clisp-devel Requires: %{name}-scheme-basic Requires: %{name}-collection-latexrecommended Obsoletes: texlive < %{tl_version}, texlive-texmf < %{tl_version} Obsoletes: texlive-texmf-afm < %{tl_version} Obsoletes: texlive-texmf-fonts < %{tl_version}, texlive-afm < %{tl_version} Obsoletes: texlive-dviutils < %{tl_version}, texlive-utils < %{tl_version} Obsoletes: texlive-texmf-errata < %{tl_version} Obsoletes: texlive-texmf-errata-afm < %{tl_version}, texlive-texmf-errata-context < %{tl_version} Obsoletes: texlive-texmf-errata-doc < %{tl_version}, texlive-texmf-errata-dvips < %{tl_version} Obsoletes: texlive-texmf-errata-east-asian < %{tl_version}, texlive-texmf-errata-fonts < %{tl_version} Obsoletes: texlive-texmf-errata-latex < %{tl_version}, texlive-texmf-errata-xetex < %{tl_version} Patch1: tl-kpfix.patch Patch2: tl-poppler.patch Source0: %{source_name}.tar.xz Source1: tl2rpm.c Source2: texlive.tlpdb %description The TeX Live software distribution offers a complete TeX system for a variety of Unix, Macintosh, Windows and other platforms. It encompasses programs for editing, typesetting, previewing and printing of TeX documents in many different languages, and a large collection of TeX macros and font libraries. The distribution includes extensive general documentation about TeX, as well as the documentation for the included software packages. %include _packages.spec %package kpathsea-lib Summary: Path searching library for TeX-related files %description kpathsea-lib The library is at the centre of pretty much all Unix-based TeX executable. It is no longer distributed separately, but rather consititutes a central part of the sources of the TeX-live distribution. %package kpathsea-lib-devel Summary: Path searching library for TeX-related files Requires: %{name}-kpathsea-lib = %{version} Provides: kpathsea-devel = %{version} Obsoletes: kpathsea-devel < %{version} %description kpathsea-lib-devel The library is at the centre of pretty much all Unix-based TeX executable. It is no longer distributed separately, but rather consititutes a central part of the sources of the TeX-live distribution. %prep %setup -q -c -T xz -dc %{SOURCE0} | tar x [ -e %{source_name} ] && mv %{source_name} source %patch1 -p0 %patch2 -p0 %build export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" cd source mkdir -p inst mkdir -p inst/texmf PREF=`pwd`/inst mkdir -p work cd work ../configure \ --prefix=$PREF \ --datadir=$PREF \ --with-system-xpdf \ --with-system-gd \ --with-system-t1lib \ --with-system-libpng \ --with-system-zlib \ --with-system-teckit \ --with-teckit-includes=/usr/include/teckit \ --with-system-freetype2 \ --with-pic \ --with-xdvi-x-toolkit=xaw \ --disable-xindy --disable-xindy-docs --disable-xindy-make-rules \ --enable-shared \ --disable-t1utils \ --disable-psutils \ --disable-lacheck \ --disable-ps2pkm \ --disable-dvidvi \ --enable-compiler-warnings=max \ --without-cxx-runtime-hack \ --disable-native-texlive-build make world %{?_smp_mflags} %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_texdir}/texmf-dist mkdir -p %{buildroot}%{_texdir}/texmf-doc mkdir -p %{buildroot}%{_texdir}/../texmf mkdir -p %{buildroot}%{_texmf_var} %include _mkdirs.spec # install binaries rm -rf %{buildroot}%{_texdir}/bin/ mkdir -p %{buildroot}%{_bindir} rm -f source/inst/bin/man cp source/inst/bin/* %{buildroot}%{_bindir} # install kpathsea shared libs, nuke static ones rm -rf %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_libdir} cp -d source/inst/lib/* %{buildroot}%{_libdir} rm -f %{buildroot}%{_libdir}/*.a rm -f %{buildroot}%{_libdir}/*.la # install includes rm -rf %{buildroot}%{_includedir} mkdir -p %{buildroot}%{_includedir} cp -r source/inst/include/* %{buildroot}%{_includedir} # relocate binaries to %{_bindir} and fix relative symlinks pushd %{buildroot}%{_bindir} for i in `find . -type l`; do if [ "`readlink $i | grep '\.\.' | wc -l`" == "1" ]; then l=`readlink $i | sed s,../../,../share/texlive/,` rm -f $i ln -s $l $i fi done popd # sync built/distro binaries pushd %{buildroot}%{_bindir} rm -f man [ ! -e mfplain ] && ln -s mpost mfplain [ ! -e texlua ] && ln -s luatex texlua [ ! -e texluac ] && ln -s luatex texluac for i in mkjobtexmf physe phyzzx repstopdf texdiff texdirflatten bibtexu dvisvgm; do rm -f %{buildroot}%{_bindir}/$i done popd # remove all unshipped stuff %include _remove.spec # nuke useless tlmgr packaging stuff rm -rf %{buildroot}%{_texdir}/tlpkg/tlpobj/ # link config dir to the main tree and var dir to root pushd %{buildroot}%{_texdir} [ ! -e texmf-config ] && ln -s texmf texmf-config [ ! -h texmf-var ] && ln -s %{_texmf_var} texmf-var popd # touch ghosts touch %{buildroot}%{_texdir}/texmf/ls-R touch %{buildroot}%{_texdir}/texmf-dist/ls-R touch %{buildroot}%{_texdir}/texmf-doc/ls-R touch %{buildroot}%{_texdir}/../texmf/ls-R %clean rm -rf %{buildroot} %pre rm -rf %{_texdir}/texmf-var rm -rf %{_texmf_var}/* : %posttrans %{_bindir}/texhash 2> /dev/null %{_bindir}/updmap-sys &> /dev/null %{_bindir}/fmtutil-sys --all &> /dev/null if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then [ -x /sbin/restorecon ] && /sbin/restorecon -R %{_texmf_var}/ fi : %files %defattr(-,root,root) %dir %{_texmf_var} %dir %{_texdir}/texmf-config %dir %{_texdir}/texmf-var %dir %{_texdir}/../texmf %attr(0644, root, root) %verify(not md5 size mtime) %ghost %{_texdir}/texmf/ls-R %attr(0644, root, root) %verify(not md5 size mtime) %ghost %{_texdir}/texmf-dist/ls-R %attr(0644, root, root) %verify(not md5 size mtime) %ghost %{_texdir}/texmf-doc/ls-R %attr(0644, root, root) %verify(not md5 size mtime) %ghost %{_texdir}/../texmf/ls-R %include _dirs.spec %include _files.spec %files kpathsea-lib %defattr(-,root,root) %{_libdir}/*.so.* %files kpathsea-lib-devel %defattr(-,root,root) %dir %{_includedir}/kpathsea %{_includedir}/kpathsea/* %{_libdir}/*.so %changelog * Tue Nov 10 2009 Jindrich Novy 2009-2 - install man and info pages into proper locations visible by man and info - update scriptlets - remove xindy bits * Mon Nov 09 2009 Jindrich Novy 2009-1 - update to oficcially released TeX Live 2009 - enable large file support * Sun Nov 01 2009 Jindrich Novy 2009-0.13 - remove postun scriptlet to avoid accidential removal of texmf bits when not removing the package * Fri Oct 23 2009 Jindrich Novy 2009-0.12 - tighten kpathsea devel dependency * Tue Oct 20 2009 Jindrich Novy 2009-0.11 - fix generation of packages that ships only documentation - fix versioning of packages without version but with revision - fix heuristics for gathering .sty files dependencies - include packages under GFSL license - make files in old texmf tree from previous installs visible - do not obsolete old kpathsea, try to coexist - remove dvipdfm, dvipdfmx,depend of Fedora ones * Sun Oct 18 2009 Jindrich Novy 2009-0.10 - TL2007 compatibility fixes: - create /usr/share/texmf symlink - clean all in post scriptlets * Fri Oct 02 2009 Jindrich Novy 2009-0.9 - fix kpathsea Provides/Obsoletes * Tue Sep 29 2009 Jindrich Novy 2009-0.8 - sync with latest upstream * Sat Sep 12 2009 Jindrich Novy 2009-0.7 - make kpathsea independent on the main texlive package * Thu Sep 10 2009 Jindrich Novy 2009-0.6 - remove packages under GFSL non-free license (tex-gyre) * Thu Sep 3 2009 Jindrich Novy 2009-0.5 - fix dependencies to hyphenation packages - fix provides/obsoletes * Mon Aug 31 2009 Jindrich Novy 2009-0.4 - require recommended LaTeX bits, the installation of pure scheme-basic is too minimalistic * Tue Aug 25 2009 Jindrich Novy 2009-0.3 - require system psutils and t1utils and don't build the TL ones - correctly obsolete old kpathsea - binaries now have -bin postfix - support for Fedora fonts * Thu Aug 20 2009 Jindrich Novy 2009-0.2 - add tetex-* virtual provides - fix unversioned requires - filter out unwanted libs and utilities from source * Wed Aug 12 2009 Jindrich Novy 2009-0.1 - update to TeX Live 2009 - pretest * Mon Jun 29 2009 Jindrich Novy 2008-0.2 - update to today's svn sources of binaries from upstream - fix directory -> symlink conversion - add ly1 (#488651) * Thu Aug 14 2008 Jindrich Novy 2008-0.1 - initial packaging for TeX Live 2008 - wrote tl2rpm.c to autogenerate packages and post scriptlets from TeX Live metadata - fix kpathsea default search path