Fri Aug 22 04:36:00 2008 UTC ()
Add DESTDIR support and fix PLIST(try to create two empty directories).


(obache)
diff -r1.28 -r1.29 pkgsrc/www/apache22/Makefile
diff -r1.6 -r1.7 pkgsrc/www/apache22/PLIST
diff -r1.3 -r1.4 pkgsrc/www/apache22/options.mk

cvs diff -r1.28 -r1.29 pkgsrc/www/apache22/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/www/apache22/Attic/Makefile 2008/08/09 22:16:44 1.28
+++ pkgsrc/www/apache22/Attic/Makefile 2008/08/22 04:36:00 1.29
@@ -1,24 +1,26 @@ @@ -1,24 +1,26 @@
1# $NetBSD: Makefile,v 1.28 2008/08/09 22:16:44 tron Exp $ 1# $NetBSD: Makefile,v 1.29 2008/08/22 04:36:00 obache Exp $
2 2
3.include "Makefile.common" 3.include "Makefile.common"
4 4
5PKGNAME= apache-${APACHE_VERSION} 5PKGNAME= apache-${APACHE_VERSION}
6PKGREVISION= 1 6PKGREVISION= 1
7CATEGORIES= www 7CATEGORIES= www
8 8
9HOMEPAGE= http://httpd.apache.org/ 9HOMEPAGE= http://httpd.apache.org/
10COMMENT= Apache HTTP (Web) server, version 2 10COMMENT= Apache HTTP (Web) server, version 2
11 11
 12PKG_DESTDIR_SUPPORT= user-destdir
 13
