From 71be03c632c209a4d6376844b47164f8df6fecf9 Mon Sep 17 00:00:00 2001 From: "Aaron W. Swenson" Date: Mon, 1 Aug 2011 20:14:11 -0400 Subject: Initial commit towards an eclass for PostgreSQL related packages. --- postgres.eclass | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 postgres.eclass diff --git a/postgres.eclass b/postgres.eclass new file mode 100644 index 0000000..ff4e993 --- /dev/null +++ b/postgres.eclass @@ -0,0 +1,34 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# @ECLASS: postgres.eclass +# @MAINTAINER: +# titanofold@gentoo.org +# @BLURB: Functions to aid packages that utilize PostgreSQL +# @DESCRIPTION: +# The postgres eclass is a suite that enable ebuilds to build against multiple slot version + +# @FUNCTION: postgres_depend +# @USAGE: postgres_depend [USE,flags] [server] [server,USE,flags] +# @DESCRIPTION: +# Called after DEPEND is declared. Takes up to two optional arguments. The 'server' +postgres_depend() { + if [[ -n ${POSTGRES_ONLY} ]] ; then + DEPEND+=" dev-db/postgresql-base:${POSTGRES_ONLY}[${BASE_FLAGS}]" + elif [[ -n ${POSTGRES_MIN} ]] + if [[ -n ${POSTGRES_MAX} ]] ; then + + else + #blarg + fi + elif [[ -n ${POSGRES_MAX} ]] ; then + #blah + else + [[POSTGRES_MAX]] + [[POSTGRES_MIN]] + [[POSTGRES_ONLY]] + fi +} + +length=$(expr length ${POSTGRES_MAX}) -- cgit v1.2.3