summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb181
1 files changed, 181 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb
new file mode 100644
index 000000000..5bea87660
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb
@@ -0,0 +1,181 @@
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://apache-configure_perlbin.patch \
15 file://replace-lynx-to-curl-in-apachectl-script.patch \
16 file://apache-ssl-ltmain-rpath.patch \
17 file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
18 file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
19 file://configure-allow-to-disable-selinux-support.patch \
20 file://init \
21 file://apache2-volatile.conf \
22 file://apache2.service \
23 "
24
25LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
26SRC_URI[md5sum] = "04f19c60e810c028f5240a062668a688"
27SRC_URI[sha256sum] = "0c1694b2aad7765896faf92843452ee2555b9591ae10d4f19b245f2adfe85e58"
28
29S = "${WORKDIR}/httpd-${PV}"
30
31inherit autotools update-rc.d pkgconfig systemd
32
33SYSTEMD_SERVICE_${PN} = "apache2.service"
34SYSTEMD_AUTO_ENABLE_${PN} = "disable"
35
36SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
37
38CFLAGS_append = " -DPATH_MAX=4096"
39CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
40EXTRA_OECONF = "--enable-ssl \
41 --with-ssl=${STAGING_LIBDIR}/.. \
42 --with-expat=${STAGING_LIBDIR}/.. \
43 --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
44 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
45 --enable-info \
46 --enable-rewrite \
47 --with-dbm=sdbm \
48 --with-berkeley-db=no \
49 --localstatedir=/var/${BPN} \
50 --with-gdbm=no \
51 --with-ndbm=no \
52 --includedir=${includedir}/${BPN} \
53 --datadir=${datadir}/${BPN} \
54 --sysconfdir=${sysconfdir}/${BPN} \
55 --libexecdir=${libdir}/${BPN}/modules \
56 ap_cv_void_ptr_lt_long=no \
57 --enable-mpms-shared \
58 ac_cv_have_threadsafe_pollset=no"
59
60PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
61PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
62PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
63
64do_install_append() {
65 install -d ${D}/${sysconfdir}/init.d
66 cat ${WORKDIR}/init | \
67 sed -e 's,/usr/sbin/,${sbindir}/,g' \
68 -e 's,/usr/bin/,${bindir}/,g' \
69 -e 's,/usr/lib,${libdir}/,g' \
70 -e 's,/etc/,${sysconfdir}/,g' \
71 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
72 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
73 # remove the goofy original files...
74 rm -rf ${D}/${sysconfdir}/${BPN}/original
75 # Expat should be found in the staging area via DEPENDS...
76 rm -f ${D}/${libdir}/libexpat.*
77
78 install -d ${D}${sysconfdir}/${BPN}/conf.d
79 install -d ${D}${sysconfdir}/${BPN}/modules.d
80
81 # Ensure configuration file pulls in conf.d and modules.d
82 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
83 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
84 # match with that is in init script
85 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
86 # Set 'ServerName' to fix error messages when restart apache service
87 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
88
89 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
90 install -d ${D}${sysconfdir}/tmpfiles.d/
91 install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
92 fi
93
94 install -d ${D}${systemd_unitdir}/system
95 install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
96 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
97 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
98
99 chown -R root:root ${D}
100}
101
102do_install_append_class-target() {
103 sed -i -e 's,${STAGING_DIR_HOST},,g' \
104 -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
105 -e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
106
107 sed -i -e 's,${STAGING_DIR_HOST},,g' \
108 -e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
109}
110
111SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
112
113apache_sysroot_preprocess () {
114 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
115 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
116 install -d ${SYSROOT_DESTDIR}${sbindir}/
117 install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}/
118 sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
119 sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
120
121 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
122 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
123 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
124 sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
125 sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
126 sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
127 sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
128}
129
130#
131# implications - used by update-rc.d scripts
132#
133INITSCRIPT_NAME = "apache2"
134INITSCRIPT_PARAMS = "defaults 91 20"
135LEAD_SONAME = "libapr-1.so.0"
136
137PACKAGES = "${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
138
139CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
140 ${sysconfdir}/${BPN}/magic \
141 ${sysconfdir}/${BPN}/mime.types \
142 ${sysconfdir}/init.d/${BPN} "
143
144# we override here rather than append so that .so links are
145# included in the runtime package rather than here (-dev)
146# and to get build, icons, error into the -dev package
147FILES_${PN}-dev = "${datadir}/${BPN}/build \
148 ${datadir}/${BPN}/icons \
149 ${datadir}/${BPN}/error \
150 ${bindir}/apr-config ${bindir}/apu-config \
151 ${libdir}/apr*.exp \
152 ${includedir}/${BPN} \
153 ${libdir}/*.la \
154 ${libdir}/*.a \
155 ${bindir}/apxs \
156 "
157
158
159# manual to manual
160FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
161
162FILES_${PN}-scripts += "${bindir}/dbmmanage"
163
164#
165# override this too - here is the default, less datadir
166#
167FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
168 ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
169 ${libdir}/${BPN}"
170
171# we want htdocs and cgi-bin to go with the binary
172FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
173
174#make sure the lone .so links also get wrapped in the base package
175FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
176
177FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
178
179RDEPENDS_${PN} += "openssl libgcc"
180RDEPENDS_${PN}-scripts += "perl ${PN}"
181RDEPENDS_${PN}-dev = "perl"