diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-07-17 11:27:39 +0100 |
|---|---|---|
| committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-10-03 14:36:16 +0100 |
| commit | 25ba859ab6ca18fb0391802a39300c408ab13420 (patch) | |
| tree | 3d6b419afc8fffb8142b71ec943da9a312c39859 /meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb | |
| parent | 520d3a14c999c52f30bb4e25c8f68e75a49663a7 (diff) | |
| download | meta-openembedded-25ba859ab6ca18fb0391802a39300c408ab13420.tar.gz | |
apache2: add from OE-Classic, update to version 2.4.2 and fix
* Enable threading for PHP
* Backport a number of patches
* Use apachectl in init script
* Install modules into a sane location
* Ensure apxs script is installed into sysroot in crossscripts directory
and modified so that it works for building PHP
* Install httpd executable for native version so that PHP configure
script can call it
* Rename server-makefile-patch to server-makefile.patch and drop
apply=yes
* Add LIC_FILES_CHKSUM
* Fix packaging QA warnings
* Add LSB headers to init script
* Clean out some cruft and move packaging stuff after do_install
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
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.bb | 130 |
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 0000000000..15c4d024fe --- /dev/null +++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb | |||
| @@ -0,0 +1,130 @@ | |||
| 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 | RDEPENDS_${PN} += "openssl libgcc" | ||
| 7 | SECTION = "net" | ||
| 8 | LICENSE = "Apache-2.0" | ||
| 9 | PR = "r0" | ||
| 10 | |||
| 11 | SRC_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 | |||
| 27 | LIC_FILES_CHKSUM = "file://LICENSE;md5=eff226ae95d0516d6210ed77dfdf2dcc" | ||
| 28 | SRC_URI[md5sum] = "6bb12f726e22656f0ad2baf91f1f8329" | ||
| 29 | SRC_URI[sha256sum] = "5382f9c507d3d02706e33d6308ea041f39e8511b5948aef0ca188df8f90159b8" | ||
| 30 | |||
| 31 | S = "${WORKDIR}/httpd-${PV}" | ||
| 32 | |||
| 33 | inherit autotools update-rc.d | ||
| 34 | |||
| 35 | CFLAGS_append = " -DPATH_MAX=4096" | ||
| 36 | CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl " | ||
| 37 | EXTRA_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 | |||
| 57 | do_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 | |||
| 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}/${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 | # | ||
| 90 | INITSCRIPT_NAME = "apache2" | ||
| 91 | INITSCRIPT_PARAMS = "defaults 91 20" | ||
| 92 | LEAD_SONAME = "libapr-1.so.0" | ||
| 93 | |||
| 94 | CONFFILES_${PN} = "${sysconfdir}/${PN}/httpd.conf \ | ||
| 95 | ${sysconfdir}/${PN}/magic \ | ||
| 96 | ${sysconfdir}/${PN}/mime.types \ | ||
| 97 | ${sysconfdir}/init.d/${PN} " | ||
| 98 | |||
| 99 | PACKAGES = "${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 | ||
| 104 | FILES_${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 | ||
| 114 | FILES_${PN}-doc += " ${datadir}/${PN}/manual" | ||
| 115 | |||
| 116 | # | ||
| 117 | # override this too - here is the default, less datadir | ||
| 118 | # | ||
| 119 | FILES_${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 | ||
| 124 | FILES_${PN} += "${datadir}/${PN}/htdocs ${datadir}/${PN}/cgi-bin" | ||
| 125 | |||
| 126 | #make sure the lone .so links also get wrapped in the base package | ||
| 127 | FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*" | ||
| 128 | |||
| 129 | FILES_${PN}-dbg += "${libdir}/${PN}/modules/.debug" | ||
| 130 | |||
