Jean-Marc Lasgouttes wrote:

> Here is a simple untested patch against 1.3.5cvs to remove
> dependencies. I would appreciate if it could be tested on all the
> different rpm based distributions.

Here comes the equivalent for 1.4 + a small change that enables rpms with
version suffix. Right now, specfiles built with

./configure --version-suffix=xyz

are broken. I'll apply this soon.


Georg
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.978
diff -u -r1.978 ChangeLog
--- ChangeLog	8 Oct 2004 12:12:21 -0000	1.978
+++ ChangeLog	11 Oct 2004 14:59:49 -0000
@@ -1,3 +1,7 @@
+2004-10-11  Georg Baum  <[EMAIL PROTECTED]>
+
+	* configure.ac: remove RPM_FRONTEND_DEPS
+
 2004-10-07  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* configure.ac: make maintainer mode active by default for
Index: configure.ac
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.27
diff -u -r1.27 configure.ac
--- configure.ac	8 Oct 2004 12:12:21 -0000	1.27
+++ configure.ac	11 Oct 2004 14:59:49 -0000
@@ -177,7 +177,6 @@
 	  FRONTENDS_PROGS="$FRONTENDS_PROGS lyx-xforms\$(EXEEXT)"
 	  FRONTENDS_SUBDIRS="$FRONTENDS_SUBDIRS xforms"
 	  RPM_FRONTEND="xforms"
-	  RPM_FRONTEND_DEPS='libforms >= 1.0'
 	  FRONTEND_INFO="${FRONTEND_INFO}\
   XForms Frontend:\n\
       libXpm version:\t\t${XPM_VERSION}\n\
@@ -200,7 +199,6 @@
 	  FRONTENDS_PROGS="$FRONTENDS_PROGS lyx-gtk\$(EXEEXT)"
 	  FRONTENDS_SUBDIRS="$FRONTENDS_SUBDIRS gtk"
 	  RPM_FRONTEND="gtk"
-	  RPM_FRONTEND_DEPS='gtkmm >= 2.4.0'
 	  GTKMM_VERSION=`pkg-config --modversion gtkmm-2.4`
 	  LIBGLADEMM_VERSION=`pkg-config --modversion libglademm-2.4`
 	  FRONTEND_INFO="${FRONTEND_INFO}\
@@ -214,7 +212,6 @@
 	  FRONTENDS_PROGS="$FRONTENDS_PROGS lyx-qt\$(EXEEXT)"
 	  FRONTENDS_SUBDIRS="$FRONTENDS_SUBDIRS qt2"
 	  RPM_FRONTEND="qt"
-	  RPM_FRONTEND_DEPS='qt >= 2.2.1'
 	  FRONTEND_INFO="${FRONTEND_INFO}\
   Qt Frontend:\n\
       Qt version:\t\t${QT_VERSION}\n"
@@ -319,7 +316,6 @@
 
 AC_SUBST(VERSION_INFO)
 AC_SUBST(RPM_FRONTEND)
-AC_SUBST(RPM_FRONTEND_DEPS)
 
 ## Some config.h stuff
 
Index: config/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v
retrieving revision 1.140
diff -u -r1.140 ChangeLog
--- config/ChangeLog	8 Oct 2004 12:12:22 -0000	1.140
+++ config/ChangeLog	11 Oct 2004 14:59:50 -0000
@@ -1,3 +1,7 @@
+2004-10-11  Georg Baum  <[EMAIL PROTECTED]>
+
+	* lyxinclude.m4: set new variable RPM_VERSION_SUFFIX
+
 2004-10-07  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* lyxinclude.m4 (LYX_CHECK_VERSION): simplify
Index: config/lyxinclude.m4
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.96
diff -u -r1.96 lyxinclude.m4
--- config/lyxinclude.m4	8 Oct 2004 12:12:22 -0000	1.96
+++ config/lyxinclude.m4	11 Oct 2004 14:59:50 -0000
@@ -37,8 +37,10 @@
      ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"`
    fi
    lyxname="lyx$withval"
-   program_suffix=$withval],
+   program_suffix=$withval
+   RPM_VERSION_SUFFIX="--with-version-suffix=$withval"],
   [lyxname=lyx])
+AC_SUBST(RPM_VERSION_SUFFIX)
 AC_MSG_RESULT([$lyxname])
 ])
 
Index: development/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/ChangeLog,v
retrieving revision 1.46
diff -u -r1.46 ChangeLog
--- development/ChangeLog	10 Oct 2004 17:17:09 -0000	1.46
+++ development/ChangeLog	11 Oct 2004 14:59:50 -0000
@@ -1,3 +1,9 @@
+2004-10-11  Georg Baum  <[EMAIL PROTECTED]>
+
+	* lyx.spec.in: fix spec file if it is generated by
+	configure --with-version-suffix
+	* lyx.spec.in: remove dependencies
+
 2004-10-10  José Matos  <[EMAIL PROTECTED]>
 
 	* FORMAT: document change to format 237.
Index: development/lyx.spec.in
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/lyx.spec.in,v
retrieving revision 1.19
diff -u -r1.19 lyx.spec.in
--- development/lyx.spec.in	20 Feb 2003 20:45:22 -0000	1.19
+++ development/lyx.spec.in	11 Oct 2004 14:59:50 -0000
@@ -1,5 +1,5 @@
 %define frontend @RPM_FRONTEND@
-%define frontdep @RPM_FRONTEND_DEPS@
+%define version_suffix @RPM_VERSION_SUFFIX@
 
 Summary: A WYSIWYM (What You See Is What You Mean) frontend to LaTeX
 Name: @PACKAGE@
@@ -13,7 +13,6 @@
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 Icon: %{name}.xpm
 Prefix: %{_prefix}
-Requires: %{frontdep}, tetex-xdvi, tetex, tetex-latex
 Obsoletes: tetex-lyx
 
 %description
@@ -42,7 +41,8 @@
 unset LINGUAS || true
 ./configure --with-frontend=%{frontend} --prefix=%{_prefix} \
 	--mandir=%{_mandir} --bindir=%{_bindir} --datadir=%{_datadir} \
- 	--without-warnings --disable-debug --enable-optimization=-O2
+ 	--without-warnings --disable-debug --enable-optimization=-O2 \
+	%{version_suffix}
 make
 
 %install
@@ -63,7 +63,8 @@
 #
 # Miscellaneous files
 #
-cp -a lib/images/%{name}.xpm ${RPM_BUILD_ROOT}%{_datadir}/%{name}/images/
+# Don't use %{name}.xpm, this will not work with --version-suffix
+cp -a lib/images/lyx.xpm ${RPM_BUILD_ROOT}%{_datadir}/%{name}/images/
 cp lib/reLyX/README README.reLyX
 
 %clean

Reply via email to