rpms/xemacs/devel xemacs-21.5.28-destdir.patch, NONE, 1.1 xemacs.spec, 1.35, 1.36

Ville Skytta (scop) fedora-extras-commits at redhat.com
Wed Jun 6 21:26:55 UTC 2007


Author: scop

Update of /cvs/pkgs/rpms/xemacs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19769

Modified Files:
	xemacs.spec 
Added Files:
	xemacs-21.5.28-destdir.patch 
Log Message:
* Wed Jun  6 2007 Ville Skyttä <ville.skytta at iki.fi> - 21.5.28-2
- Set more dirs explicitly until upstream configure honors them better.
- Borrow DESTDIR install patch from openSUSE.
- Add pkgconfig file to -devel.


xemacs-21.5.28-destdir.patch:

--- NEW FILE xemacs-21.5.28-destdir.patch ---
diff -ru xemacs-21.5.24.orig/Makefile.in.in xemacs-21.5.24/Makefile.in.in
--- xemacs-21.5.24.orig/Makefile.in.in	2005-12-27 18:11:00.000000000 +0100
+++ xemacs-21.5.24/Makefile.in.in	2005-12-27 19:00:48.000000000 +0100
@@ -61,6 +61,8 @@
 RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@
 #endif
 
+DESTDIR=
+
 SHELL = /bin/sh
 LANG = C
 LC_ALL = C
@@ -382,35 +384,35 @@
 	(cd ./$${subdir} && $(MAKE) $(RECURSIVE_MAKE_ARGS) install prefix=${prefix} \
 	    exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
 	    archlibdir=${archlibdir}) ; done
-	if test "`(cd ${archlibdir} && $(pwd))`" != \
+	if test "`(cd $(DESTDIR)${archlibdir} && $(pwd))`" != \
 		"`(cd ./lib-src && $(pwd))`"; then \
 	   if test -f ../Installation; then \
-		${INSTALL_DATA} ../Installation ${archlibdir}/Installation; \
+		${INSTALL_DATA} ../Installation $(DESTDIR)${archlibdir}/Installation; \
 	   fi; \
-	   ${INSTALL_DATA} lib-src/config.values ${docdir}/config.values; \
-	   ${INSTALL_DATA} lib-src/DOC ${docdir}/DOC; \
+	   ${INSTALL_DATA} lib-src/config.values $(DESTDIR)${docdir}/config.values; \
+	   ${INSTALL_DATA} lib-src/DOC $(DESTDIR)${docdir}/DOC; \
 	   for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \
 	     do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \
 	else true; fi
 #if (defined(PDUMP) && !defined (DUMP_IN_EXEC)) || (defined (PDUMP) && defined(WIN32_NATIVE))
-	${INSTALL_DATA} src/${PROGNAME}.dmp ${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp
+	${INSTALL_DATA} src/${PROGNAME}.dmp $(DESTDIR)${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp
 #endif
 #ifdef WIN32_NATIVE
-	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}
-	-chmod 0755 ${bindir}/${PROGNAME}
+	${INSTALL_PROGRAM} src/${PROGNAME} $(DESTDIR)${bindir}/${PROGNAME}
+	-chmod 0755 $(DESTDIR)${bindir}/${PROGNAME}
 #else
 # ifdef CYGWIN
-	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe
-	-chmod 0755 ${bindir}/${PROGNAME}-${version}.exe
-	cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME}
+	${INSTALL_PROGRAM} src/${PROGNAME} $(DESTDIR)${bindir}/${PROGNAME}-${version}.exe
+	-chmod 0755 $(DESTDIR)${bindir}/${PROGNAME}-${version}.exe
+	cd $(DESTDIR)${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME}
 # else
