psqlodbc.inc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. DEPENDS += "postgresql unixodbc"
  19. EXTRA_OECONF = "\
  20. ac_cv_lib_ltdl_lt_dlopen=no \
  21. ac_cv_lib_pq_PQconnectdb=yes \
  22. --with-unixodbc=yes \
  23. --with-libpq=${STAGING_LIBDIR}/.. \
  24. --enable-pthreads \
  25. --disable-unicode \
  26. LIBS="-lpthread" \
  27. "
  28. inherit autotools pkgconfig ptest
  29. do_compile_ptest() {
  30. oe_runmake -C ${B}/test
  31. }
  32. do_install_ptest() {
  33. install -d ${D}${PTEST_PATH}
  34. cp -a --no-preserve=ownership ${B}/test/exe ${S}/test/expected ${D}${PTEST_PATH}
  35. install -m 0755 ${B}/test/reset-db ${D}${PTEST_PATH}
  36. install -m 0755 ${B}/test/runsuite ${D}${PTEST_PATH}
  37. install -m 0755 ${S}/test/odbcini-gen.sh ${D}${PTEST_PATH}
  38. install -m 0755 ${S}/test/sampletables.sql ${D}${PTEST_PATH}
  39. sed -i -e 's|@LIBDIR@|${libdir}|' ${D}${PTEST_PATH}/odbcini-gen.sh
  40. }
  41. FILES_${PN} += "${libdir}"
  42. # The tests need a local PostgreSQL server running
  43. RDEPENDS_${PN}-ptest = "postgresql"