summaryrefslogtreecommitdiff
blob: 61a7fc29572e001d2f5640a43f5ea5defdc0b492 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-www/apache-ssl/apache-ssl-1.3.17.2.8.0-r1.ebuild,v 1.1 2001/03/12 10:57:18 achim Exp $

A="apache_1.3.17.tar.gz mod_ssl-2.8.0-1.3.17.tar.gz"
S=${WORKDIR}/apache_1.3.17
DESCRIPTION="The Apache Web Server v1.3.17 with mod_ssl"
SRC_URI="http://httpd.apache.org/dist/apache_1.3.17.tar.gz
	 ftp://ftp.modssl.org/source/mod_ssl-2.8.0-1.3.17.tar.gz"
HOMEPAGE="http://www.apache.org http://www.modssl.org"

DEPEND=">=sys-apps/bash-2.04
	>=sys-libs/glibc-2.1.3
	>=sys-libs/db-3.1
	>=dev-libs/openssl-0.9.6"

src_compile() {                           
   export SSL_BASE=SYSTEM
#I get file locking errors with 2.4.0-test10 thru 12 (everything I've tried)
#so we zap the FLOCK option...
#	export EXTRA_CFLAGS="-DUSE_FLOCK_SERIALIZED_ACCEPT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
	export EXTRA_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
   cd ${S}/../mod_ssl-2.8.0-1.3.17
    try ./configure --with-apache=${S} --with-ssl=SYSTEM
   cd ${S}
   export RULE_EXPAT=NO
   try ./configure --prefix=/usr/local/httpd --bindir=/usr/bin \
	--sbindir=/usr/sbin --datadir=/usr/local/httpd \
	--sysconfdir=/etc/httpd --libexecdir=/usr/lib/apache \
	--mandir=/usr/share/man --logfiledir=/var/log/apache --localstatedir=/var/lock \
	--proxycachedir=/var/cache/httpd --includedir=/usr/include/apache \
	--enable-module=all --enable-module=ssl \
	--enable-shared=max --enable-suexec --suexec-caller=wwwrun \
	--suexec-userdir=public_html --suexec-uidmin=96 \
	--suexec-gidmin=96 --suexec-safepath="/bin:/usr/bin" \
	--disable-rule=EXPAT
#	--disable-module=auth_dbm"
    try make
    try make certificate TYPE=dummy
}

src_install() { 
    cd ${S}
    try make install-quiet root=${D}

    dodoc ABOUT_APACHE Announcement INSTALL* KEYS LICENSE* README* WARNING*
    docinto mod_ssl
    cd ../mod_ssl-2.8.0-1.3.17
    dodoc ANNOUNCE CHANGES CREDITS INSTALL* LICENSE NEWS README*
    dodir /etc/rc.d/init.d
    cp ${FILESDIR}/httpd.conf ${D}/etc/httpd
    cp ${FILESDIR}/httpd ${D}/etc/rc.d/init.d
}

pkg_config() {

  source ${ROOT}/var/db/pkg/install.config
  source ${ROOT}/etc/rc.d/config/functions

  if [ "$ServerName" = "" ]
  then
    ServerName=`uname -n`
  fi
  if [ "$ServerAdmin" = "" ]

  then
    ServerAdmin="webmaster\@$ServerName"
  fi

  # Make apache start at boot
  ${ROOT}/usr/sbin/rc-update add httpd

  # Set ServerName and ServerAdmin
  einfo "Setting Servername to $ServerName..."
  cp ${ROOT}/etc/httpd/httpd.conf ${ROOT}/etc/httpd/httpd.conf.orig
  sed -e "s/^\#ServerName.*/ServerName $ServerName/" \
      -e "s/^ServerName.*/ServerName $ServerName/" \
      -e "s/^ServerAdmin.*/ServerAdmin $ServerAdmin/" \
	${ROOT}/etc/httpd/httpd.conf.orig > ${ROOT}/etc/httpd/httpd.conf

}

pkg_prerm() {

  source ${ROOT}/etc/rc.d/config/functions
  if [ "$ROOT" = "/" ] 
  then
    if [ -f /var/run/httpd.pid ]
    then
      einfo "Stopping running daemon..."
      /etc/rc.d/init.d/httpd stop
    fi
  fi

}