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