[mod_python] rpm-packaging and DESTDIR

Mads Kiilerich Mads at Kiilerich.com
Thu Dec 28 14:19:02 EST 2000


Hello,

I'm hacking the RedHat RPM specs.

First, I've found that 
	./configure --prefix=something 
has no effect at all. It should either be fixed or removed from
the documentation.

For RPM packaging installation in another directory than the one
compiled for is essential. Thus I suggest the attached patch. It
causes any installation to be done below $DESTDIR . If no
DESTDIR is defined in the environment it has no effect.

Also, could you please put the spec used to build rpms in cvs?
And could it be in the root, ie as mod_python/mod_python.spec?
(That makes rpm-building even easier; given a mod_python tar the
rpm's can be build with
	rpm -ta src/mod_python-2.7.1.tar.gz
)

I have some enhancements to the spec as well - but I'll sit on
them until the spec is in cvs.

Happy Newyear from

-- 
Mads Kiilerich          Sys.Adm. Cand.Polyt. Stud.Bibel.
Mads at Kiilerich.com      Tel. +45 26 20 07 73
Fxvqrevx! Fiva! Qrg re cvffrgneiryvtg ng xelcgrer zrq EBG-13.                   
-------------- next part --------------
Index: Makefile.in
===================================================================
RCS file: /cvsroot/modpython/mod_python/Makefile.in,v
retrieving revision 1.7
diff -u -u -r1.7 Makefile.in
--- Makefile.in	2000/12/06 03:05:37	1.7
+++ Makefile.in	2000/12/28 13:05:01
@@ -82,7 +82,7 @@
 	@echo
 	@echo "Performing DSO installation."
 	@echo
-	$(INSTALL) src/mod_python.so $(LIBEXECDIR)
+	$(INSTALL) src/mod_python.so $(DESTDIR)$(LIBEXECDIR)
 	@$(MAKE) install_py_lib
 	@echo
 	@echo "Now don't forget to edit your main config and add"
@@ -114,12 +114,12 @@
 	@echo
 
 install_py_lib:
-	$(INSTALL) -d $(PY_STD_LIB)/site-packages/mod_python
+	$(INSTALL) -d $(DESTDIR)$(PY_STD_LIB)/site-packages/mod_python
 	@for f in `ls lib/python/mod_python/*.py`; \
 	do \
-		$(INSTALL) $$f $(PY_STD_LIB)/site-packages/mod_python; \
+		$(INSTALL) $$f $(DESTDIR)$(PY_STD_LIB)/site-packages/mod_python; \
 	done
-	python $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python
+	python $(PY_STD_LIB)/compileall.py $(DESTDIR)$(PY_STD_LIB)/site-packages/mod_python
 
 clean:
 	cd src && $(MAKE) clean


More information about the Mod_python mailing list