you can find one for rh73 here (together with xforms-1.0):

http://vlugnet.org/apt/redhat/7.3/en/i386/RPMS.vlugrpms
and
http://vlugnet.org/apt/redhat/7.3/en/i386/SRPMS.vlugrpms for source rpm

this is also apt-get-able

source rpms should be fine for rh7.x and rh8 (and maybe others)
my spec file for lyx is attached (uses the icon from angus)

-- 
ronny
Summary: A WYSIWYM (What You See Is What You Mean) frontend to LaTeX
Name: lyx
Version: 1.2.2
Release: 2
License: GPL
Group: Applications/Publishing
Url: http://www.lyx.org/
Source0: ftp://ftp.lyx.org/pub/lyx/stable/lyx-%{version}.tar.gz
Source1: lyx.png
BuildRoot: %{_tmppath}/%{name}-root
Icon: lyx.xpm
BuildRequires: xforms-devel >= 1.0, tetex-fonts
Requires: tetex-xdvi, tetex, tetex-latex
Obsoletes: tetex-lyx
PreReq: perl

%description
LyX is a modern approach to writing documents which breaks with the
obsolete "typewriter paradigm" of most other document preparation
systems.

It is designed for people who want professional quality output
with a minimum of time and effort, without becoming specialists in
typesetting.

The major innovation in LyX is WYSIWYM (What You See Is What You Mean).
That is, the author focuses on content, not on the details of formatting.
This allows for greater productivity, and leaves the final typesetting
to the backends (like LaTeX) that are specifically designed for the task.

With LyX, the author can concentrate on the contents of his writing,
and let the computer take care of the rest.

%prep
%setup -q

%build
unset LINGUAS || true
ISTRING=--with-included-string
if gcc -v 2>&1 | grep -e "version 3.\(1\|2\)"; then ISTRING=; fi
CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" \
%configure --without-warnings $ISTRING
make
cat >lyx.desktop <<EOF
[Desktop Entry]
Name=LyX
Comment=A WYSIWYM document processor
Icon=%{_datadir}/lyx/images/lyx.png
Exec=lyx
Terminal=0
Type=Application
EOF

%install
unset LINGUAS || true
rm -rf ${RPM_BUILD_ROOT}
install -d -m 755 ${RPM_BUILD_ROOT}
make DESTDIR=${RPM_BUILD_ROOT} transform='' install

#
# Set up the lyx-specific class files where TeX can see them
#
TEXMF=%{_datadir}/texmf
mkdir -p ${RPM_BUILD_ROOT}${TEXMF}/tex/latex
mv ${RPM_BUILD_ROOT}%{_datadir}/lyx/tex \
      ${RPM_BUILD_ROOT}/${TEXMF}/tex/latex/lyx

#
# Miscellaneous files
#
cp -a lib/images/lyx.xpm ${RPM_BUILD_ROOT}%{_datadir}/lyx/images/
cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/lyx/images/
cp lib/reLyX/README README.reLyX

mkdir -p ${RPM_BUILD_ROOT}/etc/X11/applnk/Applications
cp lyx.desktop ${RPM_BUILD_ROOT}/etc/X11/applnk/Applications

%clean
rm -rf ${RPM_BUILD_ROOT}

%post
# Make TeX understand where LyX-specific packages are
texhash
# register fonts
[[ -n "$(which chkfontpath 2>/dev/null)" ]] && chkfontpath -a 
%{_datadir}/%{name}/xfonts

# Before configuring lyx for the local system
# PATH needs to be imported 
if [ -f /etc/profile ]; then 
    . /etc/profile
fi 
#
# Now configure LyX
#
echo "Configuring LyX for your system..."
cd %{_datadir}/lyx
./configure --srcdir

# Fix reLyX perl program if the prefix is non-standard
if [ "%{_prefix}" != "/usr" ]
then
    perl -pi -e "s!/usr/share/lyx!%{_datadir}/lyx!" \
        %{_bindir}/reLyX
fi

%postun
# Fix the TeX file hash
#
texhash
# unregister fonts
[[ -n "$(which chkfontpath 2>/dev/null)" ]] && chkfontpath -r 
%{_datadir}/%{name}/xfonts

%files
%defattr(-,root,root)
%doc ABOUT-NLS ANNOUNCE COPYING
%doc README UPGRADING ChangeLog NEWS
%doc lib/CREDITS README.reLyX
%config(noreplace) %attr(644,root,root) /etc/X11/applnk/Applications/lyx.desktop
%{_bindir}/*
%{_mandir}/man?/*
%{_datadir}/locale/*/LC_MESSAGES/*
%{_datadir}/%{name}
%{_datadir}/texmf/tex/latex/%{name}

%changelog
* Wed Dec 18 2002 Ronny Buchmann <[EMAIL PROTECTED]> 1.2.2-2
- remove '"' from desktop file
- change Group
- desktop file as config file

* Tue Dec 17 2002 Ronny Buchmann <[EMAIL PROTECTED]> 1.2.2-1
- update to 1.2.2
- add desktop file

* Fri Aug 23 2002 Ronny Buchmann <[EMAIL PROTECTED]> 1.2.1-2
- fix font registration

* Fri Aug 23 2002 Ronny Buchmann <[EMAIL PROTECTED]> 1.2.1-1
- cleanup spec file
- add xfonts if xfs is installed

Reply via email to