]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/apache/apache_2.0.54.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / apache / apache_2.0.54.bb
1 MAINTAINER="David Karlstrom <daka@nslu2-linux.org>"
2 SECTION = "net"
3 DEPENDS = "openssl expat pcre"
4
5 PR = "r4"
6
7 # ------------------------------------------
8 # NOTE: This package is currently only meant
9 # to be built nativly on the target device
10 # ------------------------------------------
11
12 SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.gz \
13            "
14
15 S = "${WORKDIR}/httpd-${PV}"
16
17 inherit autotools update-rc.d
18
19 INITSCRIPT_NAME = "apache"
20 INITSCRIPT_PARAMS = "defaults 91 20"
21
22 CONFFILES_${PN} = "${sysconfdir}/apache/httpd.conf \
23                    ${sysconfdir}/apache/ssl.conf \
24                    ${sysconfdir}/apache/magic \
25                    ${sysconfdir}/apache/mime.types \
26                    ${datadir}/apache/htdocs/index.html \
27                    ${datadir}/apache/htdocs/apache_pb.gif \
28                   "
29
30 PACKAGES = "libaprutil libapr apache-dev apache-doc apache"
31 FILES_libapr = "${libdir}/libapr*.so.0* ${libdir}/apr.exp"
32 FILES_libaprutil = "${libdir}/libaprutil*.so.0* ${libdir}/aprutil.exp"
33
34 FILES_apache-dev_prepend = "${datadir}/apache/build ${bindir}/apr-config ${bindir}/apu-config "
35 FILES_apache-doc_prepend = "${datadir}/apache/manual "
36
37 FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* \
38                ${libdir}/*/ ${sysconfdir} ${sharedstatedir} ${localstatedir} \
39                ${datadir}/apache"
40
41 CFLAGS_append = " -DPATH_MAX=4096"
42 CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
43 EXTRA_OECONF = "--enable-ssl \
44                 --with-ssl=${STAGING_LIBDIR}/.. \
45                 --enable-dav \
46                 --enable-dav-fs \
47                 --with-dbm=sdbm \
48                 --with-berkeley-db=no \
49                 --localstatedir=${localstatedir}/log/apache \
50                 --with-gdbm=no \
51                 --with-ndbm=no \
52                 --datadir=${datadir}/apache \
53                 --sysconfdir=${sysconfdir}/apache \
54                 "
55
56 export LD_LIBRARY_PATH=${STAGING_LIBDIR}
57
58 do_configure () {
59         # Looks like rebuilding configure doesn't work, so we are skipping
60         # that and are just using the shipped one
61         oe_runconf
62 }
63
64 do_install_append () {
65         set -x
66         rm ${D}/${datadir}/apache/htdocs/index*
67         rm ${D}/${datadir}/apache/htdocs/apache_pb2.*
68         rm ${D}/${datadir}/apache/htdocs/apache_pb.png
69         install -m 0644 ${FILESDIR}/index.html ${D}/${datadir}/apache/htdocs/
70
71         install -d ${D}/${sysconfdir}/init.d
72         cat ${FILESDIR}/init | \
73                 sed -e 's,/usr/sbin/,${sbindir}/,g' \
74                     -e 's,/usr/bin/,${bindir}/,g' \
75                     -e 's,/usr/lib,${libdir}/,g' \
76                     -e 's,/etc/,${sysconfdir}/,g' \
77                     -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/apache
78         chmod 755 ${D}/${sysconfdir}/init.d/apache
79         
80         install -m 0644 ${FILESDIR}/httpd.conf ${D}/${sysconfdir}/apache/httpd.conf
81         
82         rm ${D}/${libdir}/libexpat.*
83 }
84
85 python () {
86         # Don't build apache unless we are building nativly
87         target = bb.data.getVar("TARGET_ARCH", d, 1)
88         build = bb.data.getVar("BUILD_ARCH", d, 1)
89         if target != build:
90                 raise bb.parse.SkipPackage("Apache will only build nativly (TARGET_ARCH == BUILD_ARCH)")
91 }
92