summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.39.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.39.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.39.bb208
1 files changed, 208 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.39.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.39.bb
new file mode 100644
index 000000000..d58ccb8f2
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.39.bb
@@ -0,0 +1,208 @@
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 "
17
18SRC_URI_append_class-target = " \
19 file://0008-apache2-do-not-use-relative-path-for-gen_test_char.patch \
20 file://init \
21 file://apache2-volatile.conf \
22 file://apache2.service \
23 file://volatiles.04_apache2 \
24 "
25
26LIC_FILES_CHKSUM = "file://LICENSE;md5=d52d0fd0bc788f068e647116c01ddfcd"
27SRC_URI[md5sum] = "930e217ba2d71e708a3f1521ecae7ec0"
28SRC_URI[sha256sum] = "b4ca9d05773aa59b54d66cd8f4744b945289f084d3be17d7981d1783a5decfa2"
29
30S = "${WORKDIR}/httpd-${PV}"
31
32inherit autotools update-rc.d pkgconfig systemd update-alternatives
33
34DEPENDS = "openssl expat pcre apr apr-util apache2-native "
35
36CVE_PRODUCT = "http_server"
37
38SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
39
40PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
41PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
42PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
43PACKAGECONFIG[zlib] = "--enable-deflate,,zlib,zlib"
44
45CFLAGS_append = " -DPATH_MAX=4096"
46
47EXTRA_OECONF_class-target = "\
48 --enable-layout=Debian \
49 --prefix=${base_prefix} \
50 --exec_prefix=${exec_prefix} \
51 --includedir=${includedir}/${BPN} \
52 --sysconfdir=${sysconfdir}/${BPN} \
53 --datadir=${datadir}/${BPN} \
54 --libdir=${libdir} \
55 --libexecdir=${libdir}/${BPN}/modules \
56 --localstatedir=${localstatedir} \
57 --enable-ssl \
58 --with-dbm=sdbm \
59 --with-gdbm=no \
60 --with-ndbm=no \
61 --with-berkeley-db=no \
62 --enable-info \
63 --enable-rewrite \
64 --enable-mpms-shared \
65 ap_cv_void_ptr_lt_long=no \
66 ac_cv_have_threadsafe_pollset=no \
67 "
68
69EXTRA_OECONF_class-native = "\
70 --prefix=${prefix} \
71 --includedir=${includedir}/${BPN} \
72 --sysconfdir=${sysconfdir}/${BPN} \
73 --datadir=${datadir}/${BPN} \
74 --libdir=${libdir} \
75 --libexecdir=${libdir}/${BPN}/modules \
76 --localstatedir=${localstatedir} \
77 "
78
79do_configure_prepend() {
80 sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libdir}/cgi-bin:g' ${S}/config.layout
81}
82
83do_install_append_class-target() {
84 install -d ${D}/${sysconfdir}/init.d
85
86 cat ${WORKDIR}/init | \
87 sed -e 's,/usr/sbin/,${sbindir}/,g' \
88 -e 's,/usr/bin/,${bindir}/,g' \
89 -e 's,/usr/lib/,${libdir}/,g' \
90 -e 's,/etc/,${sysconfdir}/,g' \
91 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
92
93 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
94
95 # Remove the goofy original files...
96 rm -rf ${D}/${sysconfdir}/${BPN}/original
97
98 install -d ${D}${sysconfdir}/${BPN}/conf.d
99 install -d ${D}${sysconfdir}/${BPN}/modules.d
100
101 # Ensure configuration file pulls in conf.d and modules.d
102 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
103 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
104 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
105
106 # Match with that is in init script
107 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
108
109 # Set 'ServerName' to fix error messages when restart apache service
110 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
111
112 sed -i 's/^ServerRoot/#ServerRoot/' ${D}/${sysconfdir}/${BPN}/httpd.conf
113
114 sed -i -e 's,${STAGING_DIR_TARGET},,g' \
115 -e 's,${DEBUG_PREFIX_MAP},,g' \
116 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
117 -e 's,${HOSTTOOLS_DIR}/,,g' \
118 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
119 -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
120
121 sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
122 -e 's,${DEBUG_PREFIX_MAP},,g' \
123 -e 's,${RECIPE_SYSROOT},,g' \
124 -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
125 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
126 -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
127
128 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
129 install -d ${D}${sysconfdir}/tmpfiles.d/
130 install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
131
132 install -d ${D}${systemd_unitdir}/system
133 install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
134 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
135 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
136 elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
137 install -d ${D}${sysconfdir}/default/volatiles
138 install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
139 fi
140
141 rm -rf ${D}${localstatedir}
142 chown -R root:root ${D}
143}
144
145do_install_append_class-native() {
146 install -d ${D}${bindir} ${D}${libdir}
147 install -m 755 server/gen_test_char ${D}${bindir}
148}
149
150SYSROOT_PREPROCESS_FUNCS_append_class-target = "apache_sysroot_preprocess"
151
152apache_sysroot_preprocess() {
153 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
154 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}
155 install -d ${SYSROOT_DESTDIR}${sbindir}
156 install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}
157 sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
158 sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
159
160 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
161 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
162 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
163 sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
164 sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
165 sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
166 sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
167}
168
169# Implications - used by update-rc.d scripts
170INITSCRIPT_NAME = "apache2"
171INITSCRIPT_PARAMS = "defaults 91 20"
172
173SYSTEMD_SERVICE_${PN} = "apache2.service"
174SYSTEMD_AUTO_ENABLE_${PN} = "enable"
175
176ALTERNATIVE_${PN}-doc = "htpasswd.1"
177ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
178
179PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
180
181CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
182 ${sysconfdir}/${BPN}/magic \
183 ${sysconfdir}/${BPN}/mime.types"
184
185# We override here rather than append so that .so links are
186# included in the runtime package rather than here (-dev)
187# and to get icons, error into the -dev package
188FILES_${PN}-dev = "${datadir}/${BPN}/icons \
189 ${datadir}/${BPN}/error \
190 ${includedir}/${BPN} \
191 "
192
193FILES_${PN}-scripts += "${bindir}/dbmmanage"
194
195# Override this too - here is the default, less datadir
196FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir} \
197 ${sysconfdir} ${libdir}/${BPN}"
198
199# We want htdocs and cgi-bin to go with the binary
200FILES_${PN} += "${datadir}/${BPN}/ ${libdir}/cgi-bin"
201
202FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
203
204RDEPENDS_${PN} += "openssl libgcc"
205RDEPENDS_${PN}-scripts += "perl ${PN}"
206RDEPENDS_${PN}-dev = "perl"
207
208BBCLASSEXTEND = "native"