head	1.3;
access;
symbols;
locks; strict;
comment	@-- @;


1.3
date	2009.12.22.08.59.56;	author rse;	state Exp;
branches;
next	1.2;
commitid	n7dy1DmMGbaTGlgu;

1.2
date	2009.12.21.14.51.53;	author rse;	state Exp;
branches;
next	1.1;
commitid	ysOtI8xmBRmCFfgu;

1.1
date	2009.05.22.12.21.04;	author rse;	state Exp;
branches;
next	;
commitid	ABI1SM1vfZSmGROt;


desc
@@


1.3
log
@improve packaging one step further
@
text
@##
##  texlive.spec -- OpenPKG RPM Package Specification
##  Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
##
##  Permission to use, copy, modify, and distribute this software for
##  any purpose with or without fee is hereby granted, provided that
##  the above copyright notice and this permission notice appear in all
##  copies.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##

#   package version
%define       V_base   2009
%define       V_source 20091107
%define       V_texmf  20091107

#   package information
Name:         texlive
Summary:      The TeX Typesetting System
URL:          http://tug.org/texlive/
Vendor:       TeX User Group, Sebastian Rahtz et al.
Packager:     OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class:        EVAL
Group:        Typesetting
License:      GPL
Version:      %{V_base}
Release:      20091222

#   package options
%option       with_x11  no

#   list of sources
Source0:      ftp://tug.org/historic/systems/texlive/%{V_base}/texlive-%{V_source}-source.tar.xz
Source1:      ftp://tug.org/historic/systems/texlive/%{V_base}/texlive-%{V_texmf}-texmf.tar.xz
Patch0:       texlive.patch

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes, xz, flex, bison
PreReq:       OpenPKG, openpkg >= 20060823
PreReq:       t1utils, psutils, texinfo, lcdf-typetools, dialog
BuildPreReq:  ncurses, png, zlib, t1lib, freetype, fontconfig, gd, graphite
PreReq:       ncurses, png, zlib, t1lib, freetype, fontconfig, gd, graphite
AutoReq:      no
AutoReqProv:  no
Conflicts:    tetex

%description
    TeX Live is a complete TeX distribution for Unix compatible systems,
    maintained by the TeX User Group. It was originally developed
    by Sebastian Rahtz and is based on Karl Berry's original Web2c
    distribution and Thomas Esser's teTeX distribution. TeX was invented
    by Donald E. Knuth, and the most popular TeX macro set (LaTeX) for
    TeX was invented by Leslie Lamport.

%track
    prog texlive:source = {
        version   = %{V_source}
        url       = ftp://tug.org/historic/systems/texlive/%{V_base}/
        regex     = texlive-(__VER__)-source\.tar\.xz
    }
    prog texlive:texmf = {
        version   = %{V_texmf}
        url       = ftp://tug.org/historic/systems/texlive/%{V_base}/
        regex     = texlive-(__VER__)-texmf\.tar\.xz
    }

%prep
    %setup -q -T -c
    xz -d -c %{SOURCE0} | %{l_tar} xf -
    cd texlive-%{V_source}-source
    %patch -p0

