phpmyadmin-4.0.10.20.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils webapp
  5. MY_PV=${PV/_/-}
  6. MY_PN="phpMyAdmin"
  7. MY_P="${MY_PN}-${MY_PV}-all-languages"
  8. DESCRIPTION="Web-based administration for MySQL database in PHP"
  9. HOMEPAGE="http://www.phpmyadmin.net/"
  10. SRC_URI="https://files.phpmyadmin.net/${MY_PN}/${MY_PV}/${MY_P}.tar.xz"
  11. LICENSE="GPL-2"
  12. KEYWORDS="alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
  13. IUSE="setup"
  14. RDEPEND="
  15. dev-lang/php[crypt,ctype,filter,json,session,unicode]
  16. || (
  17. dev-lang/php[mysqli]
  18. dev-lang/php[mysql]
  19. )
  20. virtual/httpd-php:*
  21. "
  22. need_httpd_cgi
  23. S="${WORKDIR}"/${MY_P}
  24. pkg_setup() {
  25. webapp_pkg_setup
  26. }
  27. src_install() {
  28. webapp_src_preinst
  29. dodoc README RELEASE-DATE-${MY_PV} ChangeLog || die
  30. rm -f LICENSE README* RELEASE-DATE-${MY_PV}
  31. if ! use setup; then
  32. rm -rf setup || die "Cannot remove setup utility"
  33. elog "The phpMyAdmin setup utility has been removed."
  34. elog "It is a regular target of various exploits. If you need it, set USE=setup."
  35. else
  36. elog "You should consider disabling the setup USE flag"
  37. elog "to exclude the setup utility if you don't use it."
  38. elog "It regularly is the target of various exploits."
  39. fi
  40. insinto "${MY_HTDOCSDIR#${EPREFIX}}"
  41. doins -r .
  42. webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php
  43. webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php
  44. webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt
  45. webapp_src_install
  46. }