12CONFLICTS= apache-{,*ssl}-[0-9]* apache6-[0-9]* 14CONFLICTS= apache-{,*ssl}-[0-9]* apache6-[0-9]*
13 15
14BUILD_DEFS+= IPV6_READY 16BUILD_DEFS+= IPV6_READY
15BUILD_DEFS+= VARBASE 17BUILD_DEFS+= VARBASE
16 18
17USE_TOOLS+= pax perl perl:run pkg-config 19USE_TOOLS+= pax perl perl:run pkg-config
18USE_LIBTOOL= yes 20USE_LIBTOOL= yes
19GNU_CONFIGURE= yes 21GNU_CONFIGURE= yes
20CONFIGURE_ARGS+= --enable-layout=NetBSD 22CONFIGURE_ARGS+= --enable-layout=NetBSD
21CONFIGURE_ARGS+= --with-port=80 23CONFIGURE_ARGS+= --with-port=80
22CONFIGURE_ARGS+= --enable-so 24CONFIGURE_ARGS+= --enable-so
23CONFIGURE_ENV+= perlbin=${PERL5:Q} 25CONFIGURE_ENV+= perlbin=${PERL5:Q}
24CONFIGURE_ENV+= ac_cv_path_RSYNC=/nonexistent 26CONFIGURE_ENV+= ac_cv_path_RSYNC=/nonexistent
@@ -168,27 +170,27 @@ SUBST_FILES.confs+= docs/conf/extra/http @@ -168,27 +170,27 @@ SUBST_FILES.confs+= docs/conf/extra/http
168SUBST_SED.confs= -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g" 170SUBST_SED.confs= -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g"
169SUBST_SED.confs+= -e "s|${PREFIX}/htdocs|${PREFIX}/share/httpd/htdocs|g" 171SUBST_SED.confs+= -e "s|${PREFIX}/htdocs|${PREFIX}/share/httpd/htdocs|g"
170SUBST_SED.confs+= -e "s|${PREFIX}/conf|${PKG_SYSCONFDIR}|g" 172SUBST_SED.confs+= -e "s|${PREFIX}/conf|${PKG_SYSCONFDIR}|g"
171SUBST_SED.confs+= -e "s|logs/|${VARBASE}/log/httpd/|g" 173SUBST_SED.confs+= -e "s|logs/|${VARBASE}/log/httpd/|g"
172SUBST_SED.confs+= -e 's|/var/log/httpd/foo\.log|logs/foo.log/|g' 174SUBST_SED.confs+= -e 's|/var/log/httpd/foo\.log|logs/foo.log/|g'
173SUBST_SED.confs+= -e 's|^\(User[ ]\).*|\1${APACHE_USER}|g' 175SUBST_SED.confs+= -e 's|^\(User[ ]\).*|\1${APACHE_USER}|g'
174SUBST_SED.confs+= -e 's|^\(Group[ ]\).*|\1${APACHE_GROUP}|g' 176SUBST_SED.confs+= -e 's|^\(Group[ ]\).*|\1${APACHE_GROUP}|g'
175 177
176# abs_srcdir in config_vars.mk is used during install so needs to reference 178# abs_srcdir in config_vars.mk is used during install so needs to reference
177# the work dir path, and by other packages such as ap2-fastcgi after install, 179# the work dir path, and by other packages such as ap2-fastcgi after install,
178# so we fix after install to reference the installed path 180# so we fix after install to reference the installed path
179SUBST_CLASSES+= abs_srcdir 181SUBST_CLASSES+= abs_srcdir
180SUBST_STAGE.abs_srcdir= post-install 182SUBST_STAGE.abs_srcdir= post-install
181SUBST_FILES.abs_srcdir= ${PREFIX}/share/httpd/build/config_vars.mk 183SUBST_FILES.abs_srcdir= ${DESTDIR}${PREFIX}/share/httpd/build/config_vars.mk
182SUBST_SED.abs_srcdir= -e 's|^\(abs_srcdir =\) .*|\1 ${PREFIX}/share/httpd|' 184SUBST_SED.abs_srcdir= -e 's|^\(abs_srcdir =\) .*|\1 ${PREFIX}/share/httpd|'
183SUBST_MESSAGE.abs_srcdir= Fixing abs_srcdir 185SUBST_MESSAGE.abs_srcdir= Fixing abs_srcdir
184 186
185REPLACE_PERL= docs/cgi-examples/printenv 187REPLACE_PERL= docs/cgi-examples/printenv
186 188
187.include "options.mk" 189.include "options.mk"
188 190
189# Add dependencies for the modules that will be built. For each module 191# Add dependencies for the modules that will be built. For each module
190# ap_mod listed in ${APACHE_MODULES}, _AP_DEPENDS.ap_mod is a whitespace 192# ap_mod listed in ${APACHE_MODULES}, _AP_DEPENDS.ap_mod is a whitespace
191# separated list of dependencies or buildlink3.mk files needed to build 193# separated list of dependencies or buildlink3.mk files needed to build
192# ap_mod, and _AP_CFG_ARGS.ap_mod is a whitespace separated list of 194# ap_mod, and _AP_CFG_ARGS.ap_mod is a whitespace separated list of
193# configure script options for ap_mod. 195# configure script options for ap_mod.
194# 196#
@@ -211,61 +213,60 @@ DEPENDS+= ${ap_depend} @@ -211,61 +213,60 @@ DEPENDS+= ${ap_depend}
211. if defined(AP_CFG_ARGS.${ap_mod}) && !empty(AP_CFG_ARGS.${ap_mod}) 213. if defined(AP_CFG_ARGS.${ap_mod}) && !empty(AP_CFG_ARGS.${ap_mod})
212CONFIGURE_ARGS+= ${AP_CFG_ARGS.${ap_mod}} 214CONFIGURE_ARGS+= ${AP_CFG_ARGS.${ap_mod}}
213. endif 215. endif
214.endfor 216.endfor
215 217
216post-extract: 218post-extract:
217 ${TOUCH} ${WRKSRC}/build/libtool 219 ${TOUCH} ${WRKSRC}/build/libtool
218 ${ECHO} "" >> ${WRKSRC}/docs/conf/extra/httpd-languages.conf.in 220 ${ECHO} "" >> ${WRKSRC}/docs/conf/extra/httpd-languages.conf.in
219 221
220post-build: 222post-build:
221 ${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g" \ 223 ${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g" \
222 < ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert 224 < ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert
223 225
224pre-install: 226INSTALL_TARGET= install-conf install
225 cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ 227INSTALL_MAKE_FLAGS+= sysconfdir="${EGDIR}"
226 ${MAKE_PROGRAM} install-conf sysconfdir="${EGDIR}" 
227 228
228post-install: 229post-install:
229 ${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${PREFIX}/share/httpd/build 230 ${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${DESTDIR}${PREFIX}/share/httpd/build
230 cd ${EGDIR} && \ 231 cd ${DESTDIR}${EGDIR} && \
231 for file in \ 232 for file in \
232 httpd.conf \ 233 httpd.conf \
233 extra/httpd-ssl.conf; \ 234 extra/httpd-ssl.conf; \
234 do \ 235 do \
235 ${AWK} ' \ 236 ${AWK} ' \
236 /^Listen[ ]*80/ { \ 237 /^Listen[ ]*80/ { \
237 printf "%s", "Listen 0.0.0.0:80\n"; \ 238 printf "%s", "Listen 0.0.0.0:80\n"; \
238 next; \ 239 next; \
239 } \ 240 } \
240 /^Listen[ ]*443/ { \ 241 /^Listen[ ]*443/ { \
241 printf "%s", "Listen 0.0.0.0:443\n"; \ 242 printf "%s", "Listen 0.0.0.0:443\n"; \
242 next; \ 243 next; \
243 } \ 244 } \
244 { print; } \ 245 { print; } \
245 ' < "$${file}" >> $${file}.new; \ 246 ' < "$${file}" >> $${file}.new; \
246 ${MV} -f $${file}.new $${file}; \ 247 ${MV} -f $${file}.new $${file}; \
247 done 248 done
248 249
249 ${LN} -sf ${SBINDIR}/envvars-std ${SBINDIR}/envvars 250 ${LN} -sf ${SBINDIR}/envvars-std ${DESTDIR}${SBINDIR}/envvars
250 251
251 ${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${PREFIX}/sbin 252 ${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${DESTDIR}${PREFIX}/sbin
252 253
253 for file in ${FIX_PERMS}; do \ 254 for file in ${FIX_PERMS}; do \
254 ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/sbin/$$file && \ 255 ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/sbin/$$file && \
255 ${CHMOD} ${BINMODE} ${PREFIX}/sbin/$$file; \ 256 ${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/sbin/$$file; \
256 done 257 done
257 258
258 ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/share/httpd 259 ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/share/httpd
259 ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/include/httpd 260 ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/include/httpd
260 ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/httpd 261 ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/lib/httpd
261 ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/libexec/cgi-bin/test-cgi 262 ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/test-cgi
262 ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/libexec/cgi-bin/printenv 263 ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/printenv
263 264
264 for file in ${FIX_MAN_PERMS}; do \ 265 for file in ${FIX_MAN_PERMS}; do \
265 ${CHOWN} ${MANOWN}:${MANGRP} ${PREFIX}/${PKGMANDIR}/$$file; \ 266 ${CHOWN} ${MANOWN}:${MANGRP} ${DESTDIR}${PREFIX}/${PKGMANDIR}/$$file; \
266 done 267 done
267 268
268 ${CHMOD} -x ${PREFIX}/sbin/envvars-std 269 ${CHMOD} -x ${DESTDIR}${PREFIX}/sbin/envvars-std
269 ${TEST} ! -f ${PREFIX}/sbin/suexec || ${CHMOD} -w ${PREFIX}/sbin/suexec 270 ${TEST} ! -f ${DESTDIR}${PREFIX}/sbin/suexec || ${CHMOD} -w ${DESTDIR}${PREFIX}/sbin/suexec
270 271
271.include "../../mk/bsd.pkg.mk" 272.include "../../mk/bsd.pkg.mk"

cvs diff -r1.6 -r1.7 pkgsrc/www/apache22/Attic/PLIST (expand / switch to unified diff)

--- pkgsrc/www/apache22/Attic/PLIST 2008/06/18 21:38:01 1.6
+++ pkgsrc/www/apache22/Attic/PLIST 2008/08/22 04:36:00 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.6 2008/06/18 21:38:01 tron Exp $ 1@comment $NetBSD: PLIST,v 1.7 2008/08/22 04:36:00 obache Exp $
2${PLIST.suexec}sbin/suexec 2${PLIST.suexec}sbin/suexec
3include/httpd/ap_compat.h 3include/httpd/ap_compat.h
4include/httpd/ap_config.h 4include/httpd/ap_config.h
5include/httpd/ap_config_auto.h 5include/httpd/ap_config_auto.h
6include/httpd/ap_config_layout.h 6include/httpd/ap_config_layout.h
7include/httpd/ap_listen.h 7include/httpd/ap_listen.h
8include/httpd/ap_mmn.h 8include/httpd/ap_mmn.h
9include/httpd/ap_mpm.h 9include/httpd/ap_mpm.h
10include/httpd/ap_provider.h 10include/httpd/ap_provider.h
11include/httpd/ap_regex.h 11include/httpd/ap_regex.h
12include/httpd/ap_regkey.h 12include/httpd/ap_regkey.h
13include/httpd/ap_release.h 13include/httpd/ap_release.h
14include/httpd/http_config.h 14include/httpd/http_config.h
@@ -1043,27 +1043,29 @@ share/httpd/manual/vhosts/ip-based.html. @@ -1043,27 +1043,29 @@ share/httpd/manual/vhosts/ip-based.html.
1043share/httpd/manual/vhosts/ip-based.html.tr.utf8 1043share/httpd/manual/vhosts/ip-based.html.tr.utf8
1044share/httpd/manual/vhosts/mass.html 1044share/httpd/manual/vhosts/mass.html
1045share/httpd/manual/vhosts/mass.html.en 1045share/httpd/manual/vhosts/mass.html.en
1046share/httpd/manual/vhosts/mass.html.ko.euc-kr 1046share/httpd/manual/vhosts/mass.html.ko.euc-kr
1047share/httpd/manual/vhosts/name-based.html 1047share/httpd/manual/vhosts/name-based.html
1048share/httpd/manual/vhosts/name-based.html.de 1048share/httpd/manual/vhosts/name-based.html.de
1049share/httpd/manual/vhosts/name-based.html.en 1049share/httpd/manual/vhosts/name-based.html.en
1050share/httpd/manual/vhosts/name-based.html.fr 1050share/httpd/manual/vhosts/name-based.html.fr
1051share/httpd/manual/vhosts/name-based.html.ja.utf8 1051share/httpd/manual/vhosts/name-based.html.ja.utf8
1052share/httpd/manual/vhosts/name-based.html.ko.euc-kr 1052share/httpd/manual/vhosts/name-based.html.ko.euc-kr
1053share/httpd/manual/vhosts/name-based.html.tr.utf8 1053share/httpd/manual/vhosts/name-based.html.tr.utf8
1054@unexec ${RMDIR} %D/libexec/cgi-bin 2>/dev/null || ${TRUE} 1054@unexec ${RMDIR} %D/libexec/cgi-bin 2>/dev/null || ${TRUE}
1055@dirrm share/httpd/manual/vhosts 1055@dirrm share/httpd/manual/vhosts
 1056@exec ${MKDIR} %D/share/httpd/manual/style/xsl/util
1056@dirrm share/httpd/manual/style/xsl/util 1057@dirrm share/httpd/manual/style/xsl/util
 1058@exec ${MKDIR} %D/share/httpd/manual/style/xsl
1057@dirrm share/httpd/manual/style/xsl 1059@dirrm share/httpd/manual/style/xsl
1058@dirrm share/httpd/manual/style/latex 1060@dirrm share/httpd/manual/style/latex
1059@exec ${MKDIR} %D/share/httpd/manual/style/lang 1061@exec ${MKDIR} %D/share/httpd/manual/style/lang
1060@dirrm share/httpd/manual/style/lang 1062@dirrm share/httpd/manual/style/lang
1061@dirrm share/httpd/manual/style/css 1063@dirrm share/httpd/manual/style/css
1062@dirrm share/httpd/manual/style 1064@dirrm share/httpd/manual/style
1063@dirrm share/httpd/manual/ssl 1065@dirrm share/httpd/manual/ssl
1064@dirrm share/httpd/manual/rewrite 1066@dirrm share/httpd/manual/rewrite
1065@dirrm share/httpd/manual/programs 1067@dirrm share/httpd/manual/programs
1066@dirrm share/httpd/manual/platform 1068@dirrm share/httpd/manual/platform
1067@dirrm share/httpd/manual/mod 1069@dirrm share/httpd/manual/mod
1068@dirrm share/httpd/manual/misc 1070@dirrm share/httpd/manual/misc
1069@dirrm share/httpd/manual/images 1071@dirrm share/httpd/manual/images

cvs diff -r1.3 -r1.4 pkgsrc/www/apache22/Attic/options.mk (expand / switch to unified diff)

--- pkgsrc/www/apache22/Attic/options.mk 2008/04/12 22:43:13 1.3
+++ pkgsrc/www/apache22/Attic/options.mk 2008/08/22 04:36:00 1.4
@@ -1,28 +1,30 @@ @@ -1,28 +1,30 @@
1# $NetBSD: options.mk,v 1.3 2008/04/12 22:43:13 jlam Exp $ 1# $NetBSD: options.mk,v 1.4 2008/08/22 04:36:00 obache Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.apache 3PKG_OPTIONS_VAR= PKG_OPTIONS.apache
4PKG_SUPPORTED_OPTIONS= suexec 4PKG_SUPPORTED_OPTIONS= suexec
5 5
6.include "../../mk/bsd.options.mk" 6.include "../../mk/bsd.options.mk"
7 7
8PLIST_VARS+= suexec 8PLIST_VARS+= suexec
9.if !empty(PKG_OPTIONS:Msuexec) 9.if !empty(PKG_OPTIONS:Msuexec)
10PKG_USERS_VARS+= APACHE_USER 10PKG_USERS_VARS+= APACHE_USER
 11PKG_GROUPS_VARS+= APACHE_GROUP
11BUILD_DEFS+= VARBASE APACHE_SUEXEC_PATH 12BUILD_DEFS+= VARBASE APACHE_SUEXEC_PATH
12BUILD_DEFS+= APACHE_SUEXEC_DOCROOT APACHE_SUEXEC_LOGFILE 13BUILD_DEFS+= APACHE_SUEXEC_DOCROOT APACHE_SUEXEC_LOGFILE
13 14
14APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs 15APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
15APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin 16APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
16APACHE_SUEXEC_LOGFILE?= ${VARBASE}/log/httpd/suexec.log 17APACHE_SUEXEC_LOGFILE?= ${VARBASE}/log/httpd/suexec.log
17APACHE_SUEXEC_CONFIGURE_ARGS+= \ 18APACHE_SUEXEC_CONFIGURE_ARGS+= \
18 --with-suexec-bin=${PREFIX}/sbin/suexec \ 19 --with-suexec-bin=${PREFIX}/sbin/suexec \
19 --with-suexec-caller=${APACHE_USER} \ 20 --with-suexec-caller=${APACHE_USER} \
20 --with-suexec-safepath='${APACHE_SUEXEC_PATH:Q}' \ 21 --with-suexec-safepath='${APACHE_SUEXEC_PATH:Q}' \
21 --with-suexec-docroot=${APACHE_SUEXEC_DOCROOT:Q} \ 22 --with-suexec-docroot=${APACHE_SUEXEC_DOCROOT:Q} \
22 --with-suexec-logfile=${APACHE_SUEXEC_LOGFILE:Q} 23 --with-suexec-logfile=${APACHE_SUEXEC_LOGFILE:Q}
23 24
24APACHE_MODULES+= suexec 25APACHE_MODULES+= suexec
25CONFIGURE_ARGS+= ${APACHE_SUEXEC_CONFIGURE_ARGS:M--with-suexec-*} 26CONFIGURE_ARGS+= ${APACHE_SUEXEC_CONFIGURE_ARGS:M--with-suexec-*}
26BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS 27BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS
27PLIST.suexec= yes 28PLIST.suexec= yes
 29SPECIAL_PERMS+= sbin/suexec ${REAL_ROOT_USER} ${APACHE_GROUP} 4510
28.endif 30.endif