summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2010-06-02 18:26:49 +0000
committerPatrick Lauer <patrick@gentoo.org>2010-06-02 18:26:49 +0000
commit3121924e30ee68bed302f311c0e800a28a1193fe (patch)
tree98813ba67c677d4597ea71e451797965154eea52 /app-admin/eselect-postgresql
parentVersion bump. Thanks Federico Moro <zayer@frikis.org> for the report. (diff)
downloadgentoo-2-3121924e30ee68bed302f311c0e800a28a1193fe.tar.gz
gentoo-2-3121924e30ee68bed302f311c0e800a28a1193fe.tar.bz2
gentoo-2-3121924e30ee68bed302f311c0e800a28a1193fe.zip
Bump, thanks to Aaron Swenson for the improvements
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/eselect-postgresql')
-rw-r--r--app-admin/eselect-postgresql/ChangeLog8
-rw-r--r--app-admin/eselect-postgresql/eselect-postgresql-0.4.ebuild77
2 files changed, 84 insertions, 1 deletions
diff --git a/app-admin/eselect-postgresql/ChangeLog b/app-admin/eselect-postgresql/ChangeLog
index be974ee5afb6..dbb78e90b391 100644
--- a/app-admin/eselect-postgresql/ChangeLog
+++ b/app-admin/eselect-postgresql/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-admin/eselect-postgresql
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-postgresql/ChangeLog,v 1.10 2010/04/25 19:55:00 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-postgresql/ChangeLog,v 1.11 2010/06/02 18:26:49 patrick Exp $
+
+*eselect-postgresql-0.4 (02 Jun 2010)
+
+ 02 Jun 2010; Patrick Lauer <patrick@gentoo.org>
+ +eselect-postgresql-0.4.ebuild:
+ Bump, thanks to Aaron Swenson for the improvements
25 Apr 2010; Raúl Porcel <armin76@gentoo.org>
eselect-postgresql-0.3.ebuild:
diff --git a/app-admin/eselect-postgresql/eselect-postgresql-0.4.ebuild b/app-admin/eselect-postgresql/eselect-postgresql-0.4.ebuild
new file mode 100644
index 000000000000..6c4fc2f90439
--- /dev/null
+++ b/app-admin/eselect-postgresql/eselect-postgresql-0.4.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-postgresql/eselect-postgresql-0.4.ebuild,v 1.1 2010/06/02 18:26:49 patrick Exp $
+
+EAPI=2
+
+inherit multilib
+
+DESCRIPTION="Utility to change the default postgresql installation"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://gentooexperimental.org/~patrick/${P}.tbz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="app-admin/eselect
+ !!dev-db/libpq"
+
+src_install() {
+ keepdir /etc/eselect/postgresql
+ doenvd "${FILESDIR}/50postgresql-eselect"
+
+ insinto /usr/share/eselect/modules
+ doins postgresql.eselect
+ sed -i \
+ -e "s|/usr/lib/|/usr/$(get_libdir)/|g" \
+ "${D}/usr/share/eselect/modules/postgresql.eselect"
+
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe "binwrapper"
+
+ dodir /usr/bin
+ dosym /usr/bin/eselect /usr/bin/postgresql-config
+}
+
+pkg_preinst() {
+ local ff=""
+ for f in "${ROOT}"/usr/include/{postgresql,libpq-fe.h,libpq,postgres_ext.h,pg_config_manual.h} ; do
+ [[ -e "${f}" ]] || continue
+ [[ -L "${f}" ]] && continue
+ if [[ -d "${f}" ]] ; then
+ if [[ -z "$(find \"${f}\" -not \( -type l -or -type d \))" ]] ; then
+ rm -rf "${f}"
+ else
+ ff="$ff $f"
+ fi
+ else
+ ff="$ff $f"
+ fi
+ done
+ if [[ ! -z "$ff" ]] ; then
+ eerror "You have leftovers from previous postgresql installations that"
+ eerror "can't be dealt with automatically. The proper way to treat"
+ eerror "files is:"
+ eerror ""
+ eerror "rm -rf ${ff}"
+ eerror ""
+ die "Please, remove the files manually"
+ fi
+}
+
+pkg_postinst() {
+ elog "This eselect module can be used to define which PostgreSQL version is being used"
+ elog "to link against and which (major) version of PostgreSQL is being started by the"
+ elog "init-system when an init.d file lists 'need postgresql' or 'use postgresql' in"
+ elog "its dependencies."
+ elog
+ elog "For users of the 'postgresql' overlay: In case you have"
+ elog "dev-db/postgresql-{base,server} installed but 'eselect postgresql list' doesn't"
+ elog "anything, please re-install dev-db/postgresql-{base,server} since we had to move"
+ elog "around some stuff. Sorry for the inconvenience."
+ elog
+ elog "Please make sure that you use the new postgresql ebuilds"
+ elog "(dev-db/postgresql-{base,server}). This eselect module won't list the old"
+ elog "dev-db/{postgresql,libpq} installations as available libraries or services."
+}