Frederic LE GUERN wrote:
Frederic LE GUERN wrote:

${source_dir}/src/modules/perl/Makefile does not reference $(DESTDIR) in
install: rule, so when trying to make mod_perl2 as a relocatable package
mod_perl.so and mod_perl .h files get installed system-wide.

Here's a patch :

--- Makefile.orig    2005-02-08 00:43:50.000000000 +0000
+++ Makefile    2005-02-08 00:32:12.000000000 +0000
@@ -101,12 +101,12 @@

install:
# install mod_perl.so
-       @$(MKPATH) $(MODPERL_AP_LIBEXECDIR)
+       @$(MKPATH) $(DESTDIR)/$(MODPERL_AP_LIBEXECDIR)
       $(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
-       $(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
+       $(MODPERL_CP) $(MODPERL_LIB_DSO) $(DESTDIR)/$(MODPERL_AP_LIBEXECDIR)
# install mod_perl .h files
-       @$(MKPATH) $(MODPERL_AP_INCLUDEDIR)
-       $(MODPERL_CP) $(MODPERL_H_FILES) $(MODPERL_AP_INCLUDEDIR)
+       @$(MKPATH) $(DESTDIR)/$(MODPERL_AP_INCLUDEDIR)
+       $(MODPERL_CP) $(MODPERL_H_FILES) $(DESTDIR)/$(MODPERL_AP_INCLUDEDIR)

.SUFFIXES: .xs .c $(MODPERL_OBJ_EXT) .lo .i .s

I understand that you are trying to solve the packager's problem, but I think this is going to break things for the rest of the world, no?

Also I suppose that your patch just illustrates the issue, since Makefiles
are autogenerated.


Yes you're right the patch was just intended to make it clear
where the problem was - and also it's here because that's how I solve the
problem temporarily in the package build script, though it's a dirty hack.
Sorry I can't offer a real solution, I'm not a mod_perl developper myself,
I just had to install the package and saw this issue so I thought I'd
mention it.

sure, but you can help us figure out a solution w/o knowing anything about mod_perl. The situation of the packagers is unique. One can think of it as if they are using chroot(1), where their / moves elsewhere. It'd be easy to make DESTDIR supported, but this is not the right thing. mod_perl has to be installed where all other Apache modules are. So DESTDIR must not affect it. Notice that unlike mp1, mp2 does not install mod_perl.so under the perl tree.


I suppose the simplest solution to this problem is to provide a new Makefile.PL argument, which will be the same as DESTDIR in the perl world, but for Apache things. e.g., MP_AP_DESTDIR, so if specified it can be used exactly as in your patch above. (handling the trailing slash of ofcourse). In your case MP_AP_DESTDIR will be the same value as DESTDIR.

If you have better ideas please speak up.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to