summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.18.bb
diff options
context:
space:
mode:
authorfan.xin <fan.xin@jp.fujitsu.com>2015-12-15 11:02:51 +0900
committerMartin Jansa <Martin.Jansa@gmail.com>2016-01-04 14:54:00 +0100
commitc54361fc1e7c3f021a4544fc9df3c7896afdf61c (patch)
treebfa33d981243a789427ace860389fe7f11cda276 /meta-webserver/recipes-httpd/apache2/apache2_2.4.18.bb
parent28ac147f3582ac006772592fcf31cdae1b927e91 (diff)
downloadmeta-openembedded-c54361fc1e7c3f021a4544fc9df3c7896afdf61c.tar.gz
apache2: Upgrade 2.4.16 -> 2.4.18
1. Upgrade apache2 from 2.4.16 to 2.4.18 The changes in 2.4.18 is shown in following URL. http://ftp.meisei-u.ac.jp/mirror/apache/dist//httpd/CHANGES_2.4.18 2. Delete patch file npn-patch-2.4.7.patch due to this patch file can not be applied to the apache2 2.4.18's source code. The NPN support was removed with r1676004. NPN is now quite unlikely to find its way into a stable release. https://bz.apache.org/bugzilla/show_bug.cgi?id=52210 Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.18.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.18.bb178
1 files changed, 178 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.18.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.18.bb
new file mode 100644
index 0000000000..8ca6d000c2
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.18.bb
@@ -0,0 +1,178 @@
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://0001-configure-use-pkg-config-for-PCRE-detection.patch \
19 file://configure-allow-to-disable-selinux-support.patch \
20 file://init \
21 file://apache2-volatile.conf \
22 file://apache2.service \
23 "
24
25LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
26SRC_URI[md5sum] = "3690b3cc991b7dfd22aea9e1264a11b9"
27SRC_URI[sha256sum] = "0644b050de41f5c9f67c825285049b144690421acb709b06fe53eddfa8a9fd4c"
28
29S = "${WORKDIR}/httpd-${PV}"
30
31inherit autotools update-rc.d pkgconfig systemd
32
33SYSTEMD_SERVICE_${PN} = "apache2.service"
34SYSTEMD_AUTO_ENABLE_${PN} = "disable"
35
36SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
37
38CFLAGS_append = " -DPATH_MAX=4096"
39CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
40EXTRA_OECONF = "--enable-ssl \
41 --with-ssl=${STAGING_LIBDIR}/.. \
42 --with-expat=${STAGING_LIBDIR}/.. \
43 --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
44 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
45 --enable-info \
46 --enable-rewrite \
47 --with-dbm=sdbm \
48 --with-berkeley-db=no \
49 --localstatedir=/var/${BPN} \
50 --with-gdbm=no \
51 --with-ndbm=no \
52 --includedir=${includedir}/${BPN} \
53 --datadir=${datadir}/${BPN} \
54 --sysconfdir=${sysconfdir}/${BPN} \
55 --libexecdir=${libdir}/${BPN}/modules \
56 ap_cv_void_ptr_lt_long=no \
57 --enable-mpms-shared \
58 ac_cv_have_threadsafe_pollset=no"
59
60PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
61PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
62
63do_install_append() {
64 install -d ${D}/${sysconfdir}/init.d
65 cat ${WORKDIR}/init | \
66 sed -e 's,/usr/sbin/,${sbindir}/,g' \
67 -e 's,/usr/bin/,${bindir}/,g' \
68 -e 's,/usr/lib,${libdir}/,g' \
69 -e 's,/etc/,${sysconfdir}/,g' \
70 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
71 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
72 # remove the goofy original files...
73 rm -rf ${D}/${sysconfdir}/${BPN}/original
74 # Expat should be found in the staging area via DEPENDS...
75 rm -f ${D}/${libdir}/libexpat.*
76
77 install -d ${D}${sysconfdir}/${BPN}/conf.d
78 install -d ${D}${sysconfdir}/${BPN}/modules.d
79
80 # Ensure configuration file pulls in conf.d and modules.d
81 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
82 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
83 # match with that is in init script
84 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
85 # Set 'ServerName' to fix error messages when restart apache service
86 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
87
88 if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
89 install -d ${D}${sysconfdir}/tmpfiles.d/
90 install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
91 fi
92
93 install -d ${D}${systemd_unitdir}/system
94 install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
95 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
96 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
97
98 chown -R root:root ${D}
99}
100
101do_install_append_class-target() {
102 sed -i -e 's,${STAGING_DIR_HOST},,g' \
103 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
104 -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
105
106 sed -i -e 's,${STAGING_DIR_HOST},,g' \
107 -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
108}
109
110SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
111
112apache_sysroot_preprocess () {
113 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
114 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
115 sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
116 sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
117
118 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
119 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
120 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
121 sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
122 sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
123 sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
124 sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
125}
126
127#
128# implications - used by update-rc.d scripts
129#
130INITSCRIPT_NAME = "apache2"
131INITSCRIPT_PARAMS = "defaults 91 20"
132LEAD_SONAME = "libapr-1.so.0"
133
134PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
135
136CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
137 ${sysconfdir}/${BPN}/magic \
138 ${sysconfdir}/${BPN}/mime.types \
139 ${sysconfdir}/init.d/${BPN} "
140
141# we override here rather than append so that .so links are
142# included in the runtime package rather than here (-dev)
143# and to get build, icons, error into the -dev package
144FILES_${PN}-dev = "${datadir}/${BPN}/build \
145 ${datadir}/${BPN}/icons \
146 ${datadir}/${BPN}/error \
147 ${bindir}/apr-config ${bindir}/apu-config \
148 ${libdir}/apr*.exp \
149 ${includedir}/${BPN} \
150 ${libdir}/*.la \
151 ${libdir}/*.a \
152 ${bindir}/apxs \
153 "
154
155
156# manual to manual
157FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
158
159FILES_${PN}-scripts += "${bindir}/dbmmanage"
160
161#
162# override this too - here is the default, less datadir
163#
164FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
165 ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
166 ${libdir}/${BPN}"
167
168# we want htdocs and cgi-bin to go with the binary
169FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
170
171#make sure the lone .so links also get wrapped in the base package
172FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
173
174FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
175
176RDEPENDS_${PN} += "openssl libgcc"
177RDEPENDS_${PN}-scripts += "perl ${PN}"
178RDEPENDS_${PN}-dev = "perl"