# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/dev-db/maxdb-devtools-src/maxdb-devtools-src-528670.ebuild,v 1.4 2004/02/07 17:12:43 brad_mssw Exp $ inherit eutils DESCRIPTION="Development Utils for MaxDB - a enterpise grade, database server. Needed for compilation of MaxDB. This ebuild will compile maxdb Development Utils from sources." HOMEPAGE="http://www.mysql.com/products/maxdb" SRC_URI="ftp://ftp.sap.com/pub/maxdb/buildtools/maxdb-buildtools-source-528670.tgz" KEYWORDS="~x86" LICENSE="GPL-2" SLOT="0" # IUSE="static readline innodb berkdb tcpd ssl perl debug" IUSE="" DEPEND="gcc? ( >=sys-devel/gcc-3.3.2 ) bison? ( sys-devel/bison ) python? ( >=dev-lang/python-1.5.2 ) perl? ( >=dev-lang/perl-2.3.3 ) vim ( >=app-editors/vim-6.3 )" warning() { ewarn ewarn "You can specify the root directory for the installation" ewarn "by setting the environment variable MAXDBROOT" ewarn ewarn "DevTools will be installed to:" ewarn ${MAXDBROOT} ewarn einfo "Workdir is:" einfo ${WORKDIR} einfo D is: einfo ${D} einfo ROOT is: einfo ${ROOT} sleep 10 } pkg_setup() { SRC_DEVTOOLDIR=TOOLSRC DEST_DEVTOOLDIR=devtools if [ -z "${MAXDBROOT}" ]; then MAXDBROOT=/opt/sdb fi warning } src_unpack() { unpack ${A} || die cd ${WORKDIR}/${SRC_DEVTOOLDIR} ./configure } src_compile() { # cd ${WORKDIR}/${SRC_DEVTOOLDIR} # make || die "compile problem" einfo "" einfo "MAKE PROCESS CAN CURRENTLY NOT BE RUN WITHIN PORTAGE" einfo "(you have to start ist manualy following the steps below)" einfo "" einfo "To execute the make process do the following " einfo "in a second console (window) as root:" einfo "" ewarn "# cd ${WORKDIR}/${SRC_DEVTOOLDIR}" ewarn "# make" einfo "" einfo "You can ingore the info and the error about running prepare_inst.pl" einfo "that is displayed at the and of the make process!" einfo einfo "When make finishes go back to this window" einfo "end press ENTER !" read } src_install() { if [ ! -d ${D}${MAXDBROOT}/${DEST_DEVTOOLDIR} ] then dodir ${MAXDBROOT}/${DEST_DEVTOOLDIR} fi fowners root:root ${MAXDBROOT}/${DEVTOOLDIR} (cd ${WORKDIR}/${SRC_DEVTOOLDIR} > /dev/null; tar cf - .) | (cd ${D}${MAXDBROOT}/${DEST_DEVTOOLDIR} >/dev/null; tar xvf -) addwrite ${ROOT}usr/spool/sql dodir ${ROOT}usr/spool/sql/config fowners root:root ${ROOT}/usr/spool/sql/config dodir ${ROOT}usr/spool/sql/ini fowners root:root ${ROOT}/usr/spool/sql/ini } pkg_preinst() { if ! groupmod sdba; then groupadd sdba || die "problem adding group sdba" fi if ! id sdb; then useradd -g sdba -s /dev/null -d /opt/maxdb -c "sdb" sdb assert "problem adding user sdb" fi } pkg_postinst() { install -d -m0755 -o root -g root ${MAXDBROOT}/${DEST_DEVTOOLDIR} install -d -m0755 -o root -g root usr/spool/sql/config install -d -m0755 -o root -g root usr/spool/sql/ini einfo "Creating the global MAXDB registry" ${MAXDBROOT}/${DEST_DEVTOOLDIR}/bin/prepare_inst.pl #your friendly public service announcement... einfo "MaxDb Devtools have been installed to" einfo ${MAXDBROOT}/${DEST_DEVTOOLDIR} einfo if [ ! -d /usr/spool/sql/config ] then ewarn "**********************************************************************" ewarn "*** Run ${DEVTOOLS}/bin/prepare_inst.pl as root" ewarn "*** to create the global SAP DB registry " ewarn "***" ewarn "*** (or export NOREG=1 to build without registration)" ewarn "**********************************************************************" fi }