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