# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Postgres driver module for aolserver" HOMEPAGE="http://www.aolserver.com" SRC_URI="mirror://sourceforge/aolserver/${P}.tar.gz" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~x86" IUSE="openacs" # Internal use flags: # # openacs: enables required openacs modifications in the driver DEPEND=">=dev-db/postgresql-7.2 net-www/aolserver" RDEPEND="${DEPEND}" ns_base="/usr/lib/aolserver" ns_conf="/usr/share/aolserver/config" pkg_setup() { if [ "`use openacs`" ]; then ewarn "nspostgres is being merged with OpenACS specific modifications." else ewarn "nspostgres is being merged without the modfications necessary" ewarn "to run OpenACS. If you are intending to run OpenACS please" ewarn "re-emerge nspostgres with USE=openacs" sleep 5 fi } src_unpack() { mkdir -p ${WORKDIR}/include cp -a ${ns_conf}/* ${WORKDIR}/include unpack ${A} find ${S} -type d -name CVS -prune | xargs rm -rf } src_compile() { local OPENACS=1 if [ -z "`use openacs`" ]; then OPENACS=0 fi emake POSTGRES=/usr/include/postgresql ACS=${OPENACS} NSBUILD=1 INST=../ \ || die } src_install () { into ${ns_base} dobin ${S}/nspostgres.so fowners root:root ${ns_base}/bin/nspostgres.so } pkg_postinst () { einfo "To enable the use of ${P}, in the AOLServer config.tcl you must:" einfo " 1) Add the module" einfo " 2) Configure your database pools" }