mysql-udf-http-1.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2011 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils toolchain-funcs autotools
  5. DESCRIPTION="MySQL User-defined function (UDF) for HTTP REST"
  6. HOMEPAGE="https://code.google.com/p/mysql-udf-http/"
  7. SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
  8. LICENSE="BSD-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE=""
  12. DEPEND=">=virtual/mysql-5.1
  13. net-misc/curl"
  14. RDEPEND="${DEPEND}"
  15. pkg_setup() {
  16. MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
  17. MYSQL_INCLUDE="$(mysql_config --include)"
  18. }
  19. src_prepare() {
  20. # fix README
  21. sed -i -e "s|${PN}\(\.so\)|${PN//-/_}\1|g" README
  22. # fix Makefile.am
  23. sed -i -e "s|${PN}\([_\.]la\)|${PN//-/_}\1|g" \
  24. -e "s|\(-module\)|\1 -avoid-version|g" src/Makefile.am
  25. epatch "${FILESDIR}/${PN}-stdlib.patch"
  26. eautoreconf
  27. }
  28. src_configure() {
  29. econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" \
  30. --with-mysql="$(type -p mysql_config)"
  31. }
  32. src_install() {
  33. emake DESTDIR="${D}" install
  34. dodoc README
  35. # remove obsolete *.la file
  36. rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la
  37. }
  38. pkg_postinst() {
  39. elog
  40. elog "Please have a look at the documentation, how to"
  41. elog "enable/disable the UDF functions of ${PN}."
  42. elog
  43. elog "The documentation is located here:"
  44. elog "/usr/share/doc/${PF}"
  45. elog
  46. }