PREFIX-safe installation of apache modules [Was: FreeBSD ports
which are currently scheduled for deletion]
ports/c0decafe.net
ports at c0decafe.net
Sat Aug 21 08:25:39 PDT 2004
On Sat, 2004-08-21 at 13:04, Oliver Eikemeier wrote:
> No. The prefix for apache is LOCALBASE, otherwise apxs won't be found.
> You don't really have a choice here, and custom configurations (tweaking
> parameters not tweaked by the port) are beyond the scope of the ports
> collection.
Makefile.modules.3rd specifically allows you to overwrite APXS, when
needed
> > unless i am misunderstanding the problem here?
> Yes.
i can see that now, in the sense that i assumed a user's point of view
while the real/actual concern/problem was much more elaborated.
> Which reminds me that we should honor this scenario in the apxs patch.
instead of patching apxs, maybe using it's -S switch (overwriting a
given variable) would help here?
like would the following patch to Makefile.modules.3rd (<warning>i gotta
run in a few for the weekend, so while this is an
offhand/untested/unfinished/broken prototype, you should get the
idea</warning>) adress your (at least some of) concerns?
--- Makefile.modules.3rd.orig Sat Aug 21 15:47:31 2004
+++ Makefile.modules.3rd Sat Aug 21 15:52:14 2004
@@ -95,10 +95,10 @@
.if defined(AP_GENPLIST)
. if !exists(${PLIST})
@${ECHO} "===> Generating apache plist"
- @${ECHO} "@cwd ${APXS_PREFIX}" > ${PLIST}
- @${ECHO} "@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
+ @${ECHO} "@cwd ${PREFIX}" > ${PLIST}
+ @${ECHO} "@unexec ${APXS} -e -A -n %%AP_NAME%% %D/%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
@${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
- @${ECHO} "@exec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%F" >> ${PLIST}
+ @${ECHO} "@exec ${APXS} -e -A -n %%AP_NAME%% %D/%F" >> ${PLIST}
@${ECHO} "@cwd ${PREFIX}" >> ${PLIST}
. endif
.else
@@ -109,7 +109,8 @@
@cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.${AP_BUILDEXT} ${SRC_FILE}
do-install:
- @${APXS} -i -A -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT}
+ APXS_LIBEXEC!= ${APXS} -q LIBEXECDIR
+ @${APXS} -S LIBEXEC=${PREFIX}${APXS_LIBEXEC:S/${APXS_PREFIX}//} -i -A -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT}
.endif
.else # PORT_IS_SERVER
More information about the freebsd-ports
mailing list