-	${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}
-	-chmod 0755 ${bindir}/${PROGNAME}-${version}
-	cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
+	${INSTALL_PROGRAM} src/${PROGNAME} $(DESTDIR)${bindir}/${PROGNAME}-${version}
+	-chmod 0755 $(DESTDIR)${bindir}/${PROGNAME}-${version}
+	cd $(DESTDIR)${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
 # endif /* CYGWIN */
 #endif /* WIN32_NATIVE */
 	if test "${prefix}" != "${exec_prefix}"; then \
-	  $(MAKEPATH) ${exec_prefix}/lib/${instvardir}; \
+	  $(MAKEPATH) $(DESTDIR)${exec_prefix}/lib/${instvardir}; \
 	  for dir in \
 		lib/${inststaticdir} \
 	 	lib/${instvardir}/etc \
@@ -421,13 +423,13 @@
 	  done; \
 	fi
 #ifdef HAVE_SHLIB
-	$(INSTALL_DATA) $(srcdir)/modules/auto-autoloads.* $(moduledir)
+	$(INSTALL_DATA) $(srcdir)/modules/auto-autoloads.* $(DESTDIR)$(moduledir)
 #endif
 
 install-arch-indep: mkdir info
 	- at set ${COPYDESTS} ; \
 	 for dir in ${COPYDIR} ; do \
-	   if test "`(cd $$1 && $(pwd))`" != \
+	   if test "`(cd $(DESTDIR)$$1 && $(pwd))`" != \
 		   "`(cd $${dir} && $(pwd))`"; then \
 	     : do nothing - echo "rm -rf $$1" ; \
 	   fi ; \
@@ -435,35 +437,35 @@
 	 done
 	-set ${COPYDESTS} ; \
 	 for dir in ${COPYDESTS} ; do \
-	   if test ! -d $${dir} ; then mkdir $${dir} ; fi ; \
+	   if test ! -d $${dir} ; then mkdir $(DESTDIR)$${dir} ; fi ; \
 	 done ; \
 	 for dir in ${COPYDIR} ; do \
 	   dest=$$1 ; shift ; \
 	   test -d $${dir} \
 	     -a "`(cd $${dir} && $(pwd))`" != \
-		"`(cd $${dest} && $(pwd))`" \
+		"`(cd $(DESTDIR)$${dest} && $(pwd))`" \
 	   && (echo "Copying $${dir}..." ; \
 	       (cd $${dir} && $(TAR) -cf - . ) | \
-		(cd $${dest} && umask 022 && $(TAR) -xf - );\
-	       chmod 0755 $${dest}; \
-	       for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
+		(cd $(DESTDIR)$${dest} && umask 022 && $(TAR) -xf - );\
+	       chmod 0755 $(DESTDIR)$${dest}; \
+	       for subdir in `find $(DESTDIR)$${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
 		 (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; \
 	       done) ; \
 	 done
 	if test "`(cd ${srcdir}/info && $(pwd))`" != \
-		"`(cd ${infodir} && $(pwd))`" && cd ${srcdir}/info; then \
-	  if test ! -f ${infodir}/dir -a -f dir ; then \
-	    ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir ; \
+		"`(cd $(DESTDIR)${infodir} && $(pwd))`" && cd ${srcdir}/info; then \
+	  if test ! -f $(DESTDIR)${infodir}/dir -a -f dir ; then \
+	    ${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir ; \
 	  fi ; \
 	  for file in *.info* ; do \
-	    ${INSTALL_DATA} $${file} ${infodir}/$${file} ; \
-	    chmod 0644 ${infodir}/$${file}; \
+	    ${INSTALL_DATA} $${file} $(DESTDIR)${infodir}/$${file} ; \
+	    chmod 0644 $(DESTDIR)${infodir}/$${file}; \
 	  done ; \
 	fi
 	cd ${srcdir}/etc && \
 	  for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \
-	    ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
-	    chmod 0644 ${mandir}/$${page}${manext} ; \
+	    ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 $(DESTDIR)${mandir}/$${page}${manext} ; \
+	    chmod 0644 $(DESTDIR)${mandir}/$${page}${manext} ; \
 	  done
 	@echo "If you would like to save approximately 4M of disk space, do"
 	@echo "make gzip-el"
@@ -473,19 +475,23 @@
 	@echo "${lispdir}"
 
 gzip-el:
-	$(SHELL) ${srcdir}/lib-src/gzip-el.sh ${lispdir}
+	$(SHELL) ${srcdir}/lib-src/gzip-el.sh $(DESTDIR)${lispdir}
 
 ## Build all the directories to install XEmacs in.
 ## Since we may be creating several layers of directories,
 ## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use
 ## make-path instead of mkdir.  Not all mkdirs have the `-p' flag.
 mkdir: FRC.mkdir
-	${MAKEPATH} ${COPYDESTS} ${docdir} ${infodir} ${archlibdir} \
-	  ${mandir} ${bindir} ${datadir} ${libdir} \
+	for dir in \
+	    ${COPYDESTS} ${docdir} ${infodir} ${archlibdir} \
+	    ${mandir} ${bindir} ${datadir} ${libdir} \
 #ifdef HAVE_SHLIB
-	  ${moduledir} ${sitemoduledir} \
+	    ${moduledir} ${sitemoduledir} \
 #endif
-	  ${sitelispdir}
+	    ${sitelispdir} ; \
+	do \
+	    ${MAKEPATH} $(DESTDIR)$${dir} ; \
+	done ;
 
 ## Delete all the installed files that the `install' target would
 ## create (but not the noninstalled files such as `make all' would
diff -ru xemacs-21.5.24.orig/dynodump/Makefile.in.in xemacs-21.5.24/dynodump/Makefile.in.in
--- xemacs-21.5.24.orig/dynodump/Makefile.in.in	2005-12-27 18:11:04.000000000 +0100
+++ xemacs-21.5.24/dynodump/Makefile.in.in	2005-12-27 19:00:48.000000000 +0100
@@ -22,6 +22,8 @@
 
 ## Synched up with: Not synched with FSF.
 
+DESTDIR=
+
 ## For performance and consistency, no built-in rules.
 .SUFFIXES:
 .SUFFIXES: .c .o .i .h
diff -ru xemacs-21.5.24.orig/etc/tests/external-widget/Makefile xemacs-21.5.24/etc/tests/external-widget/Makefile
--- xemacs-21.5.24.orig/etc/tests/external-widget/Makefile	1996-12-18 23:42:31.000000000 +0100
+++ xemacs-21.5.24/etc/tests/external-widget/Makefile	2005-12-27 19:00:48.000000000 +0100
@@ -1,3 +1,5 @@
+DESTDIR=
+
 CFLAGS += -Xc -g -DTOOLTALK
 EMACSHOME = ../../..
 EMACSLIBDIR = $(EMACSHOME)/editor/src
diff -ru xemacs-21.5.24.orig/lib-src/Makefile.in.in xemacs-21.5.24/lib-src/Makefile.in.in
--- xemacs-21.5.24.orig/lib-src/Makefile.in.in	2005-12-27 18:11:23.000000000 +0100
+++ xemacs-21.5.24/lib-src/Makefile.in.in	2005-12-27 19:00:48.000000000 +0100
@@ -24,6 +24,8 @@
 ## above a certain point in this file are in shell format instead of
 ## in C format.  How the hell is this supposed to work? */
 
+DESTDIR=
+
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .h .o
@@ -244,26 +246,26 @@
 ## just run them directly from lib-src.
 ${archlibdir}: all
 	@echo; echo "Installing utilities run internally by XEmacs."
-	./make-path ${archlibdir}
+	./make-path $(DESTDIR)${archlibdir}
 	if test "`(cd ${archlibdir} && $(pwd))`" != "`$(pwd)`"; then \
 	  for f in ${PRIVATE_INSTALLABLE_EXES}; do \
-	    (cd .. && $(INSTALL_PROGRAM) lib-src/$$f ${archlibdir}/$$f) ; \
+	    (cd .. && $(INSTALL_PROGRAM) lib-src/$$f $(DESTDIR)${archlibdir}/$$f) ; \
 	  done ; \
 	fi
 	if test "`(cd ${archlibdir} && $(pwd))`" \
 	     != "`(cd ${srcdir}     && $(pwd))`"; then \
 	  for f in ${PRIVATE_INSTALLABLE_SCRIPTS}; do \
-	    (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$f ${archlibdir}/$$f); \
+	    (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$f $(DESTDIR)${archlibdir}/$$f); \
 	  done ; \
 	fi
 
 install: ${archlibdir}
 	@echo; echo "Installing utilities for users to run."
 	for file in ${PUBLIC_INSTALLABLE_EXES} ; do \
-	  (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
+	  (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} $(DESTDIR)${bindir}/$${file}) ; \
 	done
 	for file in ${PUBLIC_INSTALLABLE_SCRIPTS} ; do \
-	  (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \
+	  (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$${file} $(DESTDIR)${bindir}/$${file}) ; \
 	done
 
 uninstall:
diff -ru xemacs-21.5.24.orig/lwlib/Makefile.in.in xemacs-21.5.24/lwlib/Makefile.in.in
--- xemacs-21.5.24.orig/lwlib/Makefile.in.in	2005-12-27 18:11:45.000000000 +0100
+++ xemacs-21.5.24/lwlib/Makefile.in.in	2005-12-27 19:00:48.000000000 +0100
@@ -22,6 +22,8 @@
 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ## Boston, MA 02111-1307, USA.
 
+DESTDIR=
+
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .h .o .i .s
diff -ru xemacs-21.5.24.orig/man/Makefile xemacs-21.5.24/man/Makefile
--- xemacs-21.5.24.orig/man/Makefile	2005-12-27 18:11:52.000000000 +0100
+++ xemacs-21.5.24/man/Makefile	2005-12-27 19:00:48.000000000 +0100
@@ -20,6 +20,8 @@
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+DESTDIR=
+
 SHELL    = /bin/sh
 MAKEINFO = makeinfo
 TEXI2DVI = texi2dvi
diff -ru xemacs-21.5.24.orig/modules/base64/Makefile xemacs-21.5.24/modules/base64/Makefile
--- xemacs-21.5.24.orig/modules/base64/Makefile	2001-04-12 20:22:33.000000000 +0200
+++ xemacs-21.5.24/modules/base64/Makefile	2005-12-27 19:00:48.000000000 +0100
@@ -7,6 +7,8 @@
 # 'installed'.
 #
 
+DESTDIR=
+
 SHELL=/bin/sh
 RM=rm -f
 CC=../../lib-src/ellcc
diff -ru xemacs-21.5.24.orig/modules/common/Makefile.common xemacs-21.5.24/modules/common/Makefile.common
--- xemacs-21.5.24.orig/modules/common/Makefile.common	2005-12-27 18:11:58.000000000 +0100
+++ xemacs-21.5.24/modules/common/Makefile.common	2005-12-27 19:01:49.000000000 +0100
@@ -31,6 +31,8 @@
 #define NOT_C_CODE
 #include "../../src/config.h"
 
+DESTDIR=
+
 SHELL=/bin/sh
 RM=rm -f
 PROGNAME=@PROGNAME@
@@ -98,7 +100,7 @@
 	-$(RM) *~ \#*
 
 install: $(OBJECT_TO_BUILD)
-	$(INSTALL_PROGRAM) $< $(INSTALLPATH)
+	$(INSTALL_PROGRAM) $< $(DESTDIR)$(INSTALLPATH)
 
 ##
 ## Local Variables:
diff -ru xemacs-21.5.24.orig/modules/zlib/Makefile xemacs-21.5.24/modules/zlib/Makefile
--- xemacs-21.5.24.orig/modules/zlib/Makefile	2001-04-12 20:22:40.000000000 +0200
+++ xemacs-21.5.24/modules/zlib/Makefile	2005-12-27 19:00:48.000000000 +0100
@@ -8,6 +8,8 @@
 # 'installed'.
 #
 
+DESTDIR=
+
 SHELL=/bin/sh
 RM=rm -f
 CC=../../lib-src/ellcc
diff -ru xemacs-21.5.24.orig/netinstall/Makefile.in.in xemacs-21.5.24/netinstall/Makefile.in.in
--- xemacs-21.5.24.orig/netinstall/Makefile.in.in	2005-12-27 18:11:58.000000000 +0100
+++ xemacs-21.5.24/netinstall/Makefile.in.in	2005-12-27 19:00:48.000000000 +0100
@@ -14,6 +14,8 @@
 ##
 ## Makefile for Cygwin installer
 
+DESTDIR=
+
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .cc .h .o
@@ -172,7 +174,7 @@
 install:
 	@echo; echo "Installing net setup."
 	for file in ${INSTALLABLES} ; do \
-	  (cd .. && $(INSTALL_PROGRAM) netinstall/$${file} ${bindir}/$${file}) ; \
+	  (cd .. && $(INSTALL_PROGRAM) netinstall/$${file} $(DESTDIR)${bindir}/$${file}) ; \
 	done
 
 version.c : $(srcdir)/ChangeLog Makefile
diff -ru xemacs-21.5.24.orig/src/Makefile.in.in xemacs-21.5.24/src/Makefile.in.in
--- xemacs-21.5.24.orig/src/Makefile.in.in	2005-12-27 18:12:02.000000000 +0100
+++ xemacs-21.5.24/src/Makefile.in.in	2005-12-27 19:00:48.000000000 +0100
@@ -39,6 +39,8 @@
 RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@
 #endif
 
+DESTDIR=
+
 PROGNAME=@PROGNAME@
 prefix=@prefix@
 SRC=@srcdir@
@@ -1068,7 +1070,7 @@
 #ifdef HAVE_SHLIB
 MAKEPATH=../lib-src/make-path
 install: $(PROGNAME)
-	$(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s
+	$(MAKEPATH) $(DESTDIR)$(archlibdir)/include $(DESTDIR)$(archlibdir)/include/m $(DESTDIR)$(archlibdir)/include/s
 	- at echo "Copying include files for ellcc..."
 	- at hdir=`pwd`; \
 	cd $(SRC); hdrdir2=`pwd`; cd $$hdir; \
@@ -1082,12 +1084,12 @@
 		test -d s && hdrtars="$$hdrtars s/*"; \
 		test -d m && hdrtars="$$hdrtars m/*"; \
 		test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
-			(cd $(archlibdir)/include && umask 022 && tar xf -); \
-		chmod 755 $(archlibdir)/include; \
-		test -d $(archlibdir)/include/s && \
-		  chmod 755 $(archlibdir)/include/s; \
-		test -d $(archlibdir)/include/m && \
-		  chmod 755 $(archlibdir)/include/s;) \
+			(cd $(DESTDIR)$(archlibdir)/include && umask 022 && tar xf -); \
+		chmod 755 $(DESTDIR)$(archlibdir)/include; \
+		test -d $(DESTDIR)$(archlibdir)/include/s && \
+		  chmod 755 $(DESTDIR)$(archlibdir)/include/s; \
+		test -d $(DESTDIR)$(archlibdir)/include/m && \
+		  chmod 755 $(DESTDIR)$(archlibdir)/include/s;) \
 	done)
 #endif
 
diff -ru xemacs-21.5.24.orig/tests/tooltalk/Makefile xemacs-21.5.24/tests/tooltalk/Makefile
--- xemacs-21.5.24.orig/tests/tooltalk/Makefile	1996-12-18 23:44:15.000000000 +0100
+++ xemacs-21.5.24/tests/tooltalk/Makefile	2005-12-27 19:00:48.000000000 +0100
@@ -12,6 +12,8 @@
 
 ### Code:
 
+DESTDIR=
+
 CC       = cc -Xc
 CPPFLAGS = -I/usr/openwin/include
 CFLAGS   = -g -v -DNeedFunctionPrototypes


Index: xemacs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xemacs/devel/xemacs.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- xemacs.spec	21 May 2007 15:16:54 -0000	1.35
+++ xemacs.spec	6 Jun 2007 21:26:20 -0000	1.36
@@ -16,10 +16,11 @@
 %endif
 
 %define xver    %(echo %{version} | sed -e 's/\\.\\([0-9]\\+\\)$/-b\\1/')
+%define xbuild  %(echo %{_build} | sed -e 's/^\\([^-]*-[^-]*-[^-]*\\).*/\\1/')
 
 Name:           xemacs
 Version:        21.5.28
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Different version of Emacs
 
 Group:          Applications/Editors
@@ -42,9 +43,11 @@
 Patch6:         %{name}-21.5.26-gtk-gcc4.patch
 Patch7:         %{name}-21.5.27-finder-lisp-dir.patch
 Patch8:         %{name}-21.5.28-courier-default.patch
+Patch9:         %{name}-21.5.28-destdir.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+BuildRequires:  autoconf
 BuildRequires:  sed >= 3.95
 BuildRequires:  texinfo
 BuildRequires:  ncurses-devel
@@ -163,6 +166,7 @@
 Summary:        Development files for XEmacs
 Group:          Development/Libraries
 Requires:       %{name} = %{version}-%{release}
+Requires:       pkgconfig
 
 %description    devel
 XEmacs is a highly customizable open source text editor and
@@ -192,9 +196,12 @@
 %patch6 -p1
 %patch7 -p0
 %patch8 -p0
+%patch9 -p1
 
 sed -i -e 's/"lib"/"%{_lib}"/' lisp/setup-paths.el
 
+autoconf --force # for DESTDIR patch
+
 for f in man/lispref/mule.texi man/xemacs-faq.texi CHANGES-beta ; do
     iconv -f iso-8859-1 -t utf-8 -o $f.utf8 $f ; mv $f.utf8 $f
 done
@@ -212,12 +219,16 @@
 export CFLAGS
 export EMACSLOADPATH=$PWD/lisp:$PWD/lisp/mule
 
-# For some reason --prefix=/usr (from %%configure) results in etc and lisp
-# being installed in %{_datadir}/xemacs-%{xver} but XEmacs trying to find
-# them in /usr/{etc,lisp}, and --with-prefix=no doesn't help - upstream bug?
-# Let's just override prefix here for now to work around this.
+# The --with-*dir args can probably go away in the future if/when upstream
+# configure learns to honor standard autofoo dirs better.
 common_options="
-    --prefix=%{_datadir}/xemacs-%{xver}
+    --mandir=%{_mandir}/man1
+    --with-archlibdir=%{_libdir}/xemacs-%{xver}/%{xbuild}
+%if %{with modules}
+    --with-moduledir=%{_libdir}/xemacs-%{xver}/%{xbuild}/modules
+%endif
+    --with-lispdir=%{_datadir}/xemacs-%{xver}/lisp
+    --with-etcdir=%{_datadir}/xemacs-%{xver}/etc
     --with-system-packages=%{_datadir}/xemacs
     --without-msw
 %if %{with mule}
@@ -285,6 +296,23 @@
 
 make EMACSDEBUGPATHS=yes # toplevel parallel make fails
 
+cat << \EOF > xemacs.pc
+prefix=%{_prefix}
+%if %{with modules}
+includedir=%{_libdir}/xemacs-%{xver}/%{xbuild}/include
+sitemoduledir=%{_libdir}/xemacs/site-modules
+%endif
+sitestartdir=%{_datadir}/xemacs/site-packages/lisp/site-start.d
+sitepkglispdir=%{_datadir}/xemacs/site-packages/lisp
+
+Name: xemacs
+Description: Different version of Emacs
+Version: %{version}
+%if %{with modules}
+Cflags: -I${includedir}
+%endif
+EOF
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -294,10 +322,7 @@
 for file in lib-src/*-mindep ; do cp $file ${file%%-mindep} ; done
 %endif
 
-# note: no DESTDIR support
-%makeinstall \
-    mandir=$RPM_BUILD_ROOT%{_mandir}/man1 \
-    docdir=$RPM_BUILD_ROOT%{_libdir}/xemacs-%{xver}/doc
+make install DESTDIR=$RPM_BUILD_ROOT
 
 %if %{with nox}
 # install nox files
@@ -354,7 +379,7 @@
 
 # clean up unneeded stuff (TODO: there's probably much more)
 find $RPM_BUILD_ROOT%{_prefix} -name "*~" | xargs -r rm
-rm $RPM_BUILD_ROOT%{_libdir}/xemacs-%{xver}/*linux/gzip-el.sh
+rm $RPM_BUILD_ROOT%{_libdir}/xemacs-%{xver}/%{xbuild}/gzip-el.sh
 rm $RPM_BUILD_ROOT{%{_bindir}/gnuattach,%{_mandir}/man1/gnuattach.1}
 cd $RPM_BUILD_ROOT%{_datadir}/xemacs-%{xver}/etc
 rm -r editclient.sh InstallGuide sparcworks tests XKeysymDB *.sco *.1
@@ -383,6 +408,8 @@
 cat el-*.files >> el-files
 cat info.files >> info-files
 
+install -Dpm 644 xemacs.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/xemacs.pc
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -443,7 +470,7 @@
 %{_libdir}/xemacs-%{xver}/doc/
 %if %{with modules}
 %if %{with mule}
-%{_libdir}/xemacs-%{xver}/*linux/modules/canna_api.ell
+%{_libdir}/xemacs-%{xver}/%{xbuild}/modules/canna_api.ell
 %endif
 %endif
 %{_datadir}/applications/*-%{name}.desktop
@@ -467,15 +494,15 @@
 %doc etc/editclient.sh
 %{_bindir}/etags.xemacs
 %{_bindir}/ootags
-%dir %{_libdir}/xemacs-%{xver}
-%dir %{_libdir}/xemacs-%{xver}/*linux/
-%{_libdir}/xemacs-%{xver}/*linux/[acdfghprsvwy]*
-%{_libdir}/xemacs-%{xver}/*linux/m[am]*
-%{_libdir}/xemacs-%{xver}/*linux/movemail
+%dir %{_libdir}/xemacs-%{xver}/
+%dir %{_libdir}/xemacs-%{xver}/%{xbuild}/
+%{_libdir}/xemacs-%{xver}/%{xbuild}/[acdfghprsvwy]*
+%{_libdir}/xemacs-%{xver}/%{xbuild}/m[am]*
+%{_libdir}/xemacs-%{xver}/%{xbuild}/movemail
 %if %{with modules}
 %{_libdir}/xemacs/
-%dir %{_libdir}/xemacs-%{xver}/*linux/modules/
-%{_libdir}/xemacs-%{xver}/*linux/modules/auto-autoloads.elc
+%dir %{_libdir}/xemacs-%{xver}/%{xbuild}/modules/
+%{_libdir}/xemacs-%{xver}/%{xbuild}/modules/auto-autoloads.elc
 %endif
 %config(noreplace) %{_sysconfdir}/skel/.xemacs/
 %{_mandir}/man1/etags.xemacs.1*
@@ -486,22 +513,28 @@
 %files el -f el-files
 %defattr(-,root,root,-)
 %if %{with modules}
-%{_libdir}/xemacs-%{xver}/*linux/modules/auto-autoloads.el
+%{_libdir}/xemacs-%{xver}/%{xbuild}/modules/auto-autoloads.el
 %endif
 
 %files info -f info-files
 %defattr(-,root,root,-)
 %{_infodir}/*.info*
 
-%if %{with modules}
 %files devel
 %defattr(-,root,root,-)
+%if %{with modules}
 %{_bindir}/ellcc
-%{_libdir}/xemacs-%{xver}/*linux/include/
+%{_libdir}/xemacs-%{xver}/%{xbuild}/include/
 %endif
+%{_libdir}/pkgconfig/xemacs.pc
 
 
 %changelog
+* Wed Jun  6 2007 Ville Skyttä <ville.skytta at iki.fi> - 21.5.28-2
+- Set more dirs explicitly until upstream configure honors them better.
+- Borrow DESTDIR install patch from openSUSE.
+- Add pkgconfig file to -devel.
+
 * Mon May 21 2007 Ville Skyttä <ville.skytta at iki.fi> - 21.5.28-1
 - 21.5.28, module path fix applied upstream.
 - Patch to retain courier as the default font.




More information about the fedora-extras-commits mailing list