drupal-7.53.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit webapp
  5. MY_PV=${PV:0:3}.0
  6. DESCRIPTION="PHP-based open-source platform and content management system"
  7. HOMEPAGE="https://www.drupal.org/"
  8. SRC_URI="https://ftp.drupal.org/files/projects/${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. KEYWORDS="~alpha ~amd64 ~ppc ~x86"
  11. IUSE="+accelerator +mysql postgres sqlite +uploadprogress"
  12. RDEPEND="
  13. dev-lang/php[gd,hash,pdo,postgres?,simplexml,xml]
  14. virtual/httpd-php
  15. accelerator? ( ||
  16. (
  17. dev-php/xcache
  18. (
  19. >=dev-lang/php-5.5[opcache]
  20. dev-php/pecl-apcu
  21. )
  22. )
  23. )
  24. uploadprogress? ( dev-php/pecl-uploadprogress )
  25. mysql? (
  26. || (
  27. dev-lang/php[mysql]
  28. dev-lang/php[mysqli]
  29. )
  30. )
  31. sqlite? ( dev-lang/php[sqlite] )
  32. "
  33. need_httpd_cgi
  34. REQUIRED_USE="|| ( mysql postgres sqlite )"
  35. src_install() {
  36. webapp_src_preinst
  37. local docs="MAINTAINERS.txt LICENSE.txt INSTALL.txt CHANGELOG.txt INSTALL.mysql.txt INSTALL.pgsql.txt INSTALL.sqlite.txt UPGRADE.txt "
  38. dodoc ${docs}
  39. rm -f ${docs} INSTALL COPYRIGHT.txt || die
  40. cp sites/default/{default.settings.php,settings.php} || die
  41. insinto "${MY_HTDOCSDIR}"
  42. doins -r .
  43. dodir "${MY_HTDOCSDIR}"/files
  44. webapp_serverowned "${MY_HTDOCSDIR}"/files
  45. webapp_serverowned "${MY_HTDOCSDIR}"/sites/default
  46. webapp_serverowned "${MY_HTDOCSDIR}"/sites/default/settings.php
  47. webapp_configfile "${MY_HTDOCSDIR}"/sites/default/settings.php
  48. webapp_configfile "${MY_HTDOCSDIR}"/.htaccess
  49. webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
  50. webapp_src_install
  51. }
  52. pkg_postinst() {
  53. echo
  54. ewarn "SECURITY NOTICE"
  55. ewarn "If you plan on using SSL on your Drupal site, please consult the postinstall information:"
  56. ewarn "\t# webapp-config --show-postinst ${PN} ${PV}"
  57. echo
  58. }