Go to page:

Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

LyX /

Creating LyX RPM

Categories: Linux
<< Linux | Page list | Debian >>

Notes on how to create a RPM for your Linux distribution.

Recommended method

The recommended method of building an RPM is described in the file lyx.rpm.README that can be found in the development/ directory of the LyX distribution. Here is its actual content:

Included from LyXVCS:lyx-devel/branches/BRANCH_1_5_X/development/lyx.rpm.README


Here is what to do to make a binary rpm using the spec file lyx.spec.
The description below apply only to the Intel platform, but only minor
changes should be needed for other platforms.

1) Install qt-4.1.1 or later. If you are using RPMs, make sure to install
   the qt-devel packages as well.

2) Install LaTeX. You can do this using RPMs from your distribution that
   might be splitted in multiple packages (e.g. tetex-xdvi, tetex, 
   tetex-latex), or you can install TeXLive straight from the DVD.

3) Copy lyx.spec to the SPECS directory (on Redhat, this is located at
   /usr/src/redhat/SPECS, on other systems at /usr/src/packages/SPECS)

4) Copy lyx-1.5.2.tar.gz to your SOURCES directory (located in the same
   path as SPECS, e.g. /usr/src/packages/SOURCES)

5) Issue the command

	rpmbuild -bb /usr/src/packages/SPECS/lyx.spec

(adjust the path if needed)

This builds the binary rpm, and puts it in /usr/src/packages/RPMS/i386
(alternatively in /i586 or /x86_64, depending on your system).
Note that building lyx requires about 150M free space on your disk.

6) Now install the package:

	rpm -Uvh /usr/src/redhat/RPMS/i386/lyx-1.5.2-1.i386.rpm

(again, adjust the path and filename if needed)

If you get dependency errors about qt4 or tetex/texlive, then you need to
use the --nodeps option (because you installed qt4 or TeX not in
rpm form):

        rpm -Uvh --nodeps /usr/src/redhat/RPMS/i386/lyx-1.5.2-1.i386.rpm

(again, adjust the path and filename if needed)

You should not get any more errors.

mw@moni.msci.memphis.edu

If this does not work for you, try the instructions below that seem to work on RedHat and Mandriva.

Alternative advices

Building/installing RPM-package on RedHat

In a post by Paul Smith on the user's list at 2006-02-20:

> Certainly, I can help you with my best pleasure. The procedure is as follows:
>
> 1. download the source of LyX 1.3.7 from
>
> ftp://ftp.lyx.org/pub/lyx/stable/lyx-1.3.7.tar.gz
>
> 2. uncompress it;
>
> 3. go inside the directory where it is uncompressed the source of LyX;
>
> 4. on the command line run the command:
>
> ./configure  --with-frontend=qt --with-pspell
>
> 5. run the command make;
>
> 6. become superuser and run checkinstall.
>
> Your rpm will be built at the end! That is not too difficult, believe me.

Comment: Won't he need some Qt-related packages in order to build it?

Comment 2: This procedure is not recommended at all. checkinstall is known to fail sometimes with LyX, and it also gets the dependencies wrong. Far better is to use the included spec file. This goes like the following:

- unpack source
- cd to the unpacked dir
- edit development/lyx.spec to set the desired frontend
- cp development/lyx.spec /usr/src/packages/SPECS
- cp lib/images/lyx.xpm /usr/src/packages/SOURCES
- cp <orig tar file>.gz /usr/src/packages/SOURCES
- rpmbuild -ba /usr/src/packages/SPECS/lyx.spec

Then you will find the generated package somewhere under /usr/src/packages/RPMS.

Building a CentOS 5.x/RedHat Enterprise Linux 5.x RPMs

Note: In order to build LyX 1.5.x on CentOS 5.x and RedHat Enterprise Linux 5.x, Qt4 must be installed and the QT4DIR environment variable set. Building on the previous instructions:

- Using your favorite package manager, ensure the tetex, ImageMagick, python, and qt4 -devel packages are installed
- unpack the source
- cp <unpack dir>/development/lyx.spec /usr/src/redhat/SPECS
- cp <unpack dir>/lib/images/lyx.xpm /usr/src/redhat/SOURCES
- cp <orig tar file>.gz /usr/src/redhat/SOURCES
- export QT4DIR=/usr/lib/qt4 or QT4DIR=/usr/lib64/qt4 (depending on your architecture)
- rpmbuild -ba /usr/src/redhat/SPECS/lyx.spec

The generated RPM will be under /usr/src/redhat/RPMS.

NOTES:

  • This appears to work on CentOS 4 as well.
  • Rather than extracting the entire archive in step 2 above, it is easier to only extract the two files you need:
tar -jxvf {archive}.tar.bz2 lyx-{ver}/development/lyx lyx-{ver}/spec/lib/images/lyx.xpm
  • qt4-devel package is required, not just qt4
  • in some cases, LyX also needs the latex-xft-fonts rpm to properly display equation symbols on-screen

Contributors

  • Paul Smith
  • Georg Baum
  • Scott Ainsworth
  • Carl Fischer (CentOS 4 Notes)

Linux

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2008-07-03 03:16 CEST