diff options
author | Fabian Groffen <grobian@gentoo.org> | 2005-08-07 13:23:17 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2005-08-07 13:23:17 +0000 |
commit | 114169893bcc23d3a98232b13d1f7e28b1230ebd (patch) | |
tree | 3b7ebbdee8da0b7bef27913039a0d4adddf803d6 /dev-db/monetdb | |
parent | Stable on ppc. (diff) | |
download | historical-114169893bcc23d3a98232b13d1f7e28b1230ebd.tar.gz historical-114169893bcc23d3a98232b13d1f7e28b1230ebd.tar.bz2 historical-114169893bcc23d3a98232b13d1f7e28b1230ebd.zip |
Initial import of monetdb ebuild
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'dev-db/monetdb')
-rw-r--r-- | dev-db/monetdb/ChangeLog | 14 | ||||
-rw-r--r-- | dev-db/monetdb/Manifest | 12 | ||||
-rw-r--r-- | dev-db/monetdb/files/digest-monetdb-4.8.2 | 4 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb-4.8.2-gentoo-MapiClient.patch | 11 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb-4.8.2-gentoo-conf.patch | 32 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb-4.8.2-startup.mil | 28 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb-start.sh | 16 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb-stop.sh | 26 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb.conf-4.8.2 | 15 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb.init-4.8.2 | 17 | ||||
-rw-r--r-- | dev-db/monetdb/files/monetdb_config.sh | 21 | ||||
-rw-r--r-- | dev-db/monetdb/metadata.xml | 20 | ||||
-rw-r--r-- | dev-db/monetdb/monetdb-4.8.2.ebuild | 194 |
13 files changed, 410 insertions, 0 deletions
diff --git a/dev-db/monetdb/ChangeLog b/dev-db/monetdb/ChangeLog new file mode 100644 index 000000000000..107f7827abe0 --- /dev/null +++ b/dev-db/monetdb/ChangeLog @@ -0,0 +1,14 @@ +# ChangeLog for dev-db/monetdb +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/monetdb/ChangeLog,v 1.1 2005/08/07 13:23:17 grobian Exp $ + +*monetdb-4.8.2 (06 Aug 2005) + + 06 Aug 2005; Fabian Groffen <grobian@gentoo.org> + +files/monetdb.conf-4.8.2, +files/monetdb.init-4.8.2, + +files/monetdb-4.8.2-gentoo-MapiClient.patch, + +files/monetdb-4.8.2-gentoo-conf.patch, +files/monetdb-4.8.2-startup.mil, + +files/monetdb-start.sh, +files/monetdb-stop.sh, +files/monetdb_config.sh, + +metadata.xml, +monetdb-4.8.2.ebuild: + Initial import of MonetDB 4.8.2 with SQL and XQuery support + diff --git a/dev-db/monetdb/Manifest b/dev-db/monetdb/Manifest new file mode 100644 index 000000000000..0fc577118aed --- /dev/null +++ b/dev-db/monetdb/Manifest @@ -0,0 +1,12 @@ +MD5 05841054d5996b2f58ff1160cb39f9d7 monetdb-4.8.2.ebuild 6334 +MD5 24272f95d7629d85f9268b0275643cba ChangeLog 643 +MD5 ca9ff61fbe7d29f666c1ffdc61bb168d metadata.xml 801 +MD5 a9a2dbac1941306b506077c635415e7e files/monetdb_config.sh 653 +MD5 739a372d2ff096d674002e3253eb4dad files/monetdb-4.8.2-startup.mil 929 +MD5 e97ba2fc5180dac248822b8264841013 files/monetdb-start.sh 379 +MD5 be0eaed8b26f07c98efcbb9d59e15a64 files/monetdb-4.8.2-gentoo-conf.patch 1038 +MD5 cae0e46fdfa11ea1f0be120005076b83 files/monetdb.init-4.8.2 328 +MD5 09aa9eafe8a4c3073b669baa9ea6ea6d files/monetdb.conf-4.8.2 768 +MD5 ab73e512460465c2653accc427d52e37 files/digest-monetdb-4.8.2 299 +MD5 324a083e56c76f02a3ba9ac34c188066 files/monetdb-4.8.2-gentoo-MapiClient.patch 311 +MD5 07e71d02ee02ca4ebfbc4db68fa4f40e files/monetdb-stop.sh 626 diff --git a/dev-db/monetdb/files/digest-monetdb-4.8.2 b/dev-db/monetdb/files/digest-monetdb-4.8.2 new file mode 100644 index 000000000000..ce79c605363a --- /dev/null +++ b/dev-db/monetdb/files/digest-monetdb-4.8.2 @@ -0,0 +1,4 @@ +MD5 5504707be924ec2c283d2285f72444d5 MonetDB-4.8.2.tar.gz 21260095 +MD5 76d4d4005675b7ed18cf98579124dbfe MonetDB-SQL-2.8.2.tar.gz 1063441 +MD5 5dec7614cd1835e6c1898eb8bb337ac4 MonetDB-XQuery-0.8.2.tar.gz 873414 +MD5 436151071d03a7256a419b779d0c834c monetdb-pathfinder-bison-sources-0.8.2.tar.bz2 79380 diff --git a/dev-db/monetdb/files/monetdb-4.8.2-gentoo-MapiClient.patch b/dev-db/monetdb/files/monetdb-4.8.2-gentoo-MapiClient.patch new file mode 100644 index 000000000000..e7e25ac4e751 --- /dev/null +++ b/dev-db/monetdb/files/monetdb-4.8.2-gentoo-MapiClient.patch @@ -0,0 +1,11 @@ +--- MonetDB-4.8.2/src/mapi/clients/C/MapiClient.mx 2005-01-21 17:25:11.000000000 +0100 ++++ MapiClient.mx 2005-02-09 13:34:51.251310750 +0100 +@@ -1285,7 +1285,7 @@ + { + opt *set = NULL; + int setlen; +- char *language = "mil"; ++ char *language = "sql"; + int port = 0; + char *user = NULL; + char *passwd = NULL; diff --git a/dev-db/monetdb/files/monetdb-4.8.2-gentoo-conf.patch b/dev-db/monetdb/files/monetdb-4.8.2-gentoo-conf.patch new file mode 100644 index 000000000000..7f7a83e0b9e6 --- /dev/null +++ b/dev-db/monetdb/files/monetdb-4.8.2-gentoo-conf.patch @@ -0,0 +1,32 @@ +--- MonetDB-4.8.2/conf/MonetDB.conf.in 2004-10-26 02:02:16.000000000 +0200 ++++ MonetDB.conf.in 2004-10-28 21:04:52.958269189 +0200 +@@ -20,7 +20,7 @@ + # the name of the database to use below. Note that you can use + # multiple databases, but that you have to edit the database name + # and restart MonetDB. +-gdk_dbname=demo ++gdk_dbname=default + + # The options below deal with various aspects of memory usage behaviour. + # If you don't know what these values mean, you should leave them alone. +@@ -64,11 +64,6 @@ + # + #gdk_version <ver> create BATs in old formats[out of date?] + +- +-# General client Section +-#======================= +-#host=localhost #the host the server runs on +- + # MonetDB Section + #================ + # Administrator user name +@@ -81,7 +76,7 @@ + # Where do the MonetDB modules reside? + monet_mod_path=@libdir@@DIRSEP@@PACKAGE@ + # Start Mserver in daemon mode, or start with MIL interactive interface? +-monet_daemon=no ++monet_daemon=yes + + # Monet Application Interface Section + #==================================== diff --git a/dev-db/monetdb/files/monetdb-4.8.2-startup.mil b/dev-db/monetdb/files/monetdb-4.8.2-startup.mil new file mode 100644 index 000000000000..4698229c174d --- /dev/null +++ b/dev-db/monetdb/files/monetdb-4.8.2-startup.mil @@ -0,0 +1,28 @@ +# Gentoo MonetDB startup.mil script -- Fabian Groffen grobian@gentoo.org +# +# This script starts the SQL, XQuery and Mapi modules and activates a +# listening socket for all of them on their default port. This results +# in three ports of your system being occupied. By default the ports +# are as follows: +# SQL server: 45123 +# XQuery server: 45789 +# Mapi server: 50000 + +# should connections be bound to localhost or 0.0.0.0? Set to true here +# to allow foreign connections. Defaults to false (only local). +var allow_foreign_connections := false; + +# +# If were only looking for whatever you could change, you can stop +# reading at this point and save your changes. Don't change anything +# below if you don't know what you're doing. +# + +module(sql_server); +sql_server_start(allow_foreign_connections); + +module(pathfinder); +xquery_server_start(allow_foreign_connections); + +module(mapi); +mapi_start(allow_foreign_connections); diff --git a/dev-db/monetdb/files/monetdb-start.sh b/dev-db/monetdb/files/monetdb-start.sh new file mode 100644 index 000000000000..b43f4d924e3b --- /dev/null +++ b/dev-db/monetdb/files/monetdb-start.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +LOG=/var/log/monetdb/Mserver.log +echo `date` Starting MonetDB >> $LOG +/usr/bin/Mserver $@ >> $LOG 2>&1 & +MPID=$! +echo `date` Mserver started, PID: $MPID >> $LOG +rm -f ~monetdb/Mserver.pid > /dev/null +sleep 2 +ALIVE=`ps --no-heading --format pid -p $MPID` +if [ $ALIVE -eq $MPID ]; then + echo $MPID > ~monetdb/Mserver.pid +else + echo Mserver died immediately + exit -1 +fi diff --git a/dev-db/monetdb/files/monetdb-stop.sh b/dev-db/monetdb/files/monetdb-stop.sh new file mode 100644 index 000000000000..aa562e814f98 --- /dev/null +++ b/dev-db/monetdb/files/monetdb-stop.sh @@ -0,0 +1,26 @@ +#! /bin/sh + +LOG=/var/log/monetdb/Mserver.log +if [ -f ~monetdb/Mserver.pid ]; then + MPID=`cat ~monetdb/Mserver.pid` +else + echo "No Mserver PID found" + exit -1 +fi + +echo `date` Stopping MonetDB \(PID: $MPID\) >> $LOG +kill -TERM $MPID || exit -1 +sleep 1 +ALIVE=`ps --no-heading --format pid -p $MPID` +if [ "$ALIVE" = "$MPID" ]; then + echo Mserver still alive after TERM, trying KILL... >> $LOG + kill -KILL $MPID + sleep 2 + ALIVE=`ps --no-heading --format pid -p $MPID` + if [ "$ALIVE" = "$MPID" ]; then + echo "Failed to stop process $MPID" + exit -1 + fi +fi +echo `date` Mserver stopped >> $LOG +rm -f ~monetdb/Mserver.pid > /dev/null diff --git a/dev-db/monetdb/files/monetdb.conf-4.8.2 b/dev-db/monetdb/files/monetdb.conf-4.8.2 new file mode 100644 index 000000000000..cfc4abd12099 --- /dev/null +++ b/dev-db/monetdb/files/monetdb.conf-4.8.2 @@ -0,0 +1,15 @@ +# The user to run the MonetDB database as. It is recommended to +# leave this as is, portage created this user during installation +MDB_USER=monetdb +MDB_GROUP=monetdb + +# MonetDB must be started with a startup script which tells it what +# to do. Most users will not want to change this startup script +# as it loads the SQL, XQuery (pathfinder) and Mapi modules which +# allow for SQL, XQuery and MIL connections. +# If you have special demands, point this variable to your own script +# which contains the desired commands. +# Note: for security reasons by default all listening connections are +# bound to 127.0.0.1. If you need connections to be bound at 0.0.0.0 +# have a look at the default startup script to enable this. +MDB_STARTUPSCRIPTS=~monetdb/monetdb-startup.mil diff --git a/dev-db/monetdb/files/monetdb.init-4.8.2 b/dev-db/monetdb/files/monetdb.init-4.8.2 new file mode 100644 index 000000000000..5b58a8bcc4e5 --- /dev/null +++ b/dev-db/monetdb/files/monetdb.init-4.8.2 @@ -0,0 +1,17 @@ +#!/sbin/runscript + +depend() { + use net +} + +start() { + ebegin "Starting MonetDB" + start-stop-daemon -c $MDB_USER:$MDB_GROUP --start --exec ~monetdb/monetdb-start.sh -- $MDB_STARTUPSCRIPTS + eend $? +} + +stop() { + ebegin "Stopping MonetDB" + start-stop-daemon -c $MDB_USER:$MDB_GROUP --start --exec ~monetdb/monetdb-stop.sh + eend $? +} diff --git a/dev-db/monetdb/files/monetdb_config.sh b/dev-db/monetdb/files/monetdb_config.sh new file mode 100644 index 000000000000..eab7f36cc5f5 --- /dev/null +++ b/dev-db/monetdb/files/monetdb_config.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +MYINCLUDES="-I$_MONETDB_INCLUDEDIR \ + -I$_MONETDB_INCLUDEDIR/common \ + -I$_MONETDB_INCLUDEDIR/gdk \ + -I$_MONETDB_INCLUDEDIR/monet \ + -I$_MONETDB_INCLUDEDIR/plain \ + -I$_MONETDB_INCLUDEDIR/contrib \ + -I$_MONETDB_INCLUDEDIR/mapi \ + -I$_MONETDB_INCLUDEDIR/C" + +case $1 in + --version ) echo $_MONETDB_VERSION; break;; + --cflags ) echo $MYINCLUDES; break;; + --includes ) echo $MYINCLUDES; break;; + --pkgincludedir ) echo $_MONETDB_INCLUDEDIR; break;; + --libs ) echo $_MONETDB_LIBS; break;; + --modpath ) echo $_MONETDB_MOD_PATH; break;; + --prefix ) echo $_MONETDB_PREFIX; break;; + --classpath ) echo $_MONETDB_CLASSPATH; break;; +esac diff --git a/dev-db/monetdb/metadata.xml b/dev-db/monetdb/metadata.xml new file mode 100644 index 000000000000..d242c945a7ce --- /dev/null +++ b/dev-db/monetdb/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>grobian@gentoo.org</email> + <name>Fabian Groffen</name> + </maintainer> + <longdescription> + MonetDB is a main-memory database developed at CWI the + Netherlands. The main-memory focus of the database has resulted + in a column based way of dealing with relational tables. Due to + this unconventional approach, MonetDB can be a very fast + database for complex queries, and as such in use (and perfectly + suitable) for intensive data-mining tasks. + MonetDB 4 supports its own kernel language, MIL, the + conventional SQL query language and the relatively new XML + querying language, XQuery. + </longdescription> +</pkgmetadata> diff --git a/dev-db/monetdb/monetdb-4.8.2.ebuild b/dev-db/monetdb/monetdb-4.8.2.ebuild new file mode 100644 index 000000000000..6c30c63dd760 --- /dev/null +++ b/dev-db/monetdb/monetdb-4.8.2.ebuild @@ -0,0 +1,194 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/monetdb/monetdb-4.8.2.ebuild,v 1.1 2005/08/07 13:23:17 grobian Exp $ + +inherit flag-o-matic eutils + +DESCRIPTION="A main-memory relational database for SQL, XQuery and MIL" +HOMEPAGE="http://monetdb.cwi.nl/" +PV_SQL=2.8.2 +PV_XQ=0.8.2 +SRC_URI="mirror://sourceforge/monetdb/MonetDB-${PV}.tar.gz + mirror://sourceforge/monetdb/MonetDB-SQL-${PV_SQL}.tar.gz + mirror://sourceforge/monetdb/MonetDB-XQuery-${PV_XQ}.tar.gz + ppc-macos? ( mirror://gentoo/monetdb-pathfinder-bison-sources-0.8.2.tar.bz2 )" +LICENSE="MonetDBPL-1.1 PathfinderPL-1.1" +SLOT="0" +KEYWORDS="~x86 ~ppc-macos" +IUSE="java readline" + +DEPEND="virtual/libc + sys-devel/flex + ppc-macos? ( sys-devel/bison ) + !ppc-macos? ( >=sys-devel/bison-1.33 ) + >=sys-devel/gcc-3.3* + java? ( >=virtual/jdk-1.4* ) + readline? ( >=sys-libs/readline-4.1 ) + dev-libs/libxml2" + +DATA_DIR="/var/lib/MonetDB" + +pkg_setup() { + if [ -x ${DATA_DIR}/dbfarm ] || [ -x ${DATA_DIR}/log ]; then + while read line; do eerror "${line}"; done <<EOF +MonetDB ${MY_PV} cannot upgrade your existing SQL databases. You must +export your existing SQL databases to a file using "JdbcClient -D" and +then restore them when you have upgraded completey using +"JdbcClient -f". + +If you have MIL BATs, aging from before MonetDB 4.8.0 your have to +convert those after upgrading. See the following for more information +on upgrading from previous database versions: +http://monetdb.cwi.nl/TechDocs/FrontEnds/SQL/upgrade/ +http://monetdb.cwi.nl/TechDocs/FrontEnds/mil/upgrade/ + +You must remove your entire database directory to continue. +(database directory = ${DATA_DIR}). +EOF + die "Cannot upgrade automatically." + fi + + enewgroup monetdb + enewuser monetdb -1 /bin/bash ${DATA_DIR} monetdb +} + +src_unpack() { + unpack ${A} || die + + epatch ${FILESDIR}/monetdb-${PV}-gentoo-conf.patch + epatch ${FILESDIR}/monetdb-${PV}-gentoo-MapiClient.patch +} + +src_compile() { + # The tar has capitals, the ebuild doesn't... + cd ${WORKDIR}/MonetDB-${PV} + + econf \ + "--enable-optimize" \ + $(use_with java) \ + $(use_with readline) \ + || die "econf monetdb failed" + + emake || die "emake monetdb failed" + + # make the header files available to the sql and xquery compilation + mkdir include + cd include + ln -s ../src/common + ln -s ../src/gdk + ln -s ../src/monet + ln -s ../src/modules/plain + ln -s ../src/modules/contrib + ln -s ../src/mapi + ln -s ../src/mapi/clients/C + ln -s ../monetdb_config.h + ln -s ../sysdefs.h + + cd ${WORKDIR}/MonetDB-${PV} + mkdir -p lib/MonetDB + cd lib/MonetDB + find ../.. -name "lib_*" -exec ln -s {} ';' >& /dev/null + ln -s . .libs + + cd ${WORKDIR}/MonetDB-${PV}/lib + find .. -name "lib*" -exec ln -s {} ';' >& /dev/null + ln -s . .libs + + cd ${WORKDIR}/MonetDB-${PV} + mkdir bin + cd bin + ln -s ../src/mel/mel + ln -s ../src/utils/Mx/Mx + + # enable the fool-script + MYWD=`echo ${WORKDIR} | sed -re 's/\//\\\\\//g'` + sed -r \ + -e "s/\\$\_MONETDB\_INCLUDEDIR/${MYWD}\/MonetDB-${PV}\/include/g" \ + -e "s/\\$\_MONETDB\_VERSION/${PV}/g" \ + -e "s/\\$\_MONETDB\_LIBS/-L${MYWD}\/MonetDB-${PV}\/lib\/MonetDB -L${MYWD}\/MonetDB-${PV}\/lib/g" \ + -e "s/\\$\_MONETDB\_MOD_PATH/${MYWD}\/MonetDB-${PV}\/include/g" \ + -e "s/\\$\_MONETDB\_PREFIX/${MYWD}\/MonetDB-${PV}/g" \ + -e "s/\\$\_MONETDB\_CLASSPATH/${MYWD}\/MonetDB-${PV}\/src\/mapi\/clients\/java\/mapi.jar/g" \ + ${FILESDIR}/monetdb_config.sh > \ + ${WORKDIR}/MonetDB-${PV}/bin/monetdb-config + chmod 744 ${WORKDIR}/MonetDB-${PV}/bin/monetdb-config + + # configure and make SQL + cd ${WORKDIR}/sql-${PV_SQL} + econf MONETDB_CONFIG=${WORKDIR}/MonetDB-${PV}/bin/monetdb-config \ + "--with-monet=${WORKDIR}/MonetDB-${PV}" \ + "--enable-optimize" \ + `use_with java` || die + emake || die "emake sql failed" + + # configure and make XQuery, because it relies on >=bison-1.33 which we + # might not have, we apply a special patch with bison 2.0 generated + # files. This is especially useful for OSX users, as this allows + # them to use this package without having to overwrite their system + # installed bison 1.28 + cd ${WORKDIR}/pathfinder-${PV_XQ} + # has_version/best_version do not take package.provided into + # account! thus we assume OSX users don't have the right bison :( + if use ppc-macos; then + einfo "extracting extra files for older bison users" + tar -jxf ${DISTDIR}/monetdb-pathfinder-bison-sources-${PV_XQ}.tar.bz2 + fi + econf MONETDB_CONFIG=${WORKDIR}/MonetDB-${PV}/bin/monetdb-config \ + "--with-monet=${WORKDIR}/MonetDB-${PV} " \ + "--enable-optimize" || die + emake || die "emake xquery failed" +} + +src_install() { + # The tar has capitals, the ebuild doesn't... + cd ${WORKDIR}/MonetDB-${PV} + einstall || die "failed to install monetdb" + + cd ${WORKDIR}/sql-${PV_SQL} + einstall || die "failed to install sql" + + cd ${WORKDIR}/pathfinder-${PV_XQ} + einstall || die "failed to install xquery" + + exeinto /etc/init.d/ + newexe ${FILESDIR}/${PN}.init-${PV} monetdb || die "init.d script" + + insinto /etc/conf.d/ + newins ${FILESDIR}/${PN}.conf-${PV} monetdb || die "conf.d file" + + diropts -m750 + dodir ${DATA_DIR} /var/log/${PN} + + exeinto ${DATA_DIR} + newexe ${FILESDIR}/${PN}-start.sh ${PN}-start.sh || die "start script" + newexe ${FILESDIR}/${PN}-stop.sh ${PN}-stop.sh || die "stop script" + + insinto ${DATA_DIR} + newins ${FILESDIR}/${PN}-${PV}-startup.mil ${PN}-startup.mil || die "startup MIL script" + + # set right permissions + chown -R monetdb:monetdb ${D}/${DATA_DIR} + fowners monetdb:monetdb /var/log/${PN} + + # remove Mx and mel, they are only needed for compilation + rm -f ${D}/usr/bin/Mx ${D}/usr/bin/mel ${D}/usr/bin/idxmx + # remove windows crap + rm -f ${D}/usr/bin/*.bat + # remove perl DBD on ppc-macos, since it gets installed in the wrong + # location and getting it right is not just a simple thing + use ppc-macos && rm -Rf ${D}/usr/Network > /dev/null +} + +pkg_postinst() { + while read line; do einfo "${line}"; done <<EOF +MonetDB has been installed on your system, using data directory +${DATA_DIR}. To get started using SQL, XQuery or MIL see: + +http://monetdb.cwi.nl/GettingStarted/ + +If you have upgraded from version 4.6.2 or below you should restore your +SQL databases, as well as convert your MIL BATs. See also: +http://monetdb.cwi.nl/TechDocs/FrontEnds/SQL/upgrade/ +http://monetdb.cwi.nl/TechDocs/FrontEnds/mil/upgrade/ +EOF +} |