custom tex in rpm/apt distributions
I prefer to use TeX from TeXlive distribution, not the default TeX bundled with an operating system. The problem is that rpm and apt tools check dependencies and insist on installing the wrong TeX. To trick the system, a fake package should be made and installed.
The next commands are for ALT Linux, maybe they are not correct for other distributions.
1) Find what a package needs:
$ apt-cache show lyx | grep 'Depends:'
... texlive-latex-recommended ...
... /user/share/texmf ...
2) Create a fake spec-file "/home/rpmer/RPM/SPECS/dummy-provides.spec", which "provides" the required facilities:
Name: dummy-provides
Version: 0
Release: alt2
Summary: Trick apt/rpm dependencies
License: Public domain
Group: Toys
Packager: Oleg Parashchenko
BuildArch: noarch
Provides: /usr/bin/dvips dvipng texlive-latex-recommended /user/share/texmf
%description
%summary
%prep
%build
%install
mkdir -p %buildroot
%files
%changelog
* Fri Apr 01 2011 Oleg Parashchenko
- initial list
3) Create a rpm-package:
$ rpm -bb dummy-provides.spec
...
Wrote: /home/rpmer/RPM/RPMS/noarch/dummy-provides-0-alt2.noarch.rpm
4) Install the package ("-ihv" to install, "-Uhv" to upgrade):
$ sudo rpm -Uhv /home/rpmer/RPM/RPMS/noarch/dummy-provides-0-alt2.noarch.rpm
Based on the discussion in the mailing list, thanks everyone for help.