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