mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-17 04:37:19 +00:00
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>
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
|
||||
extensible web server."
|
||||
SUMMARY = "Apache HTTP Server"
|
||||
HOMEPAGE = "http://httpd.apache.org/"
|
||||
DEPENDS = "libtool-native apache2-native openssl expat pcre apr apr-util"
|
||||
RDEPENDS_${PN} += "openssl libgcc"
|
||||
SECTION = "net"
|
||||
LICENSE = "Apache-2.0"
|
||||
PR = "r0"
|
||||
|
||||
SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
|
||||
file://server-makefile.patch \
|
||||
file://fix-libtool-name.patch \
|
||||
file://httpd-2.4.1-corelimit.patch \
|
||||
file://httpd-2.4.1-export.patch \
|
||||
file://httpd-2.4.1-selinux.patch \
|
||||
file://httpd-2.4.2-r1326980+.patch \
|
||||
file://httpd-2.4.2-r1327036+.patch \
|
||||
file://httpd-2.4.2-r1332643.patch \
|
||||
file://httpd-2.4.2-r1337344+.patch \
|
||||
file://httpd-2.4.2-restart.patch \
|
||||
file://apache-configure_perlbin.patch \
|
||||
file://replace-lynx-to-curl-in-apachectl-script.patch \
|
||||
file://apache-ssl-ltmain-rpath.patch \
|
||||
file://init"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=eff226ae95d0516d6210ed77dfdf2dcc"
|
||||
SRC_URI[md5sum] = "6bb12f726e22656f0ad2baf91f1f8329"
|
||||
SRC_URI[sha256sum] = "5382f9c507d3d02706e33d6308ea041f39e8511b5948aef0ca188df8f90159b8"
|
||||
|
||||
S = "${WORKDIR}/httpd-${PV}"
|
||||
|
||||
inherit autotools update-rc.d
|
||||
|
||||
CFLAGS_append = " -DPATH_MAX=4096"
|
||||
CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
|
||||
EXTRA_OECONF = "--enable-ssl \
|
||||
--with-ssl=${STAGING_LIBDIR}/.. \
|
||||
--with-expat=${STAGING_LIBDIR}/.. \
|
||||
--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
|
||||
--with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
|
||||
--enable-info \
|
||||
--enable-rewrite \
|
||||
--with-dbm=sdbm \
|
||||
--with-berkeley-db=no \
|
||||
--localstatedir=/var/${PN} \
|
||||
--with-gdbm=no \
|
||||
--with-ndbm=no \
|
||||
--includedir=${includedir}/${PN} \
|
||||
--datadir=${datadir}/${PN} \
|
||||
--sysconfdir=${sysconfdir}/${PN} \
|
||||
--libexecdir=${libdir}/${PN}/modules \
|
||||
ap_cv_void_ptr_lt_long=no \
|
||||
--enable-mpms-shared \
|
||||
ac_cv_have_threadsafe_pollset=no"
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}/${sysconfdir}/init.d
|
||||
cat ${WORKDIR}/init | \
|
||||
sed -e 's,/usr/sbin/,${sbindir}/,g' \
|
||||
-e 's,/usr/bin/,${bindir}/,g' \
|
||||
-e 's,/usr/lib,${libdir}/,g' \
|
||||
-e 's,/etc/,${sysconfdir}/,g' \
|
||||
-e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${PN}
|
||||
chmod 755 ${D}/${sysconfdir}/init.d/${PN}
|
||||
# remove the goofy original files...
|
||||
rm -rf ${D}/${sysconfdir}/${PN}/original
|
||||
# Expat should be found in the staging area via DEPENDS...
|
||||
rm -f ${D}/${libdir}/libexpat.*
|
||||
|
||||
# Ensure configuration file pulls in modules.d
|
||||
printf "\nInclude ${sysconfdir}/${PN}/modules.d/*\n\n" >> ${D}/${sysconfdir}/${PN}/httpd.conf
|
||||
}
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
|
||||
|
||||
apache_sysroot_preprocess () {
|
||||
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||
install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||
sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${PN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
|
||||
sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
|
||||
|
||||
sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${PN}/build/config_vars.mk
|
||||
sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${PN}/build/config_vars.mk
|
||||
}
|
||||
|
||||
#
|
||||
# implications - used by update-rc.d scripts
|
||||
#
|
||||
INITSCRIPT_NAME = "apache2"
|
||||
INITSCRIPT_PARAMS = "defaults 91 20"
|
||||
LEAD_SONAME = "libapr-1.so.0"
|
||||
|
||||
CONFFILES_${PN} = "${sysconfdir}/${PN}/httpd.conf \
|
||||
${sysconfdir}/${PN}/magic \
|
||||
${sysconfdir}/${PN}/mime.types \
|
||||
${sysconfdir}/init.d/${PN} "
|
||||
|
||||
PACKAGES = "${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
|
||||
|
||||
# we override here rather than append so that .so links are
|
||||
# included in the runtime package rather than here (-dev)
|
||||
# and to get build, icons, error into the -dev package
|
||||
FILES_${PN}-dev = "${datadir}/${PN}/build \
|
||||
${datadir}/${PN}/icons \
|
||||
${datadir}/${PN}/error \
|
||||
${bindir}/apr-config ${bindir}/apu-config \
|
||||
${libdir}/apr*.exp \
|
||||
${includedir}/${PN} \
|
||||
${libdir}/*.la \
|
||||
${libdir}/*.a"
|
||||
|
||||
# manual to manual
|
||||
FILES_${PN}-doc += " ${datadir}/${PN}/manual"
|
||||
|
||||
#
|
||||
# override this too - here is the default, less datadir
|
||||
#
|
||||
FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
|
||||
${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
|
||||
${libdir}/${PN}"
|
||||
|
||||
# we want htdocs and cgi-bin to go with the binary
|
||||
FILES_${PN} += "${datadir}/${PN}/htdocs ${datadir}/${PN}/cgi-bin"
|
||||
|
||||
#make sure the lone .so links also get wrapped in the base package
|
||||
FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
|
||||
|
||||
FILES_${PN}-dbg += "${libdir}/${PN}/modules/.debug"
|
||||
|
||||
Reference in New Issue
Block a user