# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/jcollins/cvsroot/phpsource-net/ebuilds/net-www/aolserver/aolserver-3.4.2.ebuild,v 1.1.1.1 2002/11/08 04:43:30 jcollins Exp $ DESCRIPTION="Webserver that uses Tcl" HOMEPAGE="http://www.aolserver.com" SRC_URI="mirror://sourceforge/aolserver/aolserver-4.0-beta10-src.tar.gz" LICENSE="GPL" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="" RDEPEND="" S="${WORKDIR}/${P}" # TODO: for now, AOLSERVER_HOMEDIR will contain all aolserver files, # TODO: as in a 'traditional' aolserver installation. # TODO: TODO: make AOLSERVER_HOMEDIR work more like apache's DATA_DIR # TODO: and split out the binaries into e.g. /usr/bin AOLSERVER_HOMEDIR="/home/aolserver" src_unpack() { unpack aolserver-4.0-beta10-src.tar.gz mv ${WORKDIR}/aolserver-4.0-beta10-src ${WORKDIR}/${P} } src_compile() { cd ${S} # TODO: make configure put binaries in e.g. /usrs/bin like apache... ./configure --host=${CHOST} \ --prefix=${AOLSERVER_HOMEDIR} \ --mandir=/usr/share/man \ --with-tcl=/usr/lib \ --libdir=${AOLSERVER_HOMEDIR} \ || die emake || die "compile problem" } pkg_preinst () { if ! groupmod web; then groupadd web || die "problem adding group web" fi if ! id aolserver; then useradd -g web -s /bin/bash -d ${AOLSERVER_HOMEDIR} aolserver \ || die "problem adding user aolserver" fi } src_install () { cp ${S}/include/Makefile.global ${S}/include/Makefile.global.orig cp ${S}/include/Makefile.module ${S}/include/Makefile.module.orig sed -e "s:${AOLSERVER_HOMEDIR}:/var/tmp/portage/${P}/image${AOLSERVER_HOMEDIR}:" \ ${S}/include/Makefile.global.orig > ${S}/include/Makefile.global sed -e "s:${AOLSERVER_HOMEDIR}:/var/tmp/portage/${P}/image${AOLSERVER_HOMEDIR}:" \ ${S}/include/Makefile.module.orig > ${S}/include/Makefile.module make DESTDIR=${D} install || die doman ${D}/${AOLSERVER_HOMEDIR}/man/man1/nsd.1 cp ${S}/include ${D}/${AOLSERVER_HOMEDIR}/ mkdir ${D}/${AOLSERVER_HOMEDIR}/nsd cp ${S}/nsd/*.h ${D}/${AOLSERVER_HOMEDIR}/nsd/ cp ${S}/include/Makefile.global.orig ${D}/${AOLSERVER_HOMEDIR}/include/Makefile.global cp ${S}/include/Makefile.module.orig ${D}/${AOLSERVER_HOMEDIR}/include/Makefile.module } pkg_postinst () { chown -R root.root ${ROOT}/${AOLSERVER_HOMEDIR} cd ${ROOT}/${AOLSERVER_HOMEDIR} chown -R root.web log servers chmod -R g+w log servers if ! grep -l -q aolserver /root/.bash_profile > /dev/null 2>&1 ; then echo export LD_LIBRARY_PATH=${AOLSERVER_HOMEDIR}/lib >> /root/.bash_profile fi }