2 DEPENDS
= "openssl expat libpcre"
6 #
------------------------------------------
7 # NOTE
: This package is currently only meant
8 #
to be built nativly on the target device
9 #
------------------------------------------
11 SRC_URI
= "http://www.apache.org/dist/httpd/httpd-${PV}.tar.gz \
14 S
= "${WORKDIR}/httpd-${PV}"
16 inherit autotools update
-rc.d
18 INITSCRIPT_NAME
= "apache"
19 INITSCRIPT_PARAMS
= "defaults 91 20"
21 CONFFILES_$
{PN
} = "${sysconfdir}/apache/httpd.conf \
22 ${sysconfdir}/apache/ssl.conf \
23 ${sysconfdir}/apache/magic \
24 ${sysconfdir}/apache/mime.types \
25 ${datadir}/apache/htdocs/index.html \
26 ${datadir}/apache/htdocs/apache_pb.gif \
29 PACKAGES
= "${PN}-dbg libaprutil libapr apache-dev apache-doc apache"
30 FILES_libapr
= "${libdir}/libapr*.so.0* ${libdir}/apr.exp"
31 FILES_libaprutil
= "${libdir}/libaprutil*.so.0* ${libdir}/aprutil.exp"
33 FILES_apache
-dev_prepend
= "${datadir}/apache/build ${bindir}/apr-config ${bindir}/apu-config "
34 FILES_apache
-doc_prepend
= "${datadir}/apache/manual "
36 FILES_$
{PN
} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* \
37 ${libdir}/*/ ${sysconfdir} ${sharedstatedir} ${localstatedir} \
40 CFLAGS_append
= " -DPATH_MAX=4096"
41 CFLAGS_prepend
= "-I${STAGING_INCDIR}/openssl "
42 EXTRA_OECONF
= "--enable-ssl \
43 --with-ssl=${STAGING_LIBDIR}/.. \
47 --with-berkeley-db=no \
48 --localstatedir=${localstatedir}/log/apache \
51 --datadir=${datadir}/apache \
52 --sysconfdir=${sysconfdir}/apache \
55 export LD_LIBRARY_PATH
= "${STAGING_LIBDIR}"
58 # Looks like rebuilding configure doesn't work
, so we are skipping
59 # that
and are just using the shipped one
63 do_install_append
() {
65 rm $
{D
}/$
{datadir
}/apache
/htdocs
/index
*
66 rm $
{D
}/$
{datadir
}/apache
/htdocs
/apache_pb2.
*
67 rm $
{D
}/$
{datadir
}/apache
/htdocs
/apache_pb.png
68 install
-m
0644 $
{FILESDIR
}/index.html $
{D
}/$
{datadir
}/apache
/htdocs
/
70 install
-d $
{D
}/$
{sysconfdir
}/init.d
71 cat $
{FILESDIR
}/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
/apache
77 chmod
755 $
{D
}/$
{sysconfdir
}/init.d
/apache
79 install
-m
0644 $
{FILESDIR
}/httpd.conf $
{D
}/$
{sysconfdir
}/apache
/httpd.conf
81 rm $
{D
}/$
{libdir
}/libexpat.
*
85 # Don't build apache unless we are building nativly
86 target
= bb.
data.getVar
("TARGET_ARCH", d
, 1)
87 build
= bb.
data.getVar
("BUILD_ARCH", d
, 1)
89 raise bb.parse.SkipPackage
("Apache will only build nativly (TARGET_ARCH == BUILD_ARCH)")