aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--postgres.eclass34
1 files changed, 34 insertions, 0 deletions
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})