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