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