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

* [gentoo-dev] libdbi ebilds (revised)
  2001-09-22 22:34 [gentoo-dev] libdbi ebuild Tom von Schwerdtner
@ 2001-09-23 11:18 ` Tom von Schwerdtner
  0 siblings, 0 replies; 2+ messages in thread
From: Tom von Schwerdtner @ 2001-09-23 11:18 UTC (permalink / raw
  To: gentoo-dev; +Cc: tvon, gentoo-dev

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

(I think I forgot to attach the ebuild last time...oh well)

I split it up into the main libs, the mysql plugin and the pgsql plugin. 
The DB-version dependancies are based on the current mysql and pgsql
versions in portage, but I dont know what the minimums really are (I suppose
it dosent matter anyways).

For the plugins, I asumed libdbi would be put in dev-libs/libdbi, so those
lines will need to be changed if it is put somewhere else.

I didnt test the postgres plugin because I dont have postgres installed, but
there were only a few lines to change so it should be fine.

-Tom






[-- Attachment #2: libdbi-0.6.2.ebuild --]
[-- Type: application/octet-stream, Size: 846 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"

src_compile() {

	local myconf

	./configure --prefix=/usr || die  
	# libdbi apparently dosent care about the configure options, because it 
	# finds and tries to build plugins for whatever db's are installed
	cd src/
	make || die
}

src_install() {

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

	cp -a doc/* ${D}/usr/doc/${PF}
	dodoc README README.plugins TODO INSTALL AUTHORS COYING ChangeLog
}


[-- Attachment #3: libdbi-mysql-0.6.2.ebuild --]
[-- Type: application/octet-stream, Size: 658 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=libdbi-0.6.2.tar.gz
S=${WORKDIR}/libdbi-0.6.2
DESCRIPTION="libdbi implements a database-independent abstraction layer in C -- mysql plugin"
SRC_URI="http://prdownloads.sourceforge.net/libdbi/${A}"
HOMEPAGE="http://libdbi.sourceforge.net/"


DEPEND="virtual/glibc
	>=dev-db/mysql-3.23.26
	>=dev-libs/libdbi-0.6.2"

src_compile() {

	local myconf

	./configure --prefix=/usr --with-mysql || die  
	make || die
}

src_install() {

	cd plugins/mysql/
	make DESTDIR=${D} install || die
}


[-- Attachment #4: libdbi-pgsql-0.6.2.ebuild --]
[-- Type: application/octet-stream, Size: 669 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=libdbi-0.6.2.tar.gz
S=${WORKDIR}/libdbi-0.6.2
DESCRIPTION="libdbi implements a database-independent abstraction layer in C -- PostgreSQL plugin"
SRC_URI="http://prdownloads.sourceforge.net/libdbi/${A}"
HOMEPAGE="http://libdbi.sourceforge.net/"


DEPEND="virtual/glibc
	>=dev-db/postgresql-7.1
	>=dev-libs/libdbi-0.6.2"

src_compile() {

	local myconf

	./configure --prefix=/usr --with-pgsql || die  
	make || die
}

src_install() {

	cd plugins/postgresql/
	make DESTDIR=${D} install || die
}


^ 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