public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] libdbi ebuild
@ 2001-09-22 22:34 Tom von Schwerdtner
  2001-09-23 11:18 ` [gentoo-dev] libdbi ebilds (revised) Tom von Schwerdtner
  0 siblings, 1 reply; 2+ messages in thread
From: Tom von Schwerdtner @ 2001-09-22 22:34 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 787 bytes --]

Hey all,

  This is my first ebuild, so feel free to tell me what I did wrong.

  FYI, libdbi is a C lib similar to DBI for Perl.

  One thing I'm not sure about, although you _can_ build libdbi without any
databases installed, it is pointless without plugins (mysql or postgresql
plugins which require that the respective db's are installed).  Making it
pass the apropriate configure options is no problem, but how might I tell it
to depend on _a_ database, but not a specific one?  is there a virtual/db
entry or how hard would it be to add one (who has to do it?)?

  Also, the docs are installed via 'make install', this will change since to
get the full docs (not default) you need doxygen which shouldnt be depended
on for a lib like this.....seperate ebuild for the docs ok?
-Tom

[-- Attachment #2: libdbi-0.6.2.ebuild --]
[-- Type: application/octet-stream, Size: 1188 bytes --]

# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Tom von Schwerdtner <tvon@etria.org>

A=${P}.tar.gz
S=${WORKDIR}/${P}
DESCRIPTION="libdbi implements a database-independent abstraction layer in C"
SRC_URI="http://prdownloads.sourceforge.net/libdbi/${A}"
HOMEPAGE="http://libdbi.sourceforge.net/"


DEPEND="virtual/glibc
	mysql? ( >=dev-db/mysql-3.23.26 )
	postgres? ( >=dev-db/postgresql-7.1 )"

src_compile() {

	local myconf

	if [ "`use mysql`" ]
	then
 		myconf="--with-mysql"
	fi
  
	if [ "`use postgres`" ]
	then
 		myconf="${myconf} --with-pgsql"
	fi

	./configure --prefix=/usr ${myconf} || die  
	make || die
}

src_install() {

	make DESTDIR=${D} install || die
	insinto /usr/include/dbi 
	doins include/dbi/*.h

 	# Doxygen is needed to get the full use of the html docs, so the docs
 	# should be split into a seperate ebuild file. (since having libdbi depend
 	# on doxygen is silly, imho).
 	# ..'make install' seems to be installing the docs, but without doxygen
 	# being used....
	cp -a doc/*.pdf ${D}/usr/doc/${PF}
	dodoc README README.plugins TODO INSTALL AUTHORS COYING ChangeLog
}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-23 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-22 22:34 [gentoo-dev] libdbi ebuild Tom von Schwerdtner
2001-09-23 11:18 ` [gentoo-dev] libdbi ebilds (revised) Tom von Schwerdtner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox