surpport seeking the recorded video
[vuplus_openembedded] / recipes / apache2 / apache2_2.2.3.bb
1 SECTION = "net"
2 DESCRIPTION = "The apache v2 web server"
3 DEPENDS = "apache2-native openssl expat pcre"
4 RDEPENDS += "openssl"
5
6 PR = "r6"
7
8 SRC_URI = "http://apache.mirrors.tds.net/httpd/httpd-2.2.3.tar.bz2 \
9            file://dftables-makefile-patch;patch=1 \
10            file://apr-sockets-patch;patch=1 \
11            file://configure-patch;patch=1 \
12            file://server-makefile-patch;patch=1 \
13            file://configure-fix-cross-compile-ptr-check.patch;patch=1 \
14            file://init"
15
16 #
17 # over-ride needed since apache unpacks into httpd
18 #
19 S = "${WORKDIR}/httpd-${PV}"
20
21 #
22 # implications - autotools defines suitable do_configure, do_install, etc.
23 # update-rc.d adds hooks for rc-update.
24 #
25 #
26 inherit autotools update-rc.d
27
28 #
29 # implications - used by update-rc.d scripts
30 #
31 INITSCRIPT_NAME = "apache2"
32 INITSCRIPT_PARAMS = "defaults 91 20"
33 LEAD_SONAME = "libapr-1.so.0"
34
35 CONFFILES_${PN} = "${sysconfdir}/${PN}/httpd.conf \
36                    ${sysconfdir}/${PN}/magic \
37                    ${sysconfdir}/${PN}/mime.types \
38                    ${sysconfdir}/init.d/${PN} "
39
40 #
41 PACKAGES = "${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
42
43 # we override here rather than append so that .so links are
44 # included in the runtime package rather than here (-dev)
45 # and to get build, icons, error into the -dev package
46 FILES_${PN}-dev = "${datadir}/${PN}/build \
47                 ${datadir}/${PN}/icons \
48                 ${datadir}/${PN}/error \
49                 ${bindir}/apr-config ${bindir}/apu-config \
50                 ${libdir}/apr*.exp \
51                 ${includedir}/${PN} \
52                 ${libdir}/*.la \
53                 ${libdir}/*.a"
54
55 # manual to manual
56 FILES_${PN}-doc += " ${datadir}/${PN}/manual"
57
58 #
59 # override this too - here is the default, less datadir
60 #
61 FILES_${PN} =  "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
62                 ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
63                 ${libdir}/${PN}"
64
65 # we want htdocs and cgi-bin to go with the binary
66 FILES_${PN} += "${datadir}/${PN}/htdocs ${datadir}/${PN}/cgi-bin"
67
68 #make sure the lone .so links also get wrapped in the base package
69 FILES_${PN} += " ${libdir}/lib*.so ${libdir}/pkgconfig/*"
70
71 CFLAGS_append = " -DPATH_MAX=4096"
72 CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
73 EXTRA_OECONF = "--enable-ssl \
74                 --with-ssl=${STAGING_LIBDIR}/.. \
75                 --with-expat=${STAGING_LIBDIR}/.. \
76                 --enable-info \
77                 --enable-rewrite \
78                 --with-dbm=sdbm \
79                 --with-berkeley-db=no \
80                 --localstatedir=/var/${PN} \
81                 --with-gdbm=no \
82                 --with-ndbm=no \
83                 --includedir=${includedir}/${PN} \
84                 --datadir=${datadir}/${PN} \
85                 --sysconfdir=${sysconfdir}/${PN} \
86                 "
87
88 #
89 # here we over-ride the autotools provided do_configure.
90 #
91 do_configure() {
92         oe_runconf
93 }
94
95 do_install_append() {
96         install -d ${D}/${sysconfdir}/init.d
97         cat ${WORKDIR}/init | \
98                 sed -e 's,/usr/sbin/,${sbindir}/,g' \
99                     -e 's,/usr/bin/,${bindir}/,g' \
100                     -e 's,/usr/lib,${libdir}/,g' \
101                     -e 's,/etc/,${sysconfdir}/,g' \
102                     -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${PN}
103         chmod 755 ${D}/${sysconfdir}/init.d/${PN}
104 # remove the goofy original files...
105         rm -rf ${D}/${sysconfdir}/${PN}/original
106 # Expat should be found in the staging area via DEPENDS...
107         rm -f ${D}/${libdir}/libexpat.*
108 }