The lyx.spec file in the devel subdirectory is not up to date. 

The version number in the .spec file should be the correct lyx version.
That way one could simply build a binary rpm with 
  rpm -tb lyx-*.tar.gz
Is it possible to update the version number from the configure script?

Also, I have updated the .spec file with the following changes:
1) removed non-existent files from %doc section
2) made the install prefix customisable. [I like to install rpms in /usr
   not /usr/local, whioch was hard-coded in the .spec file]

I attach my .spec file.

Horst

%define ver      1.0.4pre8
%define rel      1
%define prefix   /usr

Summary:   A WYSIWYG frontend to LaTeX
Name:      lyx
Version:   %{ver}
Release:   %{rel}
Source:    ftp://ftp.lyx.org/pub/lyx/stable/lyx-%{PACKAGE_VERSION}.tar.gz
Copyright: GPL
Group:     X11/Applications/Publishing
Requires:  xforms >= 0.88, tetex-xdvi, tetex, tetex-latex
Packager:  Horst G. Kausch <[EMAIL PROTECTED]>
URL:       http://www.lyx.org
Buildroot: /var/tmp/lyx-%{PACKAGE_VERSION}-root
Docdir:    %{prefix}/doc

%description
LyX is a wordprocessor frontend to LaTeX, which gives both the
ease-of-use of a wordprocessor, and the flexibility and power of LaTeX.

%prep

%setup

%build

CXXFLAGS="$RPM_OPT_FLAGS" ./configure --with-included-gettext --prefix=%prefix
make

%install
#rename the installation root more appropriately
INST_ROOT=$RPM_BUILD_ROOT
rm -rf $INST_ROOT

make install prefix=$INST_ROOT%{prefix} 
 
cp -a images/lyx.xpm $INST_ROOT%{prefix}/share/lyx/images

strip $INST_ROOT%{prefix}/bin/lyx

# Have a copy of the reLyX README in the doc directory
cp lib/reLyX/README reLyX.README
%post
# 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 %{prefix}/share/lyx
./configure --srcdir

# Take care of leftover lyxrc in /etc
if [ -f /etc/lyxrc ]; then
    echo "Moving the old config file /etc/lyxrc to" 
    echo "%{prefix}/share/lyx/lyxrc-from-etc"
    echo "If you do not need it delete it."     
    mv /etc/lyxrc %{prefix}/share/lyx/lyxrc-from-etc
fi

%clean
#rename the installation root more appropriately
INST_ROOT=$RPM_BUILD_ROOT
rm -rf $INST_ROOT

%files
%doc ANNOUNCE CHANGES COPYING README
%doc ABOUT-NLS UPGRADING WHATSNEW  reLyX.README
%{prefix}/bin/*
%{prefix}/man/*/*
%{prefix}/share/lyx
%{prefix}/share/locale/*/LC_MESSAGES/lyx.mo

%changelog
* Mon Sep 27 1999 Horst G. Kausch <[EMAIL PROTECTED]>
- changed to 1.0.4pre8
  customisation of installation prefix
  updated %doc section

* Fri Apr 09 1999 Mate Wierdl <[EMAIL PROTECTED]>
- original spec file for 1.0.2

Reply via email to