diff options
| author | Jackie Huang <jackie.huang@windriver.com> | 2016-07-26 05:18:08 -0400 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-07-29 11:01:00 +0200 |
| commit | 4b24a6c86cdd82da56bb24c95fb114e323bd0835 (patch) | |
| tree | 64501bcf8c6136246aa284be6a4b922dffff85ca /meta-oe/recipes-support/psqlodbc/psqlodbc.inc | |
| parent | 8bb4a8bc5bea2b7ad175520199da6952d82c6a93 (diff) | |
| download | meta-openembedded-4b24a6c86cdd82da56bb24c95fb114e323bd0835.tar.gz | |
psqlodbc: Add the new recipe
This package provides a driver that allows ODBC-enabled
applications to access PostgreSQL databases.
Add ptest support as well.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/psqlodbc/psqlodbc.inc')
| -rw-r--r-- | meta-oe/recipes-support/psqlodbc/psqlodbc.inc | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/psqlodbc/psqlodbc.inc b/meta-oe/recipes-support/psqlodbc/psqlodbc.inc new file mode 100644 index 0000000000..5337b45695 --- /dev/null +++ b/meta-oe/recipes-support/psqlodbc/psqlodbc.inc | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | SUMMARY = "ODBC driver for PostgreSQL" | ||
| 2 | DESCRIPTION = "\ | ||
| 3 | This package provides a driver that allows ODBC-enabled applications to \ | ||
| 4 | access PostgreSQL databases. ODBC is an abstraction layer that allows \ | ||
| 5 | applications written for that layer to access databases in a manner \ | ||
| 6 | that is relatively independent of the particular database management \ | ||
| 7 | system. \ | ||
| 8 | . \ | ||
| 9 | You need to install this package if you want to use an application that \ | ||
| 10 | provides database access through ODBC and you want that application to \ | ||
| 11 | access a PostgreSQL database. This package would need to be installed \ | ||
| 12 | on the same machine as that client application; the PostgreSQL database \ | ||
| 13 | server can be on a different machine and does not need any additional \ | ||
| 14 | software to accept ODBC clients. \ | ||
| 15 | " | ||
| 16 | SECTION = "libs" | ||
| 17 | HOMEPAGE = "http://psqlodbc.projects.postgresql.org/" | ||
| 18 | |||
| 19 | DEPENDS += "postgresql unixodbc" | ||
| 20 | |||
| 21 | EXTRA_OECONF = "\ | ||
| 22 | ac_cv_lib_ltdl_lt_dlopen=no \ | ||
| 23 | ac_cv_lib_pq_PQconnectdb=yes \ | ||
| 24 | --with-unixodbc=yes \ | ||
| 25 | --with-libpq=${STAGING_LIBDIR}/.. \ | ||
| 26 | --enable-pthreads \ | ||
| 27 | --disable-unicode \ | ||
| 28 | LIBS="-lpthread" \ | ||
| 29 | " | ||
| 30 | |||
| 31 | inherit autotools pkgconfig ptest | ||
| 32 | |||
| 33 | do_compile_ptest() { | ||
| 34 | oe_runmake -C ${B}/test | ||
| 35 | } | ||
| 36 | |||
| 37 | do_install_ptest() { | ||
| 38 | install -d ${D}${PTEST_PATH} | ||
| 39 | cp -a --no-preserve=ownership ${B}/test/exe ${S}/test/expected ${D}${PTEST_PATH} | ||
| 40 | install -m 0755 ${B}/test/reset-db ${D}${PTEST_PATH} | ||
| 41 | install -m 0755 ${B}/test/runsuite ${D}${PTEST_PATH} | ||
| 42 | install -m 0755 ${S}/test/odbcini-gen.sh ${D}${PTEST_PATH} | ||
| 43 | install -m 0755 ${S}/test/sampletables.sql ${D}${PTEST_PATH} | ||
| 44 | sed -i -e 's|@LIBDIR@|${libdir}|' ${D}${PTEST_PATH}/odbcini-gen.sh | ||
| 45 | } | ||
| 46 | |||
| 47 | FILES_${PN} += "${libdir}" | ||
| 48 | |||
| 49 | # The tests need a local PostgreSQL server running | ||
| 50 | RDEPENDS_${PN}-ptest = "postgresql" | ||
