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