dd8e91a35c6e9cc92af56f57ea67e20178b88867
Hanno Böck apache mit logging

Hanno Böck authored 17 years ago

1) # Copyright 1999-2007 Gentoo Foundation
2) # Distributed under the terms of the GNU General Public License v2
3) # $Header: /var/cvsroot/gentoo-x86/www-servers/apache/apache-2.2.6-r3.ebuild,v 1.1 2007/10/25 02:07:54 hollow Exp $
4) 
5) inherit eutils flag-o-matic multilib autotools
6) 
7) # latest gentoo apache files
8) GENTOO_PATCHNAME="gentoo-${PF}"
9) GENTOO_PATCHSTAMP="20071025"
10) GENTOO_DEVSPACE="hollow"
11) GENTOO_PATCHDIR="${WORKDIR}/${GENTOO_PATCHNAME}"
12) 
13) DESCRIPTION="The Apache Web Server."
14) HOMEPAGE="http://httpd.apache.org/"
15) SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
16) 		http://dev.gentoo.org/~${GENTOO_DEVSPACE}/dist/apache/${GENTOO_PATCHNAME}-${GENTOO_PATCHSTAMP}.tar.bz2"
17) 
18) # some helper scripts are apache-1.1, thus both are here
19) LICENSE="Apache-2.0 Apache-1.1"
20) SLOT="2"
21) KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
22) IUSE="debug doc ldap mpm-event mpm-itk mpm-peruser mpm-prefork mpm-worker no-suexec selinux ssl static-modules threads"
23) 
24) DEPEND="dev-lang/perl
25) 	=dev-libs/apr-1*
26) 	=dev-libs/apr-util-1*
27) 	dev-libs/expat
28) 	dev-libs/libpcre
29) 	sys-libs/zlib
30) 	ldap? ( =net-nds/openldap-2* )
31) 	selinux? ( sec-policy/selinux-apache )
32) 	ssl? ( dev-libs/openssl )
33) 	!=www-servers/apache-1*
34) 	!=app-admin/apache-tools-2.2.4-r2"
35) 
36) RDEPEND="${DEPEND}
37) 	app-misc/mime-types"
38) 
39) PDEPEND="~app-admin/apache-tools-${PV}"
40) 
41) S="${WORKDIR}/httpd-${PV}"
42) 
43) pkg_setup() {
44) 	if use ldap && ! built_with_use 'dev-libs/apr-util' ldap ; then
45) 		eerror "dev-libs/apr-util is missing LDAP support. For apache to have"
46) 		eerror "ldap support, apr-util must be built with the ldap USE-flag"
47) 		eerror "enabled."
48) 		die "ldap USE-flag enabled while not supported in apr-util"
49) 	fi
50) 
51) 	# Select the default MPM module
52) 	MPM_LIST="event itk peruser prefork worker"
53) 	for x in ${MPM_LIST} ; do
54) 		if use mpm-${x} ; then
55) 			if [[ "x${mpm}" == "x" ]] ; then
56) 				mpm=${x}
57) 				elog
58) 				elog "Selected MPM: ${mpm}"
59) 				elog
60) 			else
61) 				eerror "You have selected more then one mpm USE-flag."
62) 				eerror "Only one MPM is supported."
63) 				die "more then one mpm was specified"
64) 			fi
65) 		fi
66) 	done
67) 
68) 	if [[ "x${mpm}" == "x" ]] ; then
69) 		if use threads ; then
70) 			mpm=worker
71) 			elog
72) 			elog "Selected default threaded MPM: ${mpm}";
73) 			elog
74) 		else
75) 			mpm=prefork
76) 			elog
77) 			elog "Selected default MPM: ${mpm}";
78) 			elog
79) 		fi
80) 	fi
81) 
82) 	# setup apache user and group
83) 	enewgroup apache 81
84) 	enewuser apache 81 -1 /var/www apache
85) 
86) 	if ! use no-suexec ; then
87) 		elog
88) 		elog "You can manipulate several configure options of suexec"
89) 		elog "through the following environment variables:"
90) 		elog
91) 		elog " SUEXEC_SAFEPATH: Default PATH for suexec (default: /usr/local/bin:/usr/bin:/bin)"
92) 		elog "  SUEXEC_LOGFILE: Path to the suexec logfile (default: /var/log/apache2/suexec_log)"
93) 		elog "   SUEXEC_CALLER: Name of the user Apache is running as (default: apache)"
94) 		elog "  SUEXEC_DOCROOT: Directory in which suexec will run scripts (default: /var/www)"
95) 		elog "   SUEXEC_MINUID: Minimum UID, which is allowed to run scripts via suexec (default: 1000)"
96) 		elog "   SUEXEC_MINGID: Minimum GID, which is allowed to run scripts via suexec (default: 100)"
97) 		elog "  SUEXEC_USERDIR: User subdirectories (like /home/user/html) (default: public_html)"
98) 		elog "    SUEXEC_UMASK: Umask for the suexec process (default: 077)"
99) 		elog
100) 	fi
101) }
102) 
103) src_unpack() {
104) 	unpack ${A}
105) 	cd "${S}"
106) 	epatch "${FILESDIR}/apache-noip.diff"
Hanno Böck sni/ssl fix

Hanno Böck authored 17 years ago

107) 	epatch "${FILESDIR}/apache-ssl-fix.diff"