Author Topic: Texlive update  (Read 985 times)

Offline Chrisboo

  • Full Member
  • ***
  • Posts: 72
Texlive update
« on: June 03, 2011, 07:52:17 PM »
Hello,
I'm working on getting a up to date latex environment on PCLinuxOS (cf the other thread about Kile: http://www.pclinuxos.com/forum/index.php/topic,89391.0.html)

Anyways, the texlive in the repos is very old (2007) and lacks many nice features. Since Texlive seems to be a packaging nightmare i want to do a quick and dirty approach which is probably not suitable for the repos but I need it to install it comfortably on several machines: I want to make a package which includes the dependencies, installs the texlive webinstaller (just copy the file to the computer basically) and add the texlive installation to the $path

The installer can then be run by the user or, even better be initiated by the rpm if thats possible?

This is what I have so far (I know its not much and I'll have to ask many more questions :-D):

Code: [Select]
%define   name   texlive
%define   version   2011
%define   release   %mkrel 1
%define   Summary   Package to install the CTAN Texlive install script

Name:      %{name}
Summary:   %{Summary}
Version:   %{version}
Release:   %{release}
Source0:   install-tl-unx.tar.xz
Group:     Publishing
License:   Distributable
URL:       http://tug.org/texlive/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch:      noarch

#texlive-latex is the one needed by kile
Provides: texlive-latex
BuildRequires: perl-Tk



%description
This package will install the CTAN installation script install-tl. It has to be run in a terminal after the installation of this package in order to have a working texlive installation. Updates can be obtained running tlmgr in the terminal.

%prep
%setup -q -n %name-%{version}
%build


%install


%files
#%defattr(-,root,root,0755)
#%{_bindir}
#%{_datadir}



%changelog
* Sat May 04 2011 chrisboo
- created

The problem is already how to extract the installer installer into the buildroot? the prep command fails saying this:
Code: [Select]
+ umask 022
+ cd /home/packaging/src/rpm/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/packaging/src/rpm/BUILD
+ rm -rf texlive-2011
+ tar -xf /home/packaging/src/rpm/SOURCES/install-tl-unx.tar.xz
+ cd texlive-2011
/home/packaging/src/tmp/rpm-tmp.92644: line 33: cd: texlive-2011: No such file or directory
error: Bad exit status from /home/packaging/src/tmp/rpm-tmp.92644 (%prep)


RPM build errors:
    Bad exit status from /home/packaging/src/tmp/rpm-tmp.92644 (%prep)

The tar.xz is not really a "source". Is that the problem? it looks like this:
Code: [Select]
[packaging@localhost install-tl-20110526]$ ls
index.html   LICENSE.CTAN  README            readme-txt.dir/    release-texlive.txt
install-tl*  LICENSE.TL    readme-html.dir/  README.usergroups  tlpkg/


Can anyone give my some hints on this? I'm rather puzzled here but hope that I made my intentions clear :-D

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: Texlive update
« Reply #1 on: June 03, 2011, 09:49:11 PM »
The files have already been extracted to the build folder (/home/packaging/src/rpm/BUILD). It's actually complaining that it can't cd into a folder called texlive-2011 because that's what you told it to do with %setup -q -n %name-%{version}. Try:

Code: [Select]
%prep
%setup -q -n install-tl-20110526

and you should get:

Code: [Select]
+ cd /home/packaging/src/rpm/BUILD
+ rm -rf texlive-2011
+ tar -xf /home/packaging/src/rpm/SOURCES/install-tl-unx.tar.xz
+ cd install-tl-20110526
« Last Edit: June 03, 2011, 10:14:08 PM by Chomp »

Offline Chrisboo

  • Full Member
  • ***
  • Posts: 72
Re: Texlive update
« Reply #2 on: July 10, 2011, 11:54:59 AM »
Thank you very much for your reply! I now realized that packaging texlive is totally over my head and therefore i resided to the "poor man" solution of installing it by hand and creating a dummy package. Obviously this is not the PCLinuxOS-Quality way but I need the new texlive (2007 is in the repo). Nevertheless, for the sake of learning and because I have to install it on at least 3 computers i would like to make this "dummy" as functional as possible, here it is:

Code: [Select]
Name:    texlive
Version: 2011
Release: %mkrel 3
Summary: Metapackage for faking the texlive dependencies
Group:   Publishing
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root

#Search results for texlive                                       
Provides: texlive-afm
Provides: texlive-context
Provides: texlive-dvilj
Provides: texlive-dvipdfm
Provides: texlive-dvips
Provides: texlive-dviutils
Provides: texlive-fonts
Provides: texlive-jadetex
Provides: texlive-mfwin
Provides: texlive-texmf
Provides: texlive-texmf-afm
Provides: texlive-texmf-cmsuper
Provides: texlive-texmf-common
Provides: texlive-texmf-context
Provides: texlive-texmf-dvipdfm
Provides: texlive-texmf-dvips
Provides: texlive-texmf-fonts
Provides: texlive-texmf-jadetex
Provides: texlive-texmf-latex
Provides: texlive-texmf-usrlocal
Provides: texlive-texmf-xmltex
Provides: texlive-xdvi
Provides: texlive-xmltex
Provides: texlive-latex
#Searchresults for Tetex
Provides: tetex
Provides: tetex-afm
Provides: tetex-cmsuper
Provides: tetex-context
Provides: tetex-devel
Provides: tetex-doc
Provides: tetex-dvilj
Provides: tetex-dvipdfm
Provides: tetex-dvips
Provides: tetex-latex
Provides: tetex-latex-arab
Provides: tetex-latex-heb
Provides: tetex-mfwin
Provides: tetex-texi2html
Provides: tetex-xdvi
#This one is needed by gnuplot, MAYBE THIS ONE HAS MORE DEPENDENCIES!!!!!!!!
Provides: texinfo

Obsoletes: %{name} < %version

%description
This package is a meta-package, meaning that its purpose is to contain
dependencies and recommended additions for texlive. Texlive has to be installed manually.
Run the following command to add it to the path: PATH=/usr/local/texlive/2010/bin/i386-linux:$PATH

%files



%changelog
* Sat Jul 10 2011 Chrisboo <> 2011-1pclos2011
- added dependencies
- changed summary

* Sat Jul 10 2011 Chrisboo <> 2011-1pclos2011
- created

I would like to make my rpm do two more things:
- add "PATH=/usr/local/texlive/2010/bin/i386-linux:$PATH" to my path permanently
- add a link-folder to /usr/share/ (called "texmf") which links to /usr/local/texlive/2010/texmf/ (this is where my manual installation is) because gnuplot adds a file into that folder while being installed

Could anyone help me out on this one?

Thank you very much!