]> git.lyx.org Git - lyx.git/blobdiff - development/lyx.spec.in
John's external material patch
[lyx.git] / development / lyx.spec.in
index 6a06828ffe46e11720af852b356e11a0e31e5207..1ebe32a8a383bea0bc5a07587e962269b5ec6cc8 100644 (file)
@@ -37,8 +37,18 @@ place that the Redhat tetex package is installed and would see it.
 
 %build
 unset LINGUAS || true
-CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr 
-make
+CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" \
+./configure --prefix=/usr --without-warnings --with-included-string
+# The following check is to ensure that lyx RPMs generated on RH 6.X machines
+# with gcc-2.95 still run against older Redhat OS/compiler combinations.
+# It will eventually be ripped out.
+if [ -r /usr/lib/libstdc++-libc6.1-1.so.2 ]
+then
+       make CXX=gcc LYX_LIBS='/usr/lib/libstdc++-libc6.1-1.so.2 -lforms -lXpm'
+else
+       make
+fi
+
 
 %install
 unset LINGUAS || true
@@ -58,7 +68,7 @@ cp -r ${RPM_BUILD_ROOT}/usr/share/lyx/tex \
 #
 # Miscellaneous files
 #
-cp -a images/lyx.xpm ${RPM_BUILD_ROOT}/usr/share/lyx/images/
+cp -a lib/images/lyx.xpm ${RPM_BUILD_ROOT}/usr/share/lyx/images/
 cp lib/reLyX/README README.reLyX
 
 %clean
@@ -77,6 +87,13 @@ echo "Configuring LyX for your system..."
 cd $RPM_INSTALL_PREFIX/share/lyx
 ./configure --srcdir
 
+# Fix reLyX perl program if the prefix is non-standard
+if [ "$RPM_INSTALL_PREFIX" != "/usr" ]
+then
+    perl -pi -e "s!/usr/share/lyx!$RPM_INSTALL_PREFIX/share/lyx!" \
+        ${RPM_INSTALL_PREFIX}/bin/reLyX
+fi
+
 %post -n tetex-lyx
 # Fix the TeX file hash
 #