diff options
author | obache <obache> | 2008-08-22 04:36:00 +0000 |
---|---|---|
committer | obache <obache> | 2008-08-22 04:36:00 +0000 |
commit | c0dfc5680b1fc2713a0efef96190c7a332678f59 (patch) | |
tree | f168ec3049f7b88794a9f5e74aa3cff57bc819cb /www/apache22 | |
parent | 2b146d894096e82adc213e8de61f3773b21407a7 (diff) | |
download | pkgsrc-c0dfc5680b1fc2713a0efef96190c7a332678f59.tar.gz |
Add DESTDIR support and fix PLIST(try to create two empty directories).
Diffstat (limited to 'www/apache22')
-rw-r--r-- | www/apache22/Makefile | 39 | ||||
-rw-r--r-- | www/apache22/PLIST | 4 | ||||
-rw-r--r-- | www/apache22/options.mk | 4 |
3 files changed, 26 insertions, 21 deletions
diff --git a/www/apache22/Makefile b/www/apache22/Makefile index aab56c85889..87e2015c355 100644 --- a/www/apache22/Makefile +++ b/www/apache22/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2008/08/09 22:16:44 tron Exp $ +# $NetBSD: Makefile,v 1.29 2008/08/22 04:36:00 obache Exp $ .include "Makefile.common" @@ -9,6 +9,8 @@ CATEGORIES= www HOMEPAGE= http://httpd.apache.org/ COMMENT= Apache HTTP (Web) server, version 2 +PKG_DESTDIR_SUPPORT= user-destdir + CONFLICTS= apache-{,*ssl}-[0-9]* apache6-[0-9]* BUILD_DEFS+= IPV6_READY @@ -178,7 +180,7 @@ SUBST_SED.confs+= -e 's|^\(Group[ ]\).*|\1${APACHE_GROUP}|g' # so we fix after install to reference the installed path SUBST_CLASSES+= abs_srcdir SUBST_STAGE.abs_srcdir= post-install -SUBST_FILES.abs_srcdir= ${PREFIX}/share/httpd/build/config_vars.mk +SUBST_FILES.abs_srcdir= ${DESTDIR}${PREFIX}/share/httpd/build/config_vars.mk SUBST_SED.abs_srcdir= -e 's|^\(abs_srcdir =\) .*|\1 ${PREFIX}/share/httpd|' SUBST_MESSAGE.abs_srcdir= Fixing abs_srcdir @@ -221,13 +223,12 @@ post-build: ${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g" \ < ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert -pre-install: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ - ${MAKE_PROGRAM} install-conf sysconfdir="${EGDIR}" +INSTALL_TARGET= install-conf install +INSTALL_MAKE_FLAGS+= sysconfdir="${EGDIR}" post-install: - ${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${PREFIX}/share/httpd/build - cd ${EGDIR} && \ + ${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${DESTDIR}${PREFIX}/share/httpd/build + cd ${DESTDIR}${EGDIR} && \ for file in \ httpd.conf \ extra/httpd-ssl.conf; \ @@ -246,26 +247,26 @@ post-install: ${MV} -f $${file}.new $${file}; \ done - ${LN} -sf ${SBINDIR}/envvars-std ${SBINDIR}/envvars + ${LN} -sf ${SBINDIR}/envvars-std ${DESTDIR}${SBINDIR}/envvars - ${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${DESTDIR}${PREFIX}/sbin for file in ${FIX_PERMS}; do \ - ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/sbin/$$file && \ - ${CHMOD} ${BINMODE} ${PREFIX}/sbin/$$file; \ + ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/sbin/$$file && \ + ${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/sbin/$$file; \ done - ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/share/httpd - ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/include/httpd - ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/httpd - ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/libexec/cgi-bin/test-cgi - ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/libexec/cgi-bin/printenv + ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/share/httpd + ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/include/httpd + ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/lib/httpd + ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/test-cgi + ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/printenv for file in ${FIX_MAN_PERMS}; do \ - ${CHOWN} ${MANOWN}:${MANGRP} ${PREFIX}/${PKGMANDIR}/$$file; \ + ${CHOWN} ${MANOWN}:${MANGRP} ${DESTDIR}${PREFIX}/${PKGMANDIR}/$$file; \ done - ${CHMOD} -x ${PREFIX}/sbin/envvars-std - ${TEST} ! -f ${PREFIX}/sbin/suexec || ${CHMOD} -w ${PREFIX}/sbin/suexec + ${CHMOD} -x ${DESTDIR}${PREFIX}/sbin/envvars-std + ${TEST} ! -f ${DESTDIR}${PREFIX}/sbin/suexec || ${CHMOD} -w ${DESTDIR}${PREFIX}/sbin/suexec .include "../../mk/bsd.pkg.mk" diff --git a/www/apache22/PLIST b/www/apache22/PLIST index db46465b473..d9dab0ec791 100644 --- a/www/apache22/PLIST +++ b/www/apache22/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2008/06/18 21:38:01 tron Exp $ +@comment $NetBSD: PLIST,v 1.7 2008/08/22 04:36:00 obache Exp $ ${PLIST.suexec}sbin/suexec include/httpd/ap_compat.h include/httpd/ap_config.h @@ -1053,7 +1053,9 @@ share/httpd/manual/vhosts/name-based.html.ko.euc-kr share/httpd/manual/vhosts/name-based.html.tr.utf8 @unexec ${RMDIR} %D/libexec/cgi-bin 2>/dev/null || ${TRUE} @dirrm share/httpd/manual/vhosts +@exec ${MKDIR} %D/share/httpd/manual/style/xsl/util @dirrm share/httpd/manual/style/xsl/util +@exec ${MKDIR} %D/share/httpd/manual/style/xsl @dirrm share/httpd/manual/style/xsl @dirrm share/httpd/manual/style/latex @exec ${MKDIR} %D/share/httpd/manual/style/lang diff --git a/www/apache22/options.mk b/www/apache22/options.mk index 6933435a6ae..12e6d5cbc28 100644 --- a/www/apache22/options.mk +++ b/www/apache22/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.3 2008/04/12 22:43:13 jlam Exp $ +# $NetBSD: options.mk,v 1.4 2008/08/22 04:36:00 obache Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.apache PKG_SUPPORTED_OPTIONS= suexec @@ -8,6 +8,7 @@ PKG_SUPPORTED_OPTIONS= suexec PLIST_VARS+= suexec .if !empty(PKG_OPTIONS:Msuexec) PKG_USERS_VARS+= APACHE_USER +PKG_GROUPS_VARS+= APACHE_GROUP BUILD_DEFS+= VARBASE APACHE_SUEXEC_PATH BUILD_DEFS+= APACHE_SUEXEC_DOCROOT APACHE_SUEXEC_LOGFILE @@ -25,4 +26,5 @@ APACHE_MODULES+= suexec CONFIGURE_ARGS+= ${APACHE_SUEXEC_CONFIGURE_ARGS:M--with-suexec-*} BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS PLIST.suexec= yes +SPECIAL_PERMS+= sbin/suexec ${REAL_ROOT_USER} ${APACHE_GROUP} 4510 .endif |