summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.34.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.34.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.34.bb197
1 files changed, 197 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.34.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.34.bb
new file mode 100644
index 000000000..6642f2bda
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.34.bb
@@ -0,0 +1,197 @@
1DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
2extensible web server."
3SUMMARY = "Apache HTTP Server"
4HOMEPAGE = "http://httpd.apache.org/"
5DEPENDS = "libtool-native apache2-native openssl expat pcre apr apr-util"
6SECTION = "net"
7LICENSE = "Apache-2.0"
8
9SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
10 file://server-makefile.patch \
11 file://httpd-2.4.1-corelimit.patch \
12 file://httpd-2.4.4-export.patch \
13 file://httpd-2.4.1-selinux.patch \
14 file://apache-configure_perlbin.patch \
15 file://replace-lynx-to-curl-in-apachectl-script.patch \
16 file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
17 file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
18 file://configure-allow-to-disable-selinux-support.patch \
19 file://init \
20 file://apache2-volatile.conf \
21 file://apache2.service \
22 file://volatiles.04_apache2 \
23 "
24
25LIC_FILES_CHKSUM = "file://LICENSE;md5=d52d0fd0bc788f068e647116c01ddfcd"
26SRC_URI[md5sum] = "818adca52f3be187fe45d6822755be95"
27SRC_URI[sha256sum] = "fa53c95631febb08a9de41fd2864cfff815cf62d9306723ab0d4b8d7aa1638f0"
28
29S = "${WORKDIR}/httpd-${PV}"
30
31inherit autotools update-rc.d pkgconfig systemd update-alternatives
32
33ALTERNATIVE_${PN}-doc = "htpasswd.1"
34ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
35
36SYSTEMD_SERVICE_${PN} = "apache2.service"
37SYSTEMD_AUTO_ENABLE_${PN} = "disable"
38
39SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
40
41CFLAGS_append = " -DPATH_MAX=4096"
42CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
43EXTRA_OECONF = "--enable-ssl \
44 --with-ssl=${STAGING_LIBDIR}/.. \
45 --with-expat=${STAGING_LIBDIR}/.. \
46 --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
47 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
48 --enable-info \
49 --enable-rewrite \
50 --with-dbm=sdbm \
51 --with-berkeley-db=no \
52 --localstatedir=/var/${BPN} \
53 --with-gdbm=no \
54 --with-ndbm=no \
55 --includedir=${includedir}/${BPN} \
56 --datadir=${datadir}/${BPN} \
57 --sysconfdir=${sysconfdir}/${BPN} \
58 --libexecdir=${libdir}/${BPN}/modules \
59 ap_cv_void_ptr_lt_long=no \
60 --enable-mpms-shared \
61 ac_cv_have_threadsafe_pollset=no"
62
63PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
64PACKAGECONFIG[selinux] = "--enable-selinux --enable-layout=Debian --prefix=${base_prefix}/,--disable-selinux,libselinux,libselinux"
65PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
66PACKAGECONFIG[zlib] = "--enable-deflate --with-z=${STAGING_LIBDIR},,zlib,zlib"
67
68do_configure_prepend() {
69 sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libdir}/cgi-bin:g' ${S}/config.layout
70}
71
72do_install_append() {
73 install -d ${D}/${sysconfdir}/init.d
74 cat ${WORKDIR}/init | \
75 sed -e 's,/usr/sbin/,${sbindir}/,g' \
76 -e 's,/usr/bin/,${bindir}/,g' \
77 -e 's,/usr/lib,${libdir}/,g' \
78 -e 's,/etc/,${sysconfdir}/,g' \
79 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
80 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
81 # remove the goofy original files...
82 rm -rf ${D}/${sysconfdir}/${BPN}/original
83 # Expat should be found in the staging area via DEPENDS...
84 rm -f ${D}/${libdir}/libexpat.*
85
86 install -d ${D}${sysconfdir}/${BPN}/conf.d
87 install -d ${D}${sysconfdir}/${BPN}/modules.d
88
89 # Ensure configuration file pulls in conf.d and modules.d
90 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
91 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
92 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
93 # match with that is in init script
94 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
95 # Set 'ServerName' to fix error messages when restart apache service
96 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
97
98 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
99 install -d ${D}${sysconfdir}/tmpfiles.d/
100 install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
101 elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
102 install -d ${D}${sysconfdir}/default/volatiles
103 install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
104 fi
105
106 install -d ${D}${systemd_unitdir}/system
107 install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
108 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
109 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
110
111 chown -R root:root ${D}
112}
113
114do_install_append_class-target() {
115 sed -i -e 's,${STAGING_DIR_HOST},,g' \
116 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
117 -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
118
119 sed -i -e 's,${STAGING_DIR_HOST},,g' \
120 -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
121 rm -rf ${D}${localstatedir}/run
122}
123
124SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
125
126apache_sysroot_preprocess () {
127 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
128 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
129 install -d ${SYSROOT_DESTDIR}${sbindir}/
130 install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}/
131 sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
132 sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
133
134 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
135 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
136 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
137 sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
138 sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
139 sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
140 sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
141}
142
143#
144# implications - used by update-rc.d scripts
145#
146INITSCRIPT_NAME = "apache2"
147INITSCRIPT_PARAMS = "defaults 91 20"
148LEAD_SONAME = "libapr-1.so.0"
149
150PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
151
152CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
153 ${sysconfdir}/${BPN}/magic \
154 ${sysconfdir}/${BPN}/mime.types \
155 ${sysconfdir}/init.d/${BPN} "
156
157# we override here rather than append so that .so links are
158# included in the runtime package rather than here (-dev)
159# and to get build, icons, error into the -dev package
160FILES_${PN}-dev = "${datadir}/${BPN}/build \
161 ${datadir}/${BPN}/icons \
162 ${datadir}/${BPN}/error \
163 ${bindir}/apr-config ${bindir}/apu-config \
164 ${libdir}/apr*.exp \
165 ${includedir}/${BPN} \
166 ${libdir}/*.la \
167 ${libdir}/*.a \
168 ${bindir}/apxs \
169 "
170
171
172# manual to manual
173FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
174
175FILES_${PN}-scripts += "${bindir}/dbmmanage"
176
177#
178# override this too - here is the default, less datadir
179#
180FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
181 ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
182 ${libdir}/${BPN}"
183
184# we want htdocs and cgi-bin to go with the binary
185FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
186
187#make sure the lone .so links also get wrapped in the base package
188FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
189
190FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
191
192RDEPENDS_${PN} += "openssl libgcc"
193RDEPENDS_${PN}-scripts += "perl ${PN}"
194RDEPENDS_${PN}-dev = "perl"
195
196FILES_${PN} += "${libdir}/cgi-bin"
197FILES_${PN} += "${datadir}/${BPN}/"