summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2008-04-15 08:37:36 +0000
committerTiziano Müller <dev-zero@gentoo.org>2008-04-15 08:37:36 +0000
commit8773a5ce5fd5b25a5b2a737ac4a603681caee165 (patch)
treeaacda8091daf76689d6dd6b493639ff4d47210e7 /app-admin/eselect-postgresql
parentAdded masks for new postgresql stuff (diff)
downloadgentoo-2-8773a5ce5fd5b25a5b2a737ac4a603681caee165.tar.gz
gentoo-2-8773a5ce5fd5b25a5b2a737ac4a603681caee165.tar.bz2
gentoo-2-8773a5ce5fd5b25a5b2a737ac4a603681caee165.zip
Moved into the tree
(Portage version: 2.1.5_rc2)
Diffstat (limited to 'app-admin/eselect-postgresql')
-rw-r--r--app-admin/eselect-postgresql/ChangeLog24
-rw-r--r--app-admin/eselect-postgresql/Manifest5
-rw-r--r--app-admin/eselect-postgresql/eselect-postgresql-0.3.ebuild74
-rw-r--r--app-admin/eselect-postgresql/files/50postgresql-eselect1
-rw-r--r--app-admin/eselect-postgresql/metadata.xml5
5 files changed, 109 insertions, 0 deletions
diff --git a/app-admin/eselect-postgresql/ChangeLog b/app-admin/eselect-postgresql/ChangeLog
new file mode 100644
index 000000000000..3a5bdd832090
--- /dev/null
+++ b/app-admin/eselect-postgresql/ChangeLog
@@ -0,0 +1,24 @@
+# ChangeLog for app-admin/eselect-postgresql
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-postgresql/ChangeLog,v 1.1 2008/04/15 08:37:36 dev-zero Exp $
+
+*eselect-postgresql-0.3 (15 Apr 2008)
+
+ 15 Apr 2008; Tiziano Müller <dev-zero@gentoo.org>
+ +files/50postgresql-eselect, +metadata.xml,
+ +eselect-postgresql-0.3.ebuild:
+ Moved into the tree
+
+ 10 Apr 2008; Tiziano Müller <dev-zero@gentoo.org>
+ +files/50postgresql-eselect, -eselect-postgresql-0.2.ebuild,
+ +eselect-postgresql-0.3.ebuild, files/postgresql.eselect:
+ Added some instructions. Added an env.d file to mask
+ /etc/eselect/postgresql. Fixed some multilib bugs (forgotten ${D}). Create
+ relative symlinks instead of absolute ones. Keep slot-files in
+ /etc/eselect/postgresql/slots instead of /usr to avoid problems with having
+ /usr on a separate volume.
+
+ 19 Mar 2008; Tiziano Müller <dev-zero@gentoo.org>
+ eselect-postgresql-0.2.ebuild:
+ Added quotes
+
diff --git a/app-admin/eselect-postgresql/Manifest b/app-admin/eselect-postgresql/Manifest
new file mode 100644
index 000000000000..2d6e51bcaa57
--- /dev/null
+++ b/app-admin/eselect-postgresql/Manifest
@@ -0,0 +1,5 @@
+AUX 50postgresql-eselect 46 RMD160 d7cdbde94df59d4ef758015304654a879fef6e72 SHA1 ac56ae31172f4916107c289c47463f6ddcc80d41 SHA256 3aa6dd48312eb63e181c46012a918e7744365949d58f76a73823592e32de06fc
+DIST eselect-postgresql-0.3.tbz2 2410 RMD160 d806bbdc730f74163135a3d5249bdb92b333893a SHA1 5d41e82b63c9b02d2b9f9c0cc5c5af761b4acb49 SHA256 1e3ab1d0a2c2612c32d7d5ea80720d0fd1e0440ef5e6bf4f86f7dcc1abf1109e
+EBUILD eselect-postgresql-0.3.ebuild 2248 RMD160 7369809976bc5bc8cd3f2e7c09757a028ea899bf SHA1 88c910ba28ef8378b636a0759fe183bb5897def4 SHA256 e6c395b6a4ec121d6361e1f9122e1a7aee456deceb3d15629f6be179e829d3c2
+MISC ChangeLog 907 RMD160 2734930c079731fb86481646f15045d52ef45248 SHA1 3082e3dd433393f30e7e65604422cc8d2ab8622c SHA256 cdaaeb4337076c1cb66408b8f2c0c20b879d3db04be9ea33800b10ec09db6a7f
+MISC metadata.xml 164 RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc SHA1 f67b7ac1c5e6e65ef5a19a589d4759c84918f86c SHA256 7e8e8126bc8701c4a42c7dfed8bb755ac6040fe3d0e3f994d888f8b2b4fa7d8b
diff --git a/app-admin/eselect-postgresql/eselect-postgresql-0.3.ebuild b/app-admin/eselect-postgresql/eselect-postgresql-0.3.ebuild
new file mode 100644
index 000000000000..b08d9b2a6049
--- /dev/null
+++ b/app-admin/eselect-postgresql/eselect-postgresql-0.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2008 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.3.ebuild,v 1.1 2008/04/15 08:37:36 dev-zero Exp $
+
+inherit multilib
+
+DESCRIPTION="Utility to change the default postgresql installation"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tbz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+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} ; 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 init-system"
+ elog "when an init.d file lists 'need postgresql' or 'use postgresql' in its dependencies."
+ elog
+ elog "For users of the 'postgresql' overlay:"
+ elog "In case you have dev-db/postgresql-{base,server} installed but 'eselect postgresql list'"
+ elog "doesn't 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 (dev-db/postgresql-{base,server})."
+ elog "This eselect module won't list the old dev-db/{postgresql,libpq} installations as available"
+ elog "libraries or services."
+}
diff --git a/app-admin/eselect-postgresql/files/50postgresql-eselect b/app-admin/eselect-postgresql/files/50postgresql-eselect
new file mode 100644
index 000000000000..05f9b9d08185
--- /dev/null
+++ b/app-admin/eselect-postgresql/files/50postgresql-eselect
@@ -0,0 +1 @@
+CONFIG_PROTECT_MASK="/etc/eselect/postgresql"
diff --git a/app-admin/eselect-postgresql/metadata.xml b/app-admin/eselect-postgresql/metadata.xml
new file mode 100644
index 000000000000..d06e452b35af
--- /dev/null
+++ b/app-admin/eselect-postgresql/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>postgresql</herd>
+</pkgmetadata>