summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.59.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.59.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.59.bb247
1 files changed, 0 insertions, 247 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.59.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.59.bb
deleted file mode 100644
index 1632c6ccb1..0000000000
--- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.59.bb
+++ /dev/null
@@ -1,247 +0,0 @@
1DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
2extensible web server."
3SUMMARY = "Apache HTTP Server"
4HOMEPAGE = "http://httpd.apache.org/"
5SECTION = "net"
6LICENSE = "Apache-2.0"
7
8SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
9 file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
10 file://0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch \
11 file://0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch \
12 file://0004-apache2-log-the-SELinux-context-at-startup.patch \
13 file://0005-replace-lynx-to-curl-in-apachectl-script.patch \
14 file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \
15 file://0007-apache2-allow-to-disable-selinux-support.patch \
16 file://0008-Fix-perl-install-directory-to-usr-bin.patch \
17 file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
18 file://0001-make_exports.awk-not-expose-the-path.patch \
19 "
20
21SRC_URI:append:class-target = " \
22 file://0010-apache2-do-not-use-relative-path-for-gen_test_char.patch \
23 file://init \
24 file://apache2-volatile.conf \
25 file://apache2.service \
26 file://volatiles.04_apache2 \
27 "
28
29LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
30SRC_URI[sha256sum] = "ec51501ec480284ff52f637258135d333230a7d229c3afa6f6c2f9040e321323"
31
32S = "${WORKDIR}/httpd-${PV}"
33
34inherit autotools update-rc.d pkgconfig systemd multilib_script multilib_header
35
36DEPENDS = "openssl expat pcre apr apr-util apache2-native "
37
38CVE_PRODUCT = "apache:http_server"
39
40SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
41
42PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
43PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
44PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
45PACKAGECONFIG[zlib] = "--enable-deflate,,zlib,zlib"
46
47CFLAGS:append = " -DPATH_MAX=4096"
48
49EXTRA_OECONF:class-target = "\
50 --enable-layout=Debian \
51 --prefix=${base_prefix} \
52 --exec_prefix=${exec_prefix} \
53 --includedir=${includedir}/${BPN} \
54 --sysconfdir=${sysconfdir}/${BPN} \
55 --datadir=${datadir}/${BPN} \
56 --libdir=${libdir} \
57 --libexecdir=${libexecdir}/${BPN}/modules \
58 --localstatedir=${localstatedir} \
59 --enable-ssl \
60 --with-dbm=sdbm \
61 --with-gdbm=no \
62 --with-ndbm=no \
63 --with-berkeley-db=no \
64 --enable-info \
65 --enable-rewrite \
66 --with-mpm=prefork \
67 --enable-mpms-shared \
68 ap_cv_void_ptr_lt_long=no \
69 ac_cv_have_threadsafe_pollset=no \
70 "
71
72EXTRA_OECONF:class-native = "\
73 --prefix=${prefix} \
74 --includedir=${includedir}/${BPN} \
75 --sysconfdir=${sysconfdir}/${BPN} \
76 --datadir=${datadir}/${BPN} \
77 --libdir=${libdir} \
78 --libexecdir=${libdir}/${BPN}/modules \
79 --localstatedir=${localstatedir} \
80 "
81
82do_configure:prepend() {
83 sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' \
84 -e 's#\(installbuilddir:\s*\).*#\1${libexecdir}/${PN}/build#' \
85 ${S}/config.layout
86}
87
88do_install:append:class-target() {
89 install -d ${D}/${sysconfdir}/init.d
90
91 cat ${UNPACKDIR}/init | \
92 sed -e 's,/usr/sbin/,${sbindir}/,g' \
93 -e 's,/usr/bin/,${bindir}/,g' \
94 -e 's,/usr/lib/,${libdir}/,g' \
95 -e 's,/etc/,${sysconfdir}/,g' \
96 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
97
98 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
99
100 # Remove the goofy original files...
101 rm -rf ${D}/${sysconfdir}/${BPN}/original
102
103 install -d ${D}${sysconfdir}/${BPN}/conf.d
104 install -d ${D}${sysconfdir}/${BPN}/modules.d
105
106 # Ensure configuration file pulls in conf.d and modules.d
107 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
108 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
109 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
110
111 # Match with that is in init script
112 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
113
114 # Set 'ServerName' to fix error messages when restart apache service
115 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
116
117 sed -i 's/^ServerRoot/#ServerRoot/' ${D}/${sysconfdir}/${BPN}/httpd.conf
118
119 sed -i -e 's,${STAGING_DIR_TARGET},,g' \
120 -e 's,${DEBUG_PREFIX_MAP},,g' \
121 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \
122 -e 's,${HOSTTOOLS_DIR}/,,g' \
123 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
124 -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${libexecdir}/${PN}/build/config_vars.mk
125
126 sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
127 -e 's,${DEBUG_PREFIX_MAP},,g' \
128 -e 's,${RECIPE_SYSROOT},,g' \
129 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
130 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
131 -e 's,${WORKDIR}/recipe-sysroot/,,g' \
132 -e 's,".*/configure","configure",g' ${D}${libexecdir}/${PN}/build/config.nice
133
134 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
135 install -d ${D}${sysconfdir}/tmpfiles.d/
136 install -m 0644 ${UNPACKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
137
138 install -d ${D}${systemd_unitdir}/system
139 install -m 0644 ${UNPACKDIR}/apache2.service ${D}${systemd_unitdir}/system
140 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
141 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
142 elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
143 install -d ${D}${sysconfdir}/default/volatiles
144 install -m 0644 ${UNPACKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
145 fi
146
147 rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars*
148 chown -R root:root ${D}
149
150 oe_multilib_header apache2/ap_config_layout.h
151}
152
153do_install:append:class-native() {
154 install -d ${D}${bindir} ${D}${libdir}
155 install -m 755 server/gen_test_char ${D}${bindir}
156}
157
158SYSROOT_PREPROCESS_FUNCS:append:class-target = " apache_sysroot_preprocess"
159
160SYSROOT_DIRS += "${libexecdir}/${PN}/build"
161
162apache_sysroot_preprocess() {
163 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
164 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}
165 install -d ${SYSROOT_DESTDIR}${sbindir}
166 install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}
167 sed -i 's!\(my $installbuilddir = \)"\(.*\)"!\1"${STAGING_DIR_HOST}\2"!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
168
169 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
170 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
171 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
172 sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
173 sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
174 sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
175 sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${libexecdir}/${PN}/build/config_vars.mk
176}
177
178# Implications - used by update-rc.d scripts
179INITSCRIPT_NAME = "apache2"
180INITSCRIPT_PARAMS = "defaults 91 20"
181
182SYSTEMD_SERVICE:${PN} = "apache2.service"
183SYSTEMD_AUTO_ENABLE:${PN} = "enable"
184
185ALTERNATIVE:${PN}-doc = "htpasswd.1"
186ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
187
188MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apxs"
189
190PACKAGES = "${PN}-utils ${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
191
192CONFFILES:${PN} = "${sysconfdir}/${BPN}/httpd.conf \
193 ${sysconfdir}/${BPN}/magic \
194 ${sysconfdir}/${BPN}/mime.types \
195 ${sysconfdir}/${BPN}/extra/*"
196
197FILES:${PN}-utils = "${bindir}/ab \
198 ${bindir}/htdbm \
199 ${bindir}/htdigest \
200 ${bindir}/htpasswd \
201 ${bindir}/logresolve \
202 ${bindir}/httxt2dbm \
203 ${sbindir}/htcacheclean \
204 ${sbindir}/fcgistarter \
205 ${sbindir}/checkgid \
206 ${sbindir}/rotatelogs \
207 "
208
209# We override here rather than append so that .so links are
210# included in the runtime package rather than here (-dev)
211# and to get build, icons, error into the -dev package
212FILES:${PN}-dev = "${libexecdir}/${PN}/build \
213 ${datadir}/${BPN}/icons \
214 ${datadir}/${BPN}/error \
215 ${includedir}/${BPN} \
216 ${bindir}/apxs \
217 "
218
219# Add the manual to -doc
220FILES:${PN}-doc += " ${datadir}/${BPN}/manual"
221
222FILES:${PN}-scripts += "${bindir}/dbmmanage"
223
224# Override this too - here is the default, less datadir
225FILES:${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir} \
226 ${sysconfdir} ${libdir}/${BPN}"
227
228# We want htdocs and cgi-bin to go with the binary
229FILES:${PN} += "${datadir}/${BPN}/ ${libdir}/cgi-bin"
230
231FILES:${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
232
233RDEPENDS:${PN} += "openssl libgcc ${PN}-utils"
234RDEPENDS:${PN}-scripts += "perl ${PN}"
235RDEPENDS:${PN}-dev = "perl"
236
237BBCLASSEXTEND = "native"
238
239pkg_postinst:${PN}() {
240 if [ -z "$D" ]; then
241 if type systemd-tmpfiles >/dev/null; then
242 systemd-tmpfiles --create
243 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
244 ${sysconfdir}/init.d/populate-volatile.sh update
245 fi
246 fi
247}