diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-10-04 00:08:24 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-10-04 00:08:24 +0000 |
commit | cc27050b98f292d7aed1967fea274a3c7240cc86 (patch) | |
tree | aca71be5eb2a80036d38574aac40323fbc7f0861 /dev-db | |
parent | stable x86, bug 287461 (diff) | |
download | gentoo-2-cc27050b98f292d7aed1967fea274a3c7240cc86.tar.gz gentoo-2-cc27050b98f292d7aed1967fea274a3c7240cc86.tar.bz2 gentoo-2-cc27050b98f292d7aed1967fea274a3c7240cc86.zip |
Initial import of Ingres-9.3. Closes #247895. Ebuild and patches by Alexander Thiem
(Portage version: 2.2_rc42/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/ingres/ChangeLog | 13 | ||||
-rw-r--r-- | dev-db/ingres/files/9.3-Jamdefs.patch | 11 | ||||
-rw-r--r-- | dev-db/ingres/files/9.3-bldenv.patch | 22 | ||||
-rw-r--r-- | dev-db/ingres/files/9.3-sharelib.patch | 15 | ||||
-rw-r--r-- | dev-db/ingres/files/ingres-initd | 60 | ||||
-rw-r--r-- | dev-db/ingres/files/sql.patch | 8 | ||||
-rw-r--r-- | dev-db/ingres/ingres-9.3.0.151.ebuild | 224 | ||||
-rw-r--r-- | dev-db/ingres/metadata.xml | 15 |
8 files changed, 368 insertions, 0 deletions
diff --git a/dev-db/ingres/ChangeLog b/dev-db/ingres/ChangeLog new file mode 100644 index 000000000000..8242d61bca71 --- /dev/null +++ b/dev-db/ingres/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for dev-db/ingres +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/ingres/ChangeLog,v 1.1 2009/10/04 00:08:24 patrick Exp $ + +*ingres-9.3.0.151 (04 Oct 2009) + + 04 Oct 2009; Patrick Lauer <patrick@gentoo.org> +files/9.3-Jamdefs.patch, + +ingres-9.3.0.151.ebuild, +files/9.3-bldenv.patch, + +files/9.3-sharelib.patch, +files/ingres-initd, +files/sql.patch, + +metadata.xml: + Initial import of Ingres-9.3. Closes #247895. Ebuild and patches by + Alexander Thiem + diff --git a/dev-db/ingres/files/9.3-Jamdefs.patch b/dev-db/ingres/files/9.3-Jamdefs.patch new file mode 100644 index 000000000000..29e56cf17798 --- /dev/null +++ b/dev-db/ingres/files/9.3-Jamdefs.patch @@ -0,0 +1,11 @@ +--- src/tools/port/jam/Jamdefs 2008-10-28 14:07:42.000000000 +0100 ++++ src/tools/port/jam/Jamdefs 2008-10-30 11:23:47.000000000 +0100 +@@ -2069,7 +2069,7 @@ + } + else + { +- XERCESCLIB = libxerces-c.$(SLSFX).$(XERCVERS).0 ; ++ XERCESCLIB ?= libxerces-c.$(SLSFX).$(XERCVERS).0 ; + } + } + else diff --git a/dev-db/ingres/files/9.3-bldenv.patch b/dev-db/ingres/files/9.3-bldenv.patch new file mode 100644 index 000000000000..b7818114db22 --- /dev/null +++ b/dev-db/ingres/files/9.3-bldenv.patch @@ -0,0 +1,22 @@ +--- src/tools/port/jam/bldenv 2009-01-07 06:46:06.000000000 +0100 ++++ src/tools/port/jam/bldenv 2009-01-07 07:04:25.000000000 +0100 +@@ -274,6 +274,19 @@ + gtk_need=false + deb=true + instcmd="apt-get install" ++ elif [ -f /etc/gentoo-release ] ; then ++ export OSVER=GENTOO ++ gtk_need=false ++ rpm_need=false ++ export XERCESCROOT=/usr/include/xercesc ++ if [ -f /usr/lib/libxerces-c.so ]; then ++ export XERCESLOC=/usr/lib ++ fi ++ XERCESCLIB=`readlink -n ${XERCESLOC}/libxerces-c.so` ++ if [ -z "$XERCESCLIB" ]; then ++ XERCESCLIB=libxerces-c.so ++ fi ++ export XERCESCLIB + elif [ -x /usr/bin/yum ] ; then + OSVER=FEDORA + if [ -r /etc/redhat-release ] && (grep -q 9 /etc/redhat-release) diff --git a/dev-db/ingres/files/9.3-sharelib.patch b/dev-db/ingres/files/9.3-sharelib.patch new file mode 100644 index 000000000000..1d8b3c57000a --- /dev/null +++ b/dev-db/ingres/files/9.3-sharelib.patch @@ -0,0 +1,15 @@ +--- src/front/st/specials_unix_vms/sharelib.ccpp 2008-10-01 15:06:20.000000000 +0200 ++++ src/front/st/specials_unix_vms/sharelib.ccpp 2008-10-30 11:26:05.000000000 +0100 +@@ -136,10 +136,9 @@ + # elif defined(OSX) + EXECUTABLE libxerces-c.$XERCVERS.$SLSFX + # else +- EXECUTABLE libxerces-c.$SLSFX.$XERCVERS.0 ++ EXECUTABLE $XERCESCLIB + # endif /* rs4_us5 */ +- LINK libxerces-c.$SLSFX.$XERCVERS +- LINK libxerces-c.$SLSFX ++ LINK $XERCESCLIB + # endif + PERMISSION s:re,o:rwed,g:re,w:re + } diff --git a/dev-db/ingres/files/ingres-initd b/dev-db/ingres/files/ingres-initd new file mode 100644 index 000000000000..43e131e43595 --- /dev/null +++ b/dev-db/ingres/files/ingres-initd @@ -0,0 +1,60 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/ingres/files/ingres-initd,v 1.1 2009/10/04 00:08:23 patrick Exp $ + +depend() { + use net +} + +II_INSTALLATION=${SVCNAME:6:2} +export II_SYSTEM="/var/lib/ingres/Ingres${II_INSTALLATION}" + +checkIngres() { + + if [ ! -d "${II_SYSTEM}" ]; then + eerror "Ingres instance ${II_INSTALLATION} not found in ${II_SYSTEM}" + return 1 + fi +} + +start() { + + checkIngres || return 1 + + ebegin "Starting Ingres Instance ${II_INSTALLATION}" + + su ingres -c " + . ${II_SYSTEM}/.ing${II_INSTALLATION}bash + ingstart > /dev/null" + RET=$? + eend $RET + + if [ ! $RET ]; then + eerror "Startup failed" + eerror "You may find information in ${II_SYSTEM}/ingres/files/errlog.log" + return 1 + fi + +} + +stop() { + ebegin "Stopping Ingres Instance ${II_INSTALLATION}" + + checkIngres || return 1 + + su ingres -c " + . ${II_SYSTEM}/.ing${II_INSTALLATION}bash + ingstop > /dev/null" + + RET=$? + eend $RET + + if [ ! $RET ]; then + eerror "Stopping failed" + eerror "You may try to run ingstop -f as user ingres" + return 1 + fi + +} + diff --git a/dev-db/ingres/files/sql.patch b/dev-db/ingres/files/sql.patch new file mode 100644 index 000000000000..aa2e3f6b064c --- /dev/null +++ b/dev-db/ingres/files/sql.patch @@ -0,0 +1,8 @@ +--- src/front/frontcl/shell_unix/sql.sh 2008-10-08 12:03:32.000000000 +0200 ++++ src/front/frontcl/shell_unix/sql.sh 2008-10-08 12:05:48.000000000 +0200 +@@ -16,4 +16,4 @@ + # PROGRAM = (PROG0PRFX)sql + # ----------------------------------------------------------------- + +-exec (PROG0PRFX)tm -qSQL "$@" ++exec (PROG0PRFX)tm -qSQL "$@" -history_recall diff --git a/dev-db/ingres/ingres-9.3.0.151.ebuild b/dev-db/ingres/ingres-9.3.0.151.ebuild new file mode 100644 index 000000000000..074b665a414f --- /dev/null +++ b/dev-db/ingres/ingres-9.3.0.151.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/ingres/ingres-9.3.0.151.ebuild,v 1.1 2009/10/04 00:08:24 patrick Exp $ + +EAPI="2" + +inherit eutils flag-o-matic versionator + +# amd64 doesn't work yet +KEYWORDS="~x86" +SLOT="0" + +# Several Ingres instances can be installed with different +# installation identifiers - default is II +# This is not the same as slotting because we have +# n installations of the same version which is not supported +# by portage (e.g. portage doesn't know which one to unmerge) +II_INSTALLATION=${II_INSTALLATION:-"II"} + +# Getting the version strings from the package name +VERSION=$(get_version_component_range 1-3) +SHORT_VERSION=$(get_version_component_range 1-2) +BUILD=$(get_version_component_range 4) + +DESCRIPTION="Ingres Relational Database Management System" +HOMEPAGE="http://www.ingres.com/" +SRC_DIR="ingres-${VERSION}-${BUILD}-gpl-src" +SRC_TGZ="${SRC_DIR}.tgz" +DOWNLOAD_URL="http://dev.gentooexperimental.org/~dreeevil/ingres/ingres-${VERSION}-${BUILD}-gpl-src.tgz" +SRC_URI="${DOWNLOAD_URL}/${SRC_TGZ}" +S="${WORKDIR}/${SRC_DIR}" +LICENSE="GPL-2" + +# nodbms means client installation +IUSE="nodbms net das odbc demodb" + +RDEPEND="dev-libs/xerces-c + app-arch/pax" + +DEPEND="${RDEPEND} + app-crypt/mit-krb5 + dev-util/ftjam" + +PG_DIR="/var/lib/ingres" + +pkg_setup() { + if use nodbms && use demodb; then + eerror "Cannot install demodb without the dbms" + die "Invalid USE flags" + fi + if use nodbms && ! use net && ! use das; then + eerror "No servers or clients to install" + die "Invalid USE flags" + fi + + if [ -d "${PG_DIR}/Ingres${II_INSTALLATION}" ]; then + einfo "Existing installation found in ${PG_DIR}/Ingres${II_INSTALLATION}." + einfo "This installation will be upgraded." + einfo "If that is not what you want press CTRL-C now!" + epause 5 + fi + + if ps ax | grep -qe "iigc[n|c|d] ${II_INSTALLATION}"; then + ewarn "" + ewarn "Running instance of Ingres ${II_INSTALLATION} found!" + ewarn "Ingres will be compiled and merged but not configured" + ewarn "when another copy of the same instance is running." + ewarn "You can do that afterwards with " + ewarn "USE=\"...\" emerge --config ingres" + epause 5 + fi + + enewgroup ingres + enewuser ingres -1 /bin/bash ${PG_DIR} ingres +} + +src_prepare() { + epatch "${FILESDIR}/${SHORT_VERSION}-bldenv.patch" + epatch "${FILESDIR}/${SHORT_VERSION}-sharelib.patch" + epatch "${FILESDIR}/${SHORT_VERSION}-Jamdefs.patch" + epatch "${FILESDIR}/sql.patch" +} + +src_compile() { + export ING_ROOT="${S}" + + local paxlocation=`which pax` + export PAXLOC=`dirname ${paxlocation}` + + source src/tools/port/jam/bldenv || die "Setting of environment failed" + + cd tools/port/jam + jam || die "Building of mkjams failed" + mkjams || die "Creation of jam files failed" + + cd "$ING_SRC" + + grep -vE "gtk|rpm|deb|packman|pixmap" front/st/Jamfile > front/st/_Jamfile + mv front/st/_Jamfile front/st/Jamfile + + einfo "Compiling Ingres..." + + jam -q || die "Building Ingres failed" + +} + +src_install() { + + einfo "Creating II_SYSTEM..." + + II_SYSTEM="${D}${PG_DIR}/Ingres${II_INSTALLATION}" + + II_LOC="${II_SYSTEM}/ingres" + + mkdir -p "${II_LOC}" + + DIRS="abf bin ckp data demo dmp files ice jnl lib log sig utility work vdba version.rel" + + for DIR in ${DIRS}; do + echo -n "${DIR} " + cp -rpLf "${S}/build/${DIR}" "${II_LOC}/" || die "Copying ${DIR} failed" + done + echo + chown -R ingres:ingres "${II_LOC}" + + cat - > ${II_SYSTEM}/.ing${II_INSTALLATION}bash << EOF +export II_SYSTEM=${PG_DIR}/Ingres${II_INSTALLATION} +export PATH=\$II_SYSTEM/ingres/bin:\$II_SYSTEM/ingres/utility:\$PATH +if [ "\$LD_LIBRARY_PATH" ] ; then + LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib:\$II_SYSTEM/ingres/lib +else + LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:\$II_SYSTEM/ingres/lib +fi +export LD_LIBRARY_PATH +export TERM=vt100 +export TERM_INGRES=vt100fx +EOF + + newinitd "${FILESDIR}/ingres-initd" ingres${II_INSTALLATION} || die "Adding init.d script failed" + + einfo "done." +} + +pkg_config() { + + export II_SYSTEM="${PG_DIR}/Ingres${II_INSTALLATION}" + + ERRMSG="Installing Ingres failed + You may find information in ${II_SYSTEM}/ingres/files/install.log. + You can retry by executing USE=\"...\" emerge --config ingres" + + if ps ax | grep -qe "iigc[n|c|d] ${II_INSTALLATION}"; then + eerror "Running instance of Ingres ${II_INSTALLATION} found!" + eerror "Please stop that instance first, before upgrading." + die "${ERRMSG}" + fi + + einfo "Fixing file permissions..." + chmod u+s "${II_SYSTEM}/ingres/bin/verifydb" + chmod u+s "${II_SYSTEM}/ingres/bin/ingvalidpw" + chmod u+s "${II_SYSTEM}/ingres/bin/iimerge" + chmod u+s "${II_SYSTEM}/ingres/utility/csreport" + + einfo "Setting up Ingres (please wait - this will take a few minutes)" + + PARTS="tm" + + if ! use nodbms; then + PARTS="${PARTS} dbms" + fi + for FLAG in net das odbc demodb; do + if use ${FLAG}; then + PARTS="${PARTS} ${FLAG}" + fi + done + + for PART in ${PARTS}; do + einfo "${PART}..." + if [ ${PART} == "demodb" ]; then + su ingres -c " + . ${II_SYSTEM}/.ing${II_INSTALLATION}bash + cd ${II_SYSTEM}/ingres/demo/data + ingstart > /dev/null + if createdb -n demodb > /dev/null; then + sql demodb < copy.in > /dev/null + fi" || die "${ERRMSG}" + else + su ingres -c " + . ${II_SYSTEM}/.ing${II_INSTALLATION}bash + export II_INSTALLATION=${II_INSTALLATION} + ${II_SYSTEM}/ingres/utility/iisu${PART} -batch" || die "${ERRMSG}" + fi + done + + einfo "Upgrading any existing databases" + + su ingres -c " + . ${II_SYSTEM}/.ing${II_INSTALLATION}bash + ingstart > /dev/null 2>&1 + upgradedb -all > /dev/null + ingstop > /dev/null" || die "${ERRMSG}" + + su ingres -c " + . ${II_SYSTEM}/.ing${II_INSTALLATION}bash + ingsetenv ING_ABFDIR ${II_SYSTEM}/ingres/abf" || die "${ERRMSG}" + + "${II_SYSTEM}/ingres/bin/mkvalidpw" > /dev/null || die "${ERRMSG}" + + einfo "Done." + +} + +pkg_postinst() { + + pkg_config + + elog "" + elog "Run '/etc/init.d/ingres${II_INSTALLATION} start' to start Ingres" + elog "" + elog "After that, as user ingres type" + elog " source ${PG_DIR}/Ingres${II_INSTALLATION}/.ing${II_INSTALLATION}bash" + elog "to run the Ingres commands such as sql or createdb." + +} diff --git a/dev-db/ingres/metadata.xml b/dev-db/ingres/metadata.xml new file mode 100644 index 000000000000..636bdd153828 --- /dev/null +++ b/dev-db/ingres/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +<use> + <flag name='net'>Enable net support</flag> + <flag name='das'>Enable das support</flag> + <flag name='nodbms'>Disable dbms component</flag> + <flag name='demodb'>Install demo DB</flag> +</use> +</pkgmetadata> |