summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.12.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.12.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.12.bb164
1 files changed, 164 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.12.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.12.bb
new file mode 100644
index 0000000000..0712b4a93d
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.12.bb
@@ -0,0 +1,164 @@
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 = "http://www.apache.org/dist/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://apache-ssl-ltmain-rpath.patch \
17 file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
18 file://npn-patch-2.4.7.patch \
19 file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
20 file://configure-allow-to-disable-selinux-support.patch \
21 file://init \
22 file://apache2-volatile.conf \
23 file://apache2.service \
24 file://0001-SECURITY-CVE-2015-0228-cve.mitre.org.patch \
25 "
26
27LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
28SRC_URI[md5sum] = "b8dc8367a57a8d548a9b4ce16d264a13"
29SRC_URI[sha256sum] = "ad6d39edfe4621d8cc9a2791f6f8d6876943a9da41ac8533d77407a2e630eae4"
30
31S = "${WORKDIR}/httpd-${PV}"
32
33inherit autotools update-rc.d pkgconfig systemd
34
35SYSTEMD_SERVICE_${PN} = "apache2.service"
36SYSTEMD_AUTO_ENABLE_${PN} = "disable"
37
38SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
39
40CFLAGS_append = " -DPATH_MAX=4096"
41CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
42EXTRA_OECONF = "--enable-ssl \
43 --with-ssl=${STAGING_LIBDIR}/.. \
44 --with-expat=${STAGING_LIBDIR}/.. \
45 --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
46 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
47 --enable-info \
48 --enable-rewrite \
49 --with-dbm=sdbm \
50 --with-berkeley-db=no \
51 --localstatedir=/var/${BPN} \
52 --with-gdbm=no \
53 --with-ndbm=no \
54 --includedir=${includedir}/${BPN} \
55 --datadir=${datadir}/${BPN} \
56 --sysconfdir=${sysconfdir}/${BPN} \
57 --libexecdir=${libdir}/${BPN}/modules \
58 ap_cv_void_ptr_lt_long=no \
59 --enable-mpms-shared \
60 ac_cv_have_threadsafe_pollset=no"
61
62PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
63PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
64
65do_install_append() {
66 install -d ${D}/${sysconfdir}/init.d
67 cat ${WORKDIR}/init | \
68 sed -e 's,/usr/sbin/,${sbindir}/,g' \
69 -e 's,/usr/bin/,${bindir}/,g' \
70 -e 's,/usr/lib,${libdir}/,g' \
71 -e 's,/etc/,${sysconfdir}/,g' \
72 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
73 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
74 # remove the goofy original files...
75 rm -rf ${D}/${sysconfdir}/${BPN}/original
76 # Expat should be found in the staging area via DEPENDS...
77 rm -f ${D}/${libdir}/libexpat.*
78
79 install -d ${D}${sysconfdir}/${BPN}/conf.d
80 install -d ${D}${sysconfdir}/${BPN}/modules.d
81
82 # Ensure configuration file pulls in conf.d and modules.d
83 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
84 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
85 # match with that is in init script
86 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
87 # Set 'ServerName' to fix error messages when restart apache service
88 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
89
90 if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
91 install -d ${D}${sysconfdir}/tmpfiles.d/
92 install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
93 fi
94
95 install -d ${D}${systemd_unitdir}/system
96 install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
97 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
98 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
99}
100
101SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
102
103apache_sysroot_preprocess () {
104 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
105 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
106 sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
107 sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
108
109 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
110 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
111 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
112}
113
114#
115# implications - used by update-rc.d scripts
116#
117INITSCRIPT_NAME = "apache2"
118INITSCRIPT_PARAMS = "defaults 91 20"
119LEAD_SONAME = "libapr-1.so.0"
120
121PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
122
123CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
124 ${sysconfdir}/${BPN}/magic \
125 ${sysconfdir}/${BPN}/mime.types \
126 ${sysconfdir}/init.d/${BPN} "
127
128# we override here rather than append so that .so links are
129# included in the runtime package rather than here (-dev)
130# and to get build, icons, error into the -dev package
131FILES_${PN}-dev = "${datadir}/${BPN}/build \
132 ${datadir}/${BPN}/icons \
133 ${datadir}/${BPN}/error \
134 ${bindir}/apr-config ${bindir}/apu-config \
135 ${libdir}/apr*.exp \
136 ${includedir}/${BPN} \
137 ${libdir}/*.la \
138 ${libdir}/*.a \
139 ${bindir}/apxs \
140 "
141
142
143# manual to manual
144FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
145
146FILES_${PN}-scripts += "${bindir}/dbmmanage"
147
148#
149# override this too - here is the default, less datadir
150#
151FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
152 ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
153 ${libdir}/${BPN}"
154
155# we want htdocs and cgi-bin to go with the binary
156FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
157
158#make sure the lone .so links also get wrapped in the base package
159FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
160
161FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
162
163RDEPENDS_${PN} += "openssl libgcc"
164RDEPENDS_${PN}-scripts += "perl ${PN}"