| @@ -1,290 +1,290 @@ | | | @@ -1,290 +1,290 @@ |
1 | # $NetBSD: Makefile,v 1.39 2009/02/25 15:39:38 tron Exp $ | | 1 | # $NetBSD: Makefile,v 1.39.2.1 2009/05/23 07:12:45 spz Exp $ |
2 | | | 2 | |
3 | DISTNAME= httpd-2.2.11 | | 3 | DISTNAME= httpd-2.2.11 |
4 | PKGREVISION= 2 | | 4 | PKGREVISION= 3 |
5 | PKGNAME= ${DISTNAME:S/httpd/apache/} | | 5 | PKGNAME= ${DISTNAME:S/httpd/apache/} |
6 | CATEGORIES= www | | 6 | CATEGORIES= www |
7 | MASTER_SITES= ${MASTER_SITE_APACHE:=httpd/} \ | | 7 | MASTER_SITES= ${MASTER_SITE_APACHE:=httpd/} \ |
8 | ${MASTER_SITE_APACHE:=httpd/old/} | | 8 | ${MASTER_SITE_APACHE:=httpd/old/} |
9 | EXTRACT_SUFX= .tar.bz2 | | 9 | EXTRACT_SUFX= .tar.bz2 |
10 | | | 10 | |
11 | MAINTAINER= tron@NetBSD.org | | 11 | MAINTAINER= tron@NetBSD.org |
12 | HOMEPAGE= http://httpd.apache.org/ | | 12 | HOMEPAGE= http://httpd.apache.org/ |
13 | COMMENT= Apache HTTP (Web) server, version 2 | | 13 | COMMENT= Apache HTTP (Web) server, version 2 |
14 | | | 14 | |
15 | PKG_DESTDIR_SUPPORT= user-destdir | | 15 | PKG_DESTDIR_SUPPORT= user-destdir |
16 | | | 16 | |
17 | CONFLICTS= apache-{,*ssl}-[0-9]* apache6-[0-9]* | | 17 | CONFLICTS= apache-{,*ssl}-[0-9]* apache6-[0-9]* |
18 | | | 18 | |
19 | BUILD_DEFS+= IPV6_READY | | 19 | BUILD_DEFS+= IPV6_READY |
20 | BUILD_DEFS+= VARBASE | | 20 | BUILD_DEFS+= VARBASE |
21 | | | 21 | |
22 | USE_TOOLS+= pax perl perl:run pkg-config | | 22 | USE_TOOLS+= pax perl perl:run pkg-config |
23 | USE_LIBTOOL= yes | | 23 | USE_LIBTOOL= yes |
24 | GNU_CONFIGURE= yes | | 24 | GNU_CONFIGURE= yes |
25 | CONFIGURE_ARGS+= --enable-layout=NetBSD | | 25 | CONFIGURE_ARGS+= --enable-layout=NetBSD |
26 | CONFIGURE_ARGS+= --with-port=80 | | 26 | CONFIGURE_ARGS+= --with-port=80 |
27 | CONFIGURE_ARGS+= --enable-so | | 27 | CONFIGURE_ARGS+= --enable-so |
28 | CONFIGURE_ENV+= perlbin=${PERL5:Q} | | 28 | CONFIGURE_ENV+= perlbin=${PERL5:Q} |
29 | CONFIGURE_ENV+= ac_cv_path_RSYNC=/nonexistent | | 29 | CONFIGURE_ENV+= ac_cv_path_RSYNC=/nonexistent |
30 | CONFIGURE_ARGS+= CFLAGS=${APACHE_CUSTOM_CFLAGS:Q} | | 30 | CONFIGURE_ARGS+= CFLAGS=${APACHE_CUSTOM_CFLAGS:Q} |
31 | | | 31 | |
32 | BUILD_DEFS+= APACHE_CUSTOM_CFLAGS | | 32 | BUILD_DEFS+= APACHE_CUSTOM_CFLAGS |
33 | | | 33 | |
34 | # Apache Portable Runtime library configure options | | 34 | # Apache Portable Runtime library configure options |
35 | CONFIGURE_ARGS+= --with-apr=${BUILDLINK_PREFIX.apr} | | 35 | CONFIGURE_ARGS+= --with-apr=${BUILDLINK_PREFIX.apr} |
36 | CONFIGURE_ARGS+= --with-apr-util=${BUILDLINK_PREFIX.apr-util} | | 36 | CONFIGURE_ARGS+= --with-apr-util=${BUILDLINK_PREFIX.apr-util} |
37 | | | 37 | |
38 | CHECK_INTERPRETER_SKIP+= lib/httpd/httpd.exp | | 38 | CHECK_INTERPRETER_SKIP+= lib/httpd/httpd.exp |
39 | CHECK_PORTABILITY_SKIP+= srclib/pcre/* \ | | 39 | CHECK_PORTABILITY_SKIP+= srclib/pcre/* \ |
40 | srclib/apr-util/* \ | | 40 | srclib/apr-util/* \ |
41 | srclib/apr/* | | 41 | srclib/apr/* |
42 | | | 42 | |
43 | # the following must be set before bsd.prefs.mk in order to make += work | | 43 | # the following must be set before bsd.prefs.mk in order to make += work |
44 | # in mk.conf; however, it isn't expanded until referenced, so we can | | 44 | # in mk.conf; however, it isn't expanded until referenced, so we can |
45 | # define DFLT_APACHE_MODULES later | | 45 | # define DFLT_APACHE_MODULES later |
46 | # | | 46 | # |
47 | APACHE_MODULES?= ${DFLT_APACHE_MODULES} | | 47 | APACHE_MODULES?= ${DFLT_APACHE_MODULES} |
48 | | | 48 | |
49 | .include "../../mk/bsd.prefs.mk" | | 49 | .include "../../mk/bsd.prefs.mk" |
50 | .include "../../devel/apr/buildlink3.mk" | | 50 | .include "../../devel/apr/buildlink3.mk" |
51 | .include "../../devel/apr-util/buildlink3.mk" | | 51 | .include "../../devel/apr-util/buildlink3.mk" |
52 | .include "../../textproc/expat/buildlink3.mk" | | 52 | .include "../../textproc/expat/buildlink3.mk" |
53 | .include "../../mk/dlopen.buildlink3.mk" | | 53 | .include "../../mk/dlopen.buildlink3.mk" |
54 | | | 54 | |
55 | # Set the "Multi-Processing Model" used by Apache to handle requests. | | 55 | # Set the "Multi-Processing Model" used by Apache to handle requests. |
56 | # Valid values are: | | 56 | # Valid values are: |
57 | # event multi-threaded based in worker, designed | | 57 | # event multi-threaded based in worker, designed |
58 | # to allow more requests to be served | | 58 | # to allow more requests to be served |
59 | # simultaneously by passing off some processing | | 59 | # simultaneously by passing off some processing |
60 | # work to supporting threads. | | 60 | # work to supporting threads. |
61 | # BEWARE: does not work with SSL or input filters. | | 61 | # BEWARE: does not work with SSL or input filters. |
62 | # prefork non-threaded, pre-forking web server | | 62 | # prefork non-threaded, pre-forking web server |
63 | # worker hybrid multi-threaded multi-process web server | | 63 | # worker hybrid multi-threaded multi-process web server |
64 | # | | 64 | # |
65 | APACHE_MPM?= prefork | | 65 | APACHE_MPM?= prefork |
66 | CONFIGURE_ARGS+= --with-mpm=${APACHE_MPM:Q} | | 66 | CONFIGURE_ARGS+= --with-mpm=${APACHE_MPM:Q} |
67 | BUILD_DEFS+= APACHE_MPM | | 67 | BUILD_DEFS+= APACHE_MPM |
68 | | | 68 | |
69 | .if !empty(APACHE_MPM:Mevent) || !empty(APACHE_MPM:Mworker) | | 69 | .if !empty(APACHE_MPM:Mevent) || !empty(APACHE_MPM:Mworker) |
70 | PLIST_SRC+= ${PKGDIR}/PLIST.worker | | 70 | PLIST_SRC+= ${PKGDIR}/PLIST.worker |
71 | .endif | | 71 | .endif |
72 | | | 72 | |
73 | CONFIGURE_ARGS+= --disable-include | | 73 | CONFIGURE_ARGS+= --disable-include |
74 | CONFIGURE_ARGS+= --disable-log-config | | 74 | CONFIGURE_ARGS+= --disable-log-config |
75 | CONFIGURE_ARGS+= --disable-env | | 75 | CONFIGURE_ARGS+= --disable-env |
76 | CONFIGURE_ARGS+= --disable-mime | | 76 | CONFIGURE_ARGS+= --disable-mime |
77 | CONFIGURE_ARGS+= --disable-setenvif | | 77 | CONFIGURE_ARGS+= --disable-setenvif |
78 | CONFIGURE_ARGS+= --disable-status | | 78 | CONFIGURE_ARGS+= --disable-status |
79 | CONFIGURE_ARGS+= --disable-autoindex | | 79 | CONFIGURE_ARGS+= --disable-autoindex |
80 | CONFIGURE_ARGS+= --disable-asis | | 80 | CONFIGURE_ARGS+= --disable-asis |
81 | CONFIGURE_ARGS+= --disable-cgi | | 81 | CONFIGURE_ARGS+= --disable-cgi |
82 | CONFIGURE_ARGS+= --disable-negotiation | | 82 | CONFIGURE_ARGS+= --disable-negotiation |
83 | CONFIGURE_ARGS+= --disable-dir | | 83 | CONFIGURE_ARGS+= --disable-dir |
84 | CONFIGURE_ARGS+= --disable-actions | | 84 | CONFIGURE_ARGS+= --disable-actions |
85 | CONFIGURE_ARGS+= --disable-userdir | | 85 | CONFIGURE_ARGS+= --disable-userdir |
86 | CONFIGURE_ARGS+= --disable-alias | | 86 | CONFIGURE_ARGS+= --disable-alias |
87 | | | 87 | |
88 | DFLT_APACHE_MODULES= all | | 88 | DFLT_APACHE_MODULES= all |
89 | DFLT_APACHE_MODULES+= proxy proxy_connect proxy_ftp proxy_http | | 89 | DFLT_APACHE_MODULES+= proxy proxy_connect proxy_ftp proxy_http |
90 | DFLT_APACHE_MODULES+= ssl deflate access auth authn_alias | | 90 | DFLT_APACHE_MODULES+= ssl deflate access auth authn_alias |
91 | DFLT_APACHE_MODULES+= include log_config env mime setenvif | | 91 | DFLT_APACHE_MODULES+= include log_config env mime setenvif |
92 | DFLT_APACHE_MODULES+= status autoindex asis cgi negotiation dir imap | | 92 | DFLT_APACHE_MODULES+= status autoindex asis cgi negotiation dir imap |
93 | DFLT_APACHE_MODULES+= actions userdir alias isapi file_cache | | 93 | DFLT_APACHE_MODULES+= actions userdir alias isapi file_cache |
94 | DFLT_APACHE_MODULES+= cache disk_cache mem_cache bucketeer echo | | 94 | DFLT_APACHE_MODULES+= cache disk_cache mem_cache bucketeer echo |
95 | DFLT_APACHE_MODULES+= example case_filter case_filter_in | | 95 | DFLT_APACHE_MODULES+= example case_filter case_filter_in |
96 | DFLT_APACHE_MODULES+= charset_lite | | 96 | DFLT_APACHE_MODULES+= charset_lite |
97 | DFLT_APACHE_MODULES+= cgid dav_lock proxy_ajp proxy_balancer | | 97 | DFLT_APACHE_MODULES+= cgid dav_lock proxy_ajp proxy_balancer |
98 | | | 98 | |
99 | PLIST_SRC+= ${PKGDIR}/PLIST | | 99 | PLIST_SRC+= ${PKGDIR}/PLIST |
100 | | | 100 | |
101 | # LDAP support | | 101 | # LDAP support |
102 | .if !empty(PKG_BUILD_OPTIONS.apr-util:Mldap) | | 102 | .if !empty(PKG_BUILD_OPTIONS.apr-util:Mldap) |
103 | DFLT_APACHE_MODULES+= ldap authnz_ldap | | 103 | DFLT_APACHE_MODULES+= ldap authnz_ldap |
104 | .endif | | 104 | .endif |
105 | | | 105 | |
106 | .include "options.mk" | | 106 | .include "options.mk" |
107 | | | 107 | |
108 | # APACHE_MODULES are the modules that are linked statically into the | | 108 | # APACHE_MODULES are the modules that are linked statically into the |
109 | # apache httpd executable. | | 109 | # apache httpd executable. |
110 | # | | 110 | # |
111 | #.if ${APACHE_MODULES} == "all-shared" | | 111 | #.if ${APACHE_MODULES} == "all-shared" |
112 | .if !empty(PKG_OPTIONS:Mapache-shared-modules) | | 112 | .if !empty(PKG_OPTIONS:Mapache-shared-modules) |
113 | # XXX ldap and suexec? | | 113 | # XXX ldap and suexec? |
114 | CONFIGURE_ARGS+= --enable-mods-shared=${DFLT_APACHE_MODULES:Q} | | 114 | CONFIGURE_ARGS+= --enable-mods-shared=${DFLT_APACHE_MODULES:Q} |
115 | PLIST_SRC+= ${PKGDIR}/PLIST.all-shared | | 115 | PLIST_SRC+= ${PKGDIR}/PLIST.all-shared |
116 | .else | | 116 | .else |
117 | CONFIGURE_ARGS+= --enable-modules=${APACHE_MODULES:Q} | | 117 | CONFIGURE_ARGS+= --enable-modules=${APACHE_MODULES:Q} |
118 | .endif | | 118 | .endif |
119 | BUILD_DEFS+= APACHE_MODULES | | 119 | BUILD_DEFS+= APACHE_MODULES |
120 | | | 120 | |
121 | APACHE_USER?= www | | 121 | APACHE_USER?= www |
122 | APACHE_GROUP?= www | | 122 | APACHE_GROUP?= www |
123 | PKG_GROUPS= ${APACHE_GROUP} | | 123 | PKG_GROUPS= ${APACHE_GROUP} |
124 | PKG_USERS= ${APACHE_USER}:${APACHE_GROUP} | | 124 | PKG_USERS= ${APACHE_USER}:${APACHE_GROUP} |
125 | PKG_GROUPS_VARS+= APACHE_GROUP | | 125 | PKG_GROUPS_VARS+= APACHE_GROUP |
126 | PKG_USERS_VARS+= APACHE_USER | | 126 | PKG_USERS_VARS+= APACHE_USER |
127 | | | 127 | |
128 | PKG_SYSCONFVAR= apache | | 128 | PKG_SYSCONFVAR= apache |
129 | PKG_SYSCONFSUBDIR?= httpd | | 129 | PKG_SYSCONFSUBDIR?= httpd |
130 | EGDIR= ${PREFIX}/share/examples/httpd | | 130 | EGDIR= ${PREFIX}/share/examples/httpd |
131 | SBINDIR= ${PREFIX}/sbin | | 131 | SBINDIR= ${PREFIX}/sbin |
132 | CONF_FILES+= ${EGDIR}/httpd.conf ${PKG_SYSCONFDIR}/httpd.conf | | 132 | CONF_FILES+= ${EGDIR}/httpd.conf ${PKG_SYSCONFDIR}/httpd.conf |
133 | .for f in autoindex dav default info languages manual mpm \ | | 133 | .for f in autoindex dav default info languages manual mpm \ |
134 | multilang-errordoc ssl userdir vhosts | | 134 | multilang-errordoc ssl userdir vhosts |
135 | CONF_FILES+= ${EGDIR}/extra/httpd-${f}.conf \ | | 135 | CONF_FILES+= ${EGDIR}/extra/httpd-${f}.conf \ |
136 | ${PKG_SYSCONFDIR}/httpd-${f}.conf | | 136 | ${PKG_SYSCONFDIR}/httpd-${f}.conf |
137 | .endfor | | 137 | .endfor |
138 | CONF_FILES+= ${EGDIR}/magic ${PKG_SYSCONFDIR}/magic | | 138 | CONF_FILES+= ${EGDIR}/magic ${PKG_SYSCONFDIR}/magic |
139 | CONF_FILES+= ${EGDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types | | 139 | CONF_FILES+= ${EGDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types |
140 | RCD_SCRIPTS= apache | | 140 | RCD_SCRIPTS= apache |
141 | | | 141 | |
142 | REQD_DIRS= ${PREFIX}/share/httpd | | 142 | REQD_DIRS= ${PREFIX}/share/httpd |
143 | REQD_DIRS+= ${PREFIX}/share/httpd/htdocs | | 143 | REQD_DIRS+= ${PREFIX}/share/httpd/htdocs |
144 | OWN_DIRS= ${VARBASE}/log/httpd | | 144 | OWN_DIRS= ${VARBASE}/log/httpd |
145 | OWN_DIRS+= ${VARBASE}/db/httpd | | 145 | OWN_DIRS+= ${VARBASE}/db/httpd |
146 | OWN_DIRS_PERMS+= ${VARBASE}/db/httpd/proxy ${APACHE_USER} ${APACHE_GROUP} 0755 | | 146 | OWN_DIRS_PERMS+= ${VARBASE}/db/httpd/proxy ${APACHE_USER} ${APACHE_GROUP} 0755 |
147 | FIX_PERMS= apachectl apxs dbmmanage envvars-std mkcert | | 147 | FIX_PERMS= apachectl apxs dbmmanage envvars-std mkcert |
148 | FIX_MAN_PERMS= man1/htdbm.1 man1/htpasswd.1 man1/htdigest.1 | | 148 | FIX_MAN_PERMS= man1/htdbm.1 man1/htpasswd.1 man1/htdigest.1 |
149 | FIX_MAN_PERMS+= man1/dbmmanage.1 man8/httpd.8 man8/suexec.8 | | 149 | FIX_MAN_PERMS+= man1/dbmmanage.1 man8/httpd.8 man8/suexec.8 |
150 | FIX_MAN_PERMS+= man8/rotatelogs.8 man8/logresolve.8 man8/apxs.8 | | 150 | FIX_MAN_PERMS+= man8/rotatelogs.8 man8/logresolve.8 man8/apxs.8 |
151 | FIX_MAN_PERMS+= man8/apachectl.8 man8/ab.8 | | 151 | FIX_MAN_PERMS+= man8/apachectl.8 man8/ab.8 |
152 | | | 152 | |
153 | # Fix paths in the apache manpages. | | 153 | # Fix paths in the apache manpages. |
154 | SUBST_CLASSES+= man | | 154 | SUBST_CLASSES+= man |
155 | SUBST_STAGE.man= post-patch | | 155 | SUBST_STAGE.man= post-patch |
156 | SUBST_FILES.man= docs/man/*.1 docs/man/*.8 | | 156 | SUBST_FILES.man= docs/man/*.1 docs/man/*.8 |
157 | SUBST_SED.man= -e 's,/usr/local/etc/apache,${PKG_SYSCONFDIR},' | | 157 | SUBST_SED.man= -e 's,/usr/local/etc/apache,${PKG_SYSCONFDIR},' |
158 | SUBST_SED.man+= -e 's,/path/to/apache/etc,${PKG_SYSCONFDIR},' | | 158 | SUBST_SED.man+= -e 's,/path/to/apache/etc,${PKG_SYSCONFDIR},' |
159 | SUBST_SED.man+= -e 's,/usr/local/apache2,${PREFIX}/share/httpd/htdocs,' | | 159 | SUBST_SED.man+= -e 's,/usr/local/apache2,${PREFIX}/share/httpd/htdocs,' |
160 | SUBST_SED.man+= -e 's,/usr/web,${PREFIX}/share/httpd/htdocs,' | | 160 | SUBST_SED.man+= -e 's,/usr/web,${PREFIX}/share/httpd/htdocs,' |
161 | | | 161 | |
162 | SUBST_CLASSES+= paths | | 162 | SUBST_CLASSES+= paths |
163 | SUBST_STAGE.paths= pre-configure | | 163 | SUBST_STAGE.paths= pre-configure |
164 | SUBST_FILES.paths= config.layout Makefile.in support/apxs.in | | 164 | SUBST_FILES.paths= config.layout Makefile.in support/apxs.in |
165 | SUBST_SED.paths= -e "s|@PREFIX@|${PREFIX}|g" | | 165 | SUBST_SED.paths= -e "s|@PREFIX@|${PREFIX}|g" |
166 | SUBST_SED.paths+= -e "s|@VARBASE@|${VARBASE}|g" | | 166 | SUBST_SED.paths+= -e "s|@VARBASE@|${VARBASE}|g" |
167 | SUBST_SED.paths+= -e "s|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g" | | 167 | SUBST_SED.paths+= -e "s|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g" |
168 | SUBST_SED.paths+= -e "s|@PAX@|${PAX}|g" | | 168 | SUBST_SED.paths+= -e "s|@PAX@|${PAX}|g" |
169 | SUBST_SED.paths+= -e "s|@LOCALBASE@|${LOCALBASE}|g" | | 169 | SUBST_SED.paths+= -e "s|@LOCALBASE@|${LOCALBASE}|g" |
170 | SUBST_MESSAGE.paths= Fixing paths. | | 170 | SUBST_MESSAGE.paths= Fixing paths. |
171 | | | 171 | |
172 | SUBST_CLASSES+= apr-lt | | 172 | SUBST_CLASSES+= apr-lt |
173 | SUBST_STAGE.apr-lt= post-configure | | 173 | SUBST_STAGE.apr-lt= post-configure |
174 | SUBST_FILES.apr-lt= build/config_vars.mk | | 174 | SUBST_FILES.apr-lt= build/config_vars.mk |
175 | SUBST_SED.apr-lt= -e 's|^\(LIBTOOL =\) [^ ]*|\1 $$(SHELL) $$(top_builddir)/build/libtool|g' | | 175 | SUBST_SED.apr-lt= -e 's|^\(LIBTOOL =\) [^ ]*|\1 $$(SHELL) $$(top_builddir)/build/libtool|g' |
176 | SUBST_MESSAGE.apr-lt= Fixing libtool references. | | 176 | SUBST_MESSAGE.apr-lt= Fixing libtool references. |
177 | | | 177 | |
178 | SUBST_CLASSES+= confs | | 178 | SUBST_CLASSES+= confs |
179 | SUBST_STAGE.confs= post-configure | | 179 | SUBST_STAGE.confs= post-configure |
180 | SUBST_MESSAGE.confs= Fixing configuration files. | | 180 | SUBST_MESSAGE.confs= Fixing configuration files. |
181 | SUBST_FILES.confs= docs/conf/httpd.conf | | 181 | SUBST_FILES.confs= docs/conf/httpd.conf |
182 | SUBST_FILES.confs+= docs/conf/extra/httpd-ssl.conf | | 182 | SUBST_FILES.confs+= docs/conf/extra/httpd-ssl.conf |
183 | SUBST_SED.confs= -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g" | | 183 | SUBST_SED.confs= -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g" |
184 | SUBST_SED.confs+= -e "s|${PREFIX}/htdocs|${PREFIX}/share/httpd/htdocs|g" | | 184 | SUBST_SED.confs+= -e "s|${PREFIX}/htdocs|${PREFIX}/share/httpd/htdocs|g" |
185 | SUBST_SED.confs+= -e "s|${PREFIX}/conf|${PKG_SYSCONFDIR}|g" | | 185 | SUBST_SED.confs+= -e "s|${PREFIX}/conf|${PKG_SYSCONFDIR}|g" |
186 | SUBST_SED.confs+= -e "s|logs/|${VARBASE}/log/httpd/|g" | | 186 | SUBST_SED.confs+= -e "s|logs/|${VARBASE}/log/httpd/|g" |
187 | SUBST_SED.confs+= -e 's|/var/log/httpd/foo\.log|logs/foo.log/|g' | | 187 | SUBST_SED.confs+= -e 's|/var/log/httpd/foo\.log|logs/foo.log/|g' |
188 | SUBST_SED.confs+= -e 's|^\(User[ ]\).*|\1${APACHE_USER}|g' | | 188 | SUBST_SED.confs+= -e 's|^\(User[ ]\).*|\1${APACHE_USER}|g' |
189 | SUBST_SED.confs+= -e 's|^\(Group[ ]\).*|\1${APACHE_GROUP}|g' | | 189 | SUBST_SED.confs+= -e 's|^\(Group[ ]\).*|\1${APACHE_GROUP}|g' |
190 | | | 190 | |
191 | # abs_srcdir in config_vars.mk is used during install so needs to reference | | 191 | # abs_srcdir in config_vars.mk is used during install so needs to reference |
192 | # the work dir path, and by other packages such as ap2-fastcgi after install, | | 192 | # the work dir path, and by other packages such as ap2-fastcgi after install, |
193 | # so we fix after install to reference the installed path | | 193 | # so we fix after install to reference the installed path |
194 | SUBST_CLASSES+= abs_srcdir | | 194 | SUBST_CLASSES+= abs_srcdir |
195 | SUBST_STAGE.abs_srcdir= post-install | | 195 | SUBST_STAGE.abs_srcdir= post-install |
196 | SUBST_FILES.abs_srcdir= ${DESTDIR}${PREFIX}/share/httpd/build/config_vars.mk | | 196 | SUBST_FILES.abs_srcdir= ${DESTDIR}${PREFIX}/share/httpd/build/config_vars.mk |
197 | SUBST_SED.abs_srcdir= -e 's|^\(abs_srcdir =\) .*|\1 ${PREFIX}/share/httpd|' | | 197 | SUBST_SED.abs_srcdir= -e 's|^\(abs_srcdir =\) .*|\1 ${PREFIX}/share/httpd|' |
198 | SUBST_MESSAGE.abs_srcdir= Fixing abs_srcdir | | 198 | SUBST_MESSAGE.abs_srcdir= Fixing abs_srcdir |
199 | | | 199 | |
200 | REPLACE_PERL= docs/cgi-examples/printenv | | 200 | REPLACE_PERL= docs/cgi-examples/printenv |
201 | | | 201 | |
202 | # Add dependencies for the modules that will be built. For each module | | 202 | # Add dependencies for the modules that will be built. For each module |
203 | # ap_mod listed in ${APACHE_MODULES}, _AP_DEPENDS.ap_mod is a whitespace | | 203 | # ap_mod listed in ${APACHE_MODULES}, _AP_DEPENDS.ap_mod is a whitespace |
204 | # separated list of dependencies or buildlink3.mk files needed to build | | 204 | # separated list of dependencies or buildlink3.mk files needed to build |
205 | # ap_mod, and _AP_CFG_ARGS.ap_mod is a whitespace separated list of | | 205 | # ap_mod, and _AP_CFG_ARGS.ap_mod is a whitespace separated list of |
206 | # configure script options for ap_mod. | | 206 | # configure script options for ap_mod. |
207 | # | | 207 | # |
208 | AP_DEPENDS.ssl= ../../security/openssl/buildlink3.mk | | 208 | AP_DEPENDS.ssl= ../../security/openssl/buildlink3.mk |
209 | AP_DEPENDS.deflate= ../../devel/zlib/buildlink3.mk | | 209 | AP_DEPENDS.deflate= ../../devel/zlib/buildlink3.mk |
210 | | | 210 | |
211 | AP_CFG_ARGS.ssl= --with-ssl=${BUILDLINK_PREFIX.openssl} | | 211 | AP_CFG_ARGS.ssl= --with-ssl=${BUILDLINK_PREFIX.openssl} |
212 | AP_CFG_ARGS.deflate= --with-z=${BUILDLINK_PREFIX.zlib} | | 212 | AP_CFG_ARGS.deflate= --with-z=${BUILDLINK_PREFIX.zlib} |
213 | | | 213 | |
214 | #.if ${APACHE_MODULES} == "all-shared" | | 214 | #.if ${APACHE_MODULES} == "all-shared" |
215 | .if !empty(PKG_OPTIONS:Mapache-shared-modules) | | 215 | .if !empty(PKG_OPTIONS:Mapache-shared-modules) |
216 | .include "${AP_DEPENDS.ssl}" | | 216 | .include "${AP_DEPENDS.ssl}" |
217 | .include "${AP_DEPENDS.deflate}" | | 217 | .include "${AP_DEPENDS.deflate}" |
218 | CONFIGURE_ARGS+= ${AP_CFG_ARGS.ssl} ${AP_CFG_ARGS.deflate} | | 218 | CONFIGURE_ARGS+= ${AP_CFG_ARGS.ssl} ${AP_CFG_ARGS.deflate} |
219 | .else | | 219 | .else |
220 | .for ap_mod in ${APACHE_MODULES} | | 220 | .for ap_mod in ${APACHE_MODULES} |
221 | . if defined(AP_DEPENDS.${ap_mod}) && !empty(AP_DEPENDS.${ap_mod}) | | 221 | . if defined(AP_DEPENDS.${ap_mod}) && !empty(AP_DEPENDS.${ap_mod}) |
222 | . for ap_depend in ${AP_DEPENDS.${ap_mod}} | | 222 | . for ap_depend in ${AP_DEPENDS.${ap_mod}} |
223 | . if exists(${ap_depend}) | | 223 | . if exists(${ap_depend}) |
224 | . include "${ap_depend}" | | 224 | . include "${ap_depend}" |
225 | . else | | 225 | . else |
226 | DEPENDS+= ${ap_depend} | | 226 | DEPENDS+= ${ap_depend} |
227 | . endif | | 227 | . endif |
228 | . endfor | | 228 | . endfor |
229 | . endif | | 229 | . endif |
230 | . if defined(AP_CFG_ARGS.${ap_mod}) && !empty(AP_CFG_ARGS.${ap_mod}) | | 230 | . if defined(AP_CFG_ARGS.${ap_mod}) && !empty(AP_CFG_ARGS.${ap_mod}) |
231 | CONFIGURE_ARGS+= ${AP_CFG_ARGS.${ap_mod}} | | 231 | CONFIGURE_ARGS+= ${AP_CFG_ARGS.${ap_mod}} |
232 | . endif | | 232 | . endif |
233 | .endfor | | 233 | .endfor |
234 | .endif | | 234 | .endif |
235 | | | 235 | |
236 | post-extract: | | 236 | post-extract: |
237 | ${TOUCH} ${WRKSRC}/build/libtool | | 237 | ${TOUCH} ${WRKSRC}/build/libtool |
238 | ${ECHO} "" >> ${WRKSRC}/docs/conf/extra/httpd-languages.conf.in | | 238 | ${ECHO} "" >> ${WRKSRC}/docs/conf/extra/httpd-languages.conf.in |
239 | | | 239 | |
240 | post-build: | | 240 | post-build: |
241 | ${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g" \ | | 241 | ${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g" \ |
242 | < ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert | | 242 | < ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert |
243 | | | 243 | |
244 | INSTALL_TARGET= install-conf install | | 244 | INSTALL_TARGET= install-conf install |
245 | INSTALL_MAKE_FLAGS+= sysconfdir="${EGDIR}" | | 245 | INSTALL_MAKE_FLAGS+= sysconfdir="${EGDIR}" |
246 | | | 246 | |
247 | post-install: | | 247 | post-install: |
248 | ${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${DESTDIR}${PREFIX}/share/httpd/build | | 248 | ${LN} -sf ${LOCALBASE}/libexec/apr/libtool ${DESTDIR}${PREFIX}/share/httpd/build |
249 | cd ${DESTDIR}${EGDIR} && \ | | 249 | cd ${DESTDIR}${EGDIR} && \ |
250 | for file in \ | | 250 | for file in \ |
251 | httpd.conf \ | | 251 | httpd.conf \ |
252 | extra/httpd-ssl.conf; \ | | 252 | extra/httpd-ssl.conf; \ |
253 | do \ | | 253 | do \ |
254 | ${AWK} ' \ | | 254 | ${AWK} ' \ |
255 | /^Listen[ ]*80/ { \ | | 255 | /^Listen[ ]*80/ { \ |
256 | printf "%s", "Listen 0.0.0.0:80\n"; \ | | 256 | printf "%s", "Listen 0.0.0.0:80\n"; \ |
257 | next; \ | | 257 | next; \ |
258 | } \ | | 258 | } \ |
259 | /^Listen[ ]*443/ { \ | | 259 | /^Listen[ ]*443/ { \ |
260 | printf "%s", "Listen 0.0.0.0:443\n"; \ | | 260 | printf "%s", "Listen 0.0.0.0:443\n"; \ |
261 | next; \ | | 261 | next; \ |
262 | } \ | | 262 | } \ |
263 | { print; } \ | | 263 | { print; } \ |
264 | ' < "$${file}" >> $${file}.new; \ | | 264 | ' < "$${file}" >> $${file}.new; \ |
265 | ${MV} -f $${file}.new $${file}; \ | | 265 | ${MV} -f $${file}.new $${file}; \ |
266 | done | | 266 | done |
267 | | | 267 | |
268 | ${LN} -sf ${SBINDIR}/envvars-std ${DESTDIR}${SBINDIR}/envvars | | 268 | ${LN} -sf ${SBINDIR}/envvars-std ${DESTDIR}${SBINDIR}/envvars |
269 | | | 269 | |
270 | ${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${DESTDIR}${PREFIX}/sbin | | 270 | ${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${DESTDIR}${PREFIX}/sbin |
271 | | | 271 | |
272 | for file in ${FIX_PERMS}; do \ | | 272 | for file in ${FIX_PERMS}; do \ |
273 | ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/sbin/$$file && \ | | 273 | ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/sbin/$$file && \ |
274 | ${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/sbin/$$file; \ | | 274 | ${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/sbin/$$file; \ |
275 | done | | 275 | done |
276 | | | 276 | |
277 | ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/share/httpd | | 277 | ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/share/httpd |
278 | ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/include/httpd | | 278 | ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/include/httpd |
279 | ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/lib/httpd | | 279 | ${CHOWN} -R ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/lib/httpd |
280 | ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/test-cgi | | 280 | ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/test-cgi |
281 | ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/printenv | | 281 | ${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/printenv |
282 | | | 282 | |
283 | for file in ${FIX_MAN_PERMS}; do \ | | 283 | for file in ${FIX_MAN_PERMS}; do \ |
284 | ${CHOWN} ${MANOWN}:${MANGRP} ${DESTDIR}${PREFIX}/${PKGMANDIR}/$$file; \ | | 284 | ${CHOWN} ${MANOWN}:${MANGRP} ${DESTDIR}${PREFIX}/${PKGMANDIR}/$$file; \ |
285 | done | | 285 | done |
286 | | | 286 | |
287 | ${CHMOD} -x ${DESTDIR}${PREFIX}/sbin/envvars-std | | 287 | ${CHMOD} -x ${DESTDIR}${PREFIX}/sbin/envvars-std |
288 | ${TEST} ! -f ${DESTDIR}${PREFIX}/sbin/suexec || ${CHMOD} -w ${DESTDIR}${PREFIX}/sbin/suexec | | 288 | ${TEST} ! -f ${DESTDIR}${PREFIX}/sbin/suexec || ${CHMOD} -w ${DESTDIR}${PREFIX}/sbin/suexec |
289 | | | 289 | |
290 | .include "../../mk/bsd.pkg.mk" | | 290 | .include "../../mk/bsd.pkg.mk" |