summaryrefslogtreecommitdiff
path: root/apache/apache_2.0.47.oe
blob: fa607b5c60c26a0d18aead6632159a91c15db305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
SRC_URI = http://ftp.epix.net/apache/httpd/httpd-${PV}.tar.gz \
	  file://${FILESDIR}/configure.patch;patch=1 \
	  file://${FILESDIR}/pcre-configure.patch;patch=1
SECTION = net
DEPENDS = virtual/libc expat openssl
RDEPENDS = libc6, libexpat1, libssl0.9.7

S = ${WORKDIR}/httpd-${PV}
sysconfdir_append = /apache

inherit autotools libtool

CFLAGS_append = " -DPATH_MAX=4096"
CFLAGS_prepend = "-I${STAGING_DIR}/target/include/openssl "
EXTRA_OECONF = --enable-ssl --with-ssl=${STAGING_DIR}/target --enable-dav --enable-dav-fs

do_configure () {
	(cd srclib/apr && ./buildconf)
	(cd srclib/apr-util && ./buildconf)

	cp srclib/apr/build/config.guess srclib/apr/build/config.sub \
	   srclib/apr/build/PrintPath srclib/apr/build/apr_common.m4 \
	   srclib/apr/build/find_apr.m4 $apu_src_dir/build/find_apu.m4 build

	(cd srclib/pcre && autoconf)

	aclocal -I build
	autoheader
	autoconf
	oe_runconf
}

do_compile () {
	touch srclib/apr-util/uri/gen_uri_delims.lo
	${BUILD_CC} srclib/apr-util/uri/gen_uri_delims.c -o srclib/apr-util/uri/gen_uri_delims
	touch srclib/pcre/dftables.lo
	${BUILD_CC} -I/usr/include/pcre srclib/pcre/dftables.c -o srclib/pcre/dftables
	cd server
	${BUILD_CC} -I${S}/srclib/apr/include -c gen_test_char.c && touch gen_test_char.lo
	${BUILD_CC} -I${S}/os/unix -I${S}/srclib/apr/include -I${S}/srclib/apr-util/include -I${S}/include -c util_debug.c && touch util_debug.lo
	${BUILD_CC} gen_test_char.o util_debug.o -o gen_test_char
	/bin/sh ${S}/srclib/apr/libtool --silent --mode=compile ${CC} -DPATH_MAX=4096 -I${S}/srclib/apr/include -prefer-non-pic -static -c gen_test_char.c && touch gen_test_char.lo
	/bin/sh ${S}/srclib/apr/libtool --silent --mode=compile ${CC} -DPATH_MAX=4096 -I${S}/os/unix -I${S}/srclib/apr/include -I${S}/srclib/apr-util/include -I${S}/include -prefer-non-pic -static -c util_debug.c && touch util_debug.lo
	touch gen_test_char
	cd ..
	oe_runmake
}

do_install_append () {
	install -d ${D}/${sysconfdir}/init.d
	cat ${FILESDIR}/init | \
		sed -e 's,/usr/sbin,${sbindir},g; \
			s,/usr/bin,${bindir},g; \
			s,/usr/lib,${libdir},g; \
			s,/etc/apache,${sysconfdir},g; \
			s,/usr,${prefix},g;' > ${D}/${sysconfdir}/init.d/apache
	chmod 755 ${D}/${sysconfdir}/init.d/apache
}

pkg_postinst () {
	if test -n "$D"; then
		D="-r $D"
	fi
	update-rc.d $D apache defaults 91 20
}

pkg_prerm () {
	if test -n "$D"; then
		D="-r $D"
	fi
	update-rc.d $D apache remove
}