# 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/maxdb-devtools-7.5.0.8.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-244782.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 )" 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() { if [ -z "${MAXDBROOT}" ]; then MAXDBROOT=/opt/sdb fi warning } src_unpack() { unpack ${A} || die cd ${WORKDIR}/TOOLSRC ./configure } src_compile() { cd ${WORKDIR}/TOOLSRC make || die "compile problem" } src_install() { if [ ! -d ${D}${MAXDBROOT}/devtools ] then dodir ${MAXDBROOT}/devtools fi fowners root:root ${MAXDBROOT}/devtools (cd ${WORKDIR}/TOOLSRC > /dev/null; tar cf - .) | (cd ${D}${MAXDBROOT}/devtools >/dev/null; tar xf -) } 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 ${ROOT}${MAXDBROOT}/devtools #your friendly public service announcement... einfo "MaxDb Devtools have been installed to" einfo ${MAXDBROOT}/devtools 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 }