summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2003-10-27 01:59:22 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2003-10-27 01:59:22 +0000
commit81a947884f26eff713dbc429006f6344a8b9c2c9 (patch)
tree0c53f4256d66f7bcac7ea2a07ebf110b0ad123c6 /dev-db
parentinitial commit, bug #15546, submitted by Zhen Lin <lowzl@hotmail.com>. major... (diff)
downloadgentoo-2-81a947884f26eff713dbc429006f6344a8b9c2c9.tar.gz
gentoo-2-81a947884f26eff713dbc429006f6344a8b9c2c9.tar.bz2
gentoo-2-81a947884f26eff713dbc429006f6344a8b9c2c9.zip
initial commit, bug #15546, submitted by Zhen Lin <lowzl@hotmail.com>. major changes made for auto-configuration of driver and DSN.
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/myodbc/ChangeLog12
-rw-r--r--dev-db/myodbc/Manifest5
-rw-r--r--dev-db/myodbc/files/digest-myodbc-3.51.061
-rw-r--r--dev-db/myodbc/files/odbc.ini.m418
-rw-r--r--dev-db/myodbc/files/odbcinst.ini.m46
-rw-r--r--dev-db/myodbc/myodbc-3.51.06.ebuild86
6 files changed, 127 insertions, 1 deletions
diff --git a/dev-db/myodbc/ChangeLog b/dev-db/myodbc/ChangeLog
new file mode 100644
index 000000000000..48b4ffff5a47
--- /dev/null
+++ b/dev-db/myodbc/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-db/myodbc
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.1 2003/10/27 01:59:20 robbat2 Exp $
+
+ 26 Oct 2003; Robin H. Johnson <robbat2@gentoo.org> myodbc-3.51.06.ebuild,
+ files/odbc.ini.m4, files/odbcinst.ini.m4:
+ major changes made for auto-configuration of driver and DSN.
+
+*myodbc-3.51.06 (26 Oct 2003)
+
+ 26 Oct 2003; Robin H. Johnson <robbat2@gentoo.org> myodbc-3.51.06.ebuild:
+ initial commit, bug #15546, submitted by Zhen Lin <lowzl@hotmail.com>
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest
index 523d12085c97..466bf081b109 100644
--- a/dev-db/myodbc/Manifest
+++ b/dev-db/myodbc/Manifest
@@ -1,2 +1,5 @@
-MD5 eb858cfe47b1405f3d46ada3c81699d9 myodbc-3.51.06.ebuild 1475
+MD5 9c875ec7d0f2630b9874c79dfb0d58a0 myodbc-3.51.06.ebuild 2355
+MD5 7a2c77727fe2814481cfbb62619298cc ChangeLog 571
MD5 af6071c0c469470111c00d957ccad675 files/digest-myodbc-3.51.06 66
+MD5 74033102ea20855ca5efbc4951cf83dd files/odbcinst.ini.m4 229
+MD5 20366b35a236f41aeef13d0f8fd33a29 files/odbc.ini.m4 513
diff --git a/dev-db/myodbc/files/digest-myodbc-3.51.06 b/dev-db/myodbc/files/digest-myodbc-3.51.06
new file mode 100644
index 000000000000..fecb2686315a
--- /dev/null
+++ b/dev-db/myodbc/files/digest-myodbc-3.51.06
@@ -0,0 +1 @@
+MD5 5a59b4f01592fc9ec96e985bc7d6aada MyODBC-3.51.06.tar.gz 322059
diff --git a/dev-db/myodbc/files/odbc.ini.m4 b/dev-db/myodbc/files/odbc.ini.m4
new file mode 100644
index 000000000000..f3db4e7463b3
--- /dev/null
+++ b/dev-db/myodbc/files/odbc.ini.m4
@@ -0,0 +1,18 @@
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/files/odbc.ini.m4,v 1.1 2003/10/27 01:59:20 robbat2 Exp $
+# vim:ts=4 noexpandtab ft=dosini:
+#
+[ODBC Data Sources]
+__PN__-test = MySQL ODBC __PF__ Driver Testing DSN
+
+# see http://www.mysql.com/products/myodbc/faq_toc.html
+# for details about the following entry
+[__PN__-test]
+Description = MySQL ODBC __PF__ Driver Testing DSN
+Driver = __PN__
+Socket = /var/run/mysqld/mysqld.sock
+Server = localhost
+User = root
+Database = test
+Option = 3
+#Port =
+#Password =
diff --git a/dev-db/myodbc/files/odbcinst.ini.m4 b/dev-db/myodbc/files/odbcinst.ini.m4
new file mode 100644
index 000000000000..20e1f996b5b4
--- /dev/null
+++ b/dev-db/myodbc/files/odbcinst.ini.m4
@@ -0,0 +1,6 @@
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/files/odbcinst.ini.m4,v 1.1 2003/10/27 01:59:20 robbat2 Exp $
+# vim:ts=4 noexpandtab ft=dosini:
+#
+[__PN__]
+Description = MySQL ODBC __PF__ Driver
+Driver = /usr/lib/libmyodbc3.so
diff --git a/dev-db/myodbc/myodbc-3.51.06.ebuild b/dev-db/myodbc/myodbc-3.51.06.ebuild
new file mode 100644
index 000000000000..dc429ab77778
--- /dev/null
+++ b/dev-db/myodbc/myodbc-3.51.06.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/myodbc-3.51.06.ebuild,v 1.1 2003/10/27 01:59:20 robbat2 Exp $
+
+MY_PN="MyODBC"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+SRC_URI="mirror://mysql/Downloads/MyODBC3/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+RDEPEND=">=dev-db/mysql-4 dev-db/unixODBC sys-devel/m4"
+# perl is required for building docs
+DEPEND="${RDEPEND} docs? ( dev-lang/perl )"
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ local myconf="--enable-static"
+ use static \
+ && myconf="${myconf} --disable-shared" \
+ || myconf="${myconf} --enable-shared"
+
+ myconf="${myconf} `use_with doc docs` `use_with debug`"
+
+ econf \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc/myodbc \
+ --localstatedir=/var/lib/myodbc \
+ --with-mysql-libs=/usr/lib/mysql \
+ --with-mysql-includes=/usr/include/mysql \
+ --with-odbc-ini=/etc/unixODBC/odbc.ini \
+ --with-unixODBC=/usr \
+ ${myconf} || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ einstall \
+ libexecdir=${D}/usr/sbin \
+ sysconfdir=${D}/etc/myodbc \
+ localstatedir=${D}/var/lib/myodbc
+ dodoc INSTALL RELEASE-NOTES README
+}
+
+pkg_config() {
+ [ "${ROOT}" != "/" ] && \
+ die "Sorry, non-standard \$ROOT setting is not supported :-("
+
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ /usr/bin/m4 -D__PN__=${PN} -D__PF__=${PF} ${FILESDIR}/${i}.m4 >${T}/${i}
+ done;
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+ if echo $drivers | grep -vq "^\[${PN}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f ${T}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${PN}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f ${T}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+ einfo "If this is a new install, please run the following command"
+ einfo "to configure the MySQL ODBC drivers and sources:"
+ einfo "ebuild ${PORTDIR}/${CATEGORY}/${PN}/${PF}.ebuild config"
+}