%build
    #   configure and build programs
    ( cd texlive-%{V_source}-source
      mkdir obj
      cd obj
      export CC="%{l_cc}"
      export CXX="%{l_cxx}"
      export CFLAGS="%{l_cflags -O}"
      export CXXFLAGS="%{l_cxxflags -O}"
      export CPPFLAGS="%{l_cppflags}"
      export LDFLAGS="%{l_ldflags}"
      export LIBS="`pkg-config fontconfig --libs`"
      ../configure \
          --prefix=%{l_prefix} \
          --datadir=%{l_prefix}/share \
          --infodir=%{l_prefix}/info \
          --mandir=%{l_prefix}/man \
          --with-tex-banner="TeX Live 2009 (OpenPKG)" \
          --disable-multiplatform \
          --disable-compiler-warnings \
          --disable-shared \
          --enable-static \
          --enable-ipc \
          --enable-fmtutil \
          --enable-t1lib \
          --enable-gf \
          --enable-a4 \
          --with-ps=gs \
          --with-web2c \
          --with-tetex \
          --without-texinfo \
          --without-psutils \
          --without-t1utils \
          --without-lcdf-typetools \
          --without-dialog \
          --without-xindy \
%if "%{with_x11}" == "yes"
          --with-xdvik \
          --with-xdvipdfmx \
          --with-xdv2pdf \
          --with-pdfopen \
          --with-x \
          --with-mf-x-toolkit=xaw3d \
          --with-xdvi-x-toolkit=xaw3d \
          --x-includes=`%{l_rc} --query x11_incdir` \
          --x-libraries=`%{l_rc} --query x11_libdir` \
%else
          --without-xdvik \
          --without-xdvipdfmx \
          --without-xdv2pdf \
          --without-pdfopen \
          --without-x \
%endif
          --with-system-ncurses \
          --with-ncurses-libdir=%{l_prefix}/lib \
          --with-ncurses-include=%{l_prefix}/include \
          --with-system-pnglib \
          --with-pnglib-libdir=%{l_prefix}/lib \
          --with-pnglib-include=%{l_prefix}/include \
          --with-system-zlib \
          --with-zlib-libdir=%{l_prefix}/lib \
          --with-zlib-include=%{l_prefix}/include \
          --with-system-t1lib \
          --with-t1lib-libdir=%{l_prefix}/lib \
          --with-t1lib-include=%{l_prefix}/include \
          --with-system-graphite \
          --with-graphite-libdir=%{l_prefix}/lib \
          --with-graphite-include=%{l_prefix}/include \
          --with-system-freetype2 \
          --with-freetype2-libdir=%{l_prefix}/lib \
          --with-freetype2-include=%{l_prefix}/include \
          --with-fontconfig=%{l_prefix} \
          --with-fontconfig-libdir=%{l_prefix}/lib \
          --with-fontconfig-include=%{l_prefix}/include \
          --with-system-gd \
          --with-gd-libdir=%{l_prefix}/lib \
          --with-gd-include=%{l_prefix}/include \
          --with-icu-libdir=%{l_prefix}/lib \
          --with-icu-include=%{l_prefix}/include
      %{l_make} %{l_mflags}
    ) || exit $?

%install
    #   create installation hierarchy
    rm -rf $RPM_BUILD_ROOT
    %{l_shtool} mkdir -f -p -m 755 \
        $RPM_BUILD_ROOT%{l_prefix}/share \
        $RPM_BUILD_ROOT%{l_prefix}/bin \
        $RPM_BUILD_ROOT%{l_prefix}/info \
        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
        $RPM_BUILD_ROOT%{l_prefix}/man/man5

    #   install TeX and MetaFont data
    xz -d -c %{SOURCE1} |\
        ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share && %{l_tar} xf - ) || exit $?
    mv  $RPM_BUILD_ROOT%{l_prefix}/share/texlive-%{V_texmf}-texmf/* \
        $RPM_BUILD_ROOT%{l_prefix}/share/
    rmdir $RPM_BUILD_ROOT%{l_prefix}/share/texlive-%{V_texmf}-texmf

    #   install program files
    ( cd texlive-%{V_source}-source/obj
      %{l_make} %{l_mflags} install \
          prefix=$RPM_BUILD_ROOT%{l_prefix} \
          datadir=$RPM_BUILD_ROOT%{l_prefix}/share \
          infodir=$RPM_BUILD_ROOT%{l_prefix}/info \
          mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
          texmf=$RPM_BUILD_ROOT%{l_prefix}/share/texmf
    ) || exit $?

    #   strip down installation
    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir

    #   determine installation files
    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}

%files -f files

%clean
    rm -rf $RPM_BUILD_ROOT

@


1.2
log
@initial cut for TeX Live 2009 packaging
@
text
@d40 1
a40 1
Release:      20091221
d56 2
a57 2
BuildPreReq:  ncurses, png, zlib, t1lib, freetype, fontconfig, gd
PreReq:       ncurses, png, zlib, t1lib, freetype, fontconfig, gd
d60 1
d105 1
d107 3
d153 3
d160 2
@


1.1
log
@new package: texlive 2008 (The TeX Typesetting System)
@
text
@d25 3
a27 3
%define       V_base   2008
%define       V_source 20080816
%define       V_texmf  20080822
d40 1
a40 1
Release:      20090522
d46 2
a47 2
Source0:      ftp://tug.org/historic/systems/texlive/%{V_base}/texlive-%{V_source}-source.tar.lzma
Source1:      ftp://tug.org/historic/systems/texlive/%{V_base}/texlive-%{V_texmf}-texmf.tar.lzma
d73 1
a73 1
        regex     = texlive-(__VER__)-source\.tar\.lzma
d78 1
a78 1
        regex     = texlive-(__VER__)-texmf\.tar\.lzma
d83 1
a83 1
    lzma -d -c %{SOURCE0} | %{l_tar} xf -
d171 1
a171 1
    lzma -d -c %{SOURCE1} |\
@

