diff options
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb')
| -rw-r--r-- | meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb new file mode 100644 index 0000000000..f230f94070 --- /dev/null +++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb | |||
| @@ -0,0 +1,132 @@ | |||
| 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://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 | |||
| 21 | LIC_FILES_CHKSUM = "file://LICENSE;md5=eff226ae95d0516d6210ed77dfdf2dcc" | ||
| 22 | SRC_URI[md5sum] = "ea5e361ca37b8d7853404419dd502efe" | ||
| 23 | SRC_URI[sha256sum] = "dc9f3625ebc08bea55eeb0d16e71fba656f252e6cd0aa244ee7806dc3b022fea" | ||
| 24 | |||
| 25 | S = "${WORKDIR}/httpd-${PV}" | ||
| 26 | |||
| 27 | inherit autotools update-rc.d | ||
| 28 | |||
| 29 | CFLAGS_append = " -DPATH_MAX=4096" | ||
| 30 | CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl " | ||
| 31 | EXTRA_OECONF = "--enable-ssl \ | ||
| 32 | --with-ssl=${STAGING_LIBDIR}/.. \ | ||
| 33 | --with-expat=${STAGING_LIBDIR}/.. \ | ||
| 34 | --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ | ||
| 35 | --with-apr-util=${STAGING_BINDIR_CROSS}/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 | |||
| 51 | do_install_append() { | ||
| 52 | install -d ${D}/${sysconfdir}/init.d | ||
| 53 | cat ${WORKDIR}/init | \ | ||
| 54 | sed -e 's,/usr/sbin/,${sbindir}/,g' \ | ||
| 55 | -e 's,/usr/bin/,${bindir}/,g' \ | ||
| 56 | -e 's,/usr/lib,${libdir}/,g' \ | ||
| 57 | -e 's,/etc/,${sysconfdir}/,g' \ | ||
| 58 | -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN} | ||
| 59 | chmod 755 ${D}/${sysconfdir}/init.d/${BPN} | ||
| 60 | # remove the goofy original files... | ||
| 61 | rm -rf ${D}/${sysconfdir}/${BPN}/original | ||
| 62 | # Expat should be found in the staging area via DEPENDS... | ||
| 63 | rm -f ${D}/${libdir}/libexpat.* | ||
| 64 | |||
| 65 | install -d ${D}${sysconfdir}/${BPN}/conf.d | ||
| 66 | install -d ${D}${sysconfdir}/${BPN}/modules.d | ||
| 67 | |||
| 68 | # Ensure configuration file pulls in conf.d and modules.d | ||
| 69 | printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf | ||
| 70 | printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf | ||
| 71 | # match with that is in init script | ||
| 72 | printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf | ||
| 73 | } | ||
| 74 | |||
| 75 | SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess" | ||
| 76 | |||
| 77 | apache_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}/${BPN}/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}/${BPN}/build/config_vars.mk | ||
| 84 | sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk | ||
| 85 | sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk | ||
| 86 | } | ||
| 87 | |||
| 88 | # | ||
| 89 | # implications - used by update-rc.d scripts | ||
| 90 | # | ||
| 91 | INITSCRIPT_NAME = "apache2" | ||
| 92 | INITSCRIPT_PARAMS = "defaults 91 20" | ||
| 93 | LEAD_SONAME = "libapr-1.so.0" | ||
| 94 | |||
| 95 | PACKAGES = "${PN}-doc ${PN}-dev ${PN}-dbg ${PN}" | ||
| 96 | |||
| 97 | CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \ | ||
| 98 | ${sysconfdir}/${BPN}/magic \ | ||
| 99 | ${sysconfdir}/${BPN}/mime.types \ | ||
| 100 | ${sysconfdir}/init.d/${BPN} " | ||
| 101 | |||
| 102 | # we override here rather than append so that .so links are | ||
| 103 | # included in the runtime package rather than here (-dev) | ||
| 104 | # and to get build, icons, error into the -dev package | ||
| 105 | FILES_${PN}-dev = "${datadir}/${BPN}/build \ | ||
| 106 | ${datadir}/${BPN}/icons \ | ||
| 107 | ${datadir}/${BPN}/error \ | ||
| 108 | ${bindir}/apr-config ${bindir}/apu-config \ | ||
| 109 | ${libdir}/apr*.exp \ | ||
| 110 | ${includedir}/${BPN} \ | ||
| 111 | ${libdir}/*.la \ | ||
| 112 | ${libdir}/*.a" | ||
| 113 | |||
| 114 | # manual to manual | ||
| 115 | FILES_${PN}-doc += " ${datadir}/${BPN}/manual" | ||
| 116 | |||
| 117 | # | ||
| 118 | # override this too - here is the default, less datadir | ||
| 119 | # | ||
| 120 | FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \ | ||
| 121 | ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \ | ||
| 122 | ${libdir}/${BPN}" | ||
| 123 | |||
| 124 | # we want htdocs and cgi-bin to go with the binary | ||
| 125 | FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin" | ||
| 126 | |||
| 127 | #make sure the lone .so links also get wrapped in the base package | ||
| 128 | FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*" | ||
| 129 | |||
| 130 | FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug" | ||
| 131 | |||
| 132 | RDEPENDS_${PN} += "openssl libgcc" | ||
