drupal-8.2.7.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright 1999-2017 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. MY_P=${P/_/-}
  7. S="${WORKDIR}/${MY_P}"
  8. DESCRIPTION="PHP-based open-source platform and content management system"
  9. HOMEPAGE="https://www.drupal.org/"
  10. SRC_URI="https://ftp.drupal.org/files/projects/${MY_P}.tar.gz"
  11. LICENSE="GPL-2"
  12. KEYWORDS="~alpha ~amd64 ~ppc ~x86"
  13. IUSE="+accelerator +mysql postgres sqlite +uploadprogress"
  14. RDEPEND="
  15. dev-lang/php[gd,hash,pdo,postgres?,simplexml,xml]
  16. virtual/httpd-php
  17. accelerator? ( ||
  18. (
  19. dev-php/xcache
  20. (
  21. >=dev-lang/php-5.5[opcache]
  22. dev-php/pecl-apcu
  23. )
  24. )
  25. )
  26. uploadprogress? ( dev-php/pecl-uploadprogress )
  27. mysql? (
  28. || (
  29. dev-lang/php[mysql]
  30. dev-lang/php[mysqli]
  31. )
  32. )
  33. sqlite? ( dev-lang/php[sqlite] )
  34. "
  35. need_httpd_cgi
  36. REQUIRED_USE="|| ( mysql postgres sqlite )"
  37. src_install() {
  38. webapp_src_preinst
  39. local docs="LICENSE.txt README.txt core/MAINTAINERS.txt core/INSTALL.txt core/CHANGELOG.txt \
  40. core/INSTALL.mysql.txt core/INSTALL.pgsql.txt core/INSTALL.sqlite.txt core/UPDATE.txt "
  41. dodoc ${docs}
  42. rm -f ${docs} core/INSTALL core/COPYRIGHT.txt core/LICENSE.txt || die
  43. cp sites/default/{default.settings.php,settings.php} || die
  44. insinto "${MY_HTDOCSDIR}"
  45. doins -r .
  46. dodir "${MY_HTDOCSDIR}"/files
  47. webapp_serverowned "${MY_HTDOCSDIR}"/files
  48. webapp_serverowned "${MY_HTDOCSDIR}"/sites/default
  49. webapp_serverowned "${MY_HTDOCSDIR}"/sites/default/settings.php
  50. webapp_configfile "${MY_HTDOCSDIR}"/sites/default/settings.php
  51. webapp_configfile "${MY_HTDOCSDIR}"/.htaccess
  52. webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
  53. webapp_src_install
  54. }
  55. pkg_postinst() {
  56. echo
  57. ewarn "SECURITY NOTICE"
  58. ewarn "If you plan on using SSL on your Drupal site, please consult the postinstall information:"
  59. ewarn "\t# webapp-config --show-postinst ${PN} ${PV}"
  60. echo
  61. ewarn "If this is a new install, unless you want anyone with network access to your server to be"
  62. ewarn "able to run the setup, you'll have to configure your web server to limit access to it."
  63. echo
  64. ewarn "If you're doing a new drupal-8 install, you'll have to copy /sites/default/default.services.yml"
  65. ewarn "to /sites/default/services.yml and grant it write permissions to your web server."
  66. ewarn "Just follow the instructions of the drupal setup and be sure to resolve any permissions issue"
  67. ewarn "reported by the setup."
  68. echo
  69. }