summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.4.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.4.bb139
1 files changed, 139 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.4.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.4.bb
new file mode 100644
index 000000000..42a7b166e
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.4.bb
@@ -0,0 +1,139 @@
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://httpd-2.4.4-r1332643.patch \
15 file://apache-configure_perlbin.patch \
16 file://replace-lynx-to-curl-in-apachectl-script.patch \
17 file://apache-ssl-ltmain-rpath.patch \
18 file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
19 file://init"
20
21LIC_FILES_CHKSUM = "file://LICENSE;md5=eff226ae95d0516d6210ed77dfdf2dcc"
22SRC_URI[md5sum] = "0e712ee2119cd798c8ae39d5f11a9206"
23SRC_URI[sha256sum] = "92aabddeca76a4ac7330b143df1407bbf35574c7291c15172238ac598d97655c"
24
25S = "${WORKDIR}/httpd-${PV}"
26
27inherit autotools update-rc.d
28
29CFLAGS_append = " -DPATH_MAX=4096"
30CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
31EXTRA_OECONF = "--enable-ssl \
32 --with-ssl=${STAGING_LIBDIR}/.. \
33 --with-expat=${STAGING_LIBDIR}/.. \
34 --with-apr=${WORKDIR}/apr-1-config \
35 --with-apr-util=${WORKDIR}/apu-1-config \
36 --enable-info \
37 --enable-rewrite \
38 --with-dbm=sdbm \
39 --with-berkeley-db=no \
40 --localstatedir=/var/${BPN} \
41 --with-gdbm=no \
42 --with-ndbm=no \
43 --includedir=${includedir}/${BPN} \
44 --datadir=${datadir}/${BPN} \
45 --sysconfdir=${sysconfdir}/${BPN} \
46 --libexecdir=${libdir}/${BPN}/modules \
47 ap_cv_void_ptr_lt_long=no \
48 --enable-mpms-shared \
49 ac_cv_have_threadsafe_pollset=no"
50
51do_configure_prepend() {
52 # FIXME: this hack is required to work around an issue with apr/apr-util
53 # Can be removed when fixed in OE-Core (also revert --with-* options above)
54 # see http://bugzilla.yoctoproject.org/show_bug.cgi?id=3267
55 cp ${STAGING_BINDIR_CROSS}/apr-1-config ${STAGING_BINDIR_CROSS}/apu-1-config ${WORKDIR}
56 sed -i -e 's:location=source:location=installed:' ${WORKDIR}/apr-1-config
57 sed -i -e 's:location=source:location=installed:' ${WORKDIR}/apu-1-config
58}
59
60do_install_append() {
61 install -d ${D}/${sysconfdir}/init.d
62 cat ${WORKDIR}/init | \
63 sed -e 's,/usr/sbin/,${sbindir}/,g' \
64 -e 's,/usr/bin/,${bindir}/,g' \
65 -e 's,/usr/lib,${libdir}/,g' \
66 -e 's,/etc/,${sysconfdir}/,g' \
67 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
68 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
69 # remove the goofy original files...
70 rm -rf ${D}/${sysconfdir}/${BPN}/original
71 # Expat should be found in the staging area via DEPENDS...
72 rm -f ${D}/${libdir}/libexpat.*
73
74 install -d ${D}${sysconfdir}/${BPN}/conf.d
75 install -d ${D}${sysconfdir}/${BPN}/modules.d
76
77 # Ensure configuration file pulls in conf.d and modules.d
78 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
79 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
80}
81
82SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
83
84apache_sysroot_preprocess () {
85 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
86 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
87 sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
88 sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
89
90 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
91 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
92 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
93}
94
95#
96# implications - used by update-rc.d scripts
97#
98INITSCRIPT_NAME = "apache2"
99INITSCRIPT_PARAMS = "defaults 91 20"
100LEAD_SONAME = "libapr-1.so.0"
101
102PACKAGES = "${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
103
104CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
105 ${sysconfdir}/${BPN}/magic \
106 ${sysconfdir}/${BPN}/mime.types \
107 ${sysconfdir}/init.d/${BPN} "
108
109# we override here rather than append so that .so links are
110# included in the runtime package rather than here (-dev)
111# and to get build, icons, error into the -dev package
112FILES_${PN}-dev = "${datadir}/${BPN}/build \
113 ${datadir}/${BPN}/icons \
114 ${datadir}/${BPN}/error \
115 ${bindir}/apr-config ${bindir}/apu-config \
116 ${libdir}/apr*.exp \
117 ${includedir}/${BPN} \
118 ${libdir}/*.la \
119 ${libdir}/*.a"
120
121# manual to manual
122FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
123
124#
125# override this too - here is the default, less datadir
126#
127FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
128 ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
129 ${libdir}/${BPN}"
130
131# we want htdocs and cgi-bin to go with the binary
132FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
133
134#make sure the lone .so links also get wrapped in the base package
135FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
136
137FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
138
139RDEPENDS_${PN} += "openssl libgcc"