davical-1.0.2-r2.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit webapp eutils
  5. DESCRIPTION="A CalDAV and CardDAV Server"
  6. HOMEPAGE="http://davical.org/"
  7. SRC_URI="http://debian.mcmillan.net.nz/packages/${PN}/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. KEYWORDS="~amd64 ~x86"
  10. IUSE="doc"
  11. DEPEND=">=dev-php/awl-0.51
  12. sys-devel/gettext"
  13. RDEPEND="
  14. app-admin/pwgen
  15. dev-lang/php:*[calendar,curl,pdo,postgres,xml]
  16. dev-perl/DBI
  17. dev-perl/DBD-Pg
  18. dev-perl/YAML
  19. >=dev-php/awl-0.51
  20. www-servers/apache"
  21. need_httpd
  22. src_prepare() {
  23. epatch "${FILESDIR}/awl_location.patch"
  24. epatch "${FILESDIR}/inc_path.patch"
  25. }
  26. src_compile() {
  27. emake built-po
  28. }
  29. src_install() {
  30. webapp_src_preinst
  31. dodoc INSTALL README debian/README.Debian \
  32. testing/README.regression_tests TODO debian/changelog
  33. einfo "Installing web files"
  34. insinto "${MY_HTDOCSDIR}"
  35. doins -r htdocs/* htdocs/.htaccess
  36. einfo "Installing main files and i18n"
  37. insinto "${MY_HOSTROOTDIR}/${PN}"
  38. doins -r inc locale || die "doins failed"
  39. rm "${D}/${MY_HOSTROOTDIR}/${PN}/inc/always.php.in" || die
  40. einfo "Installing sql files"
  41. insinto "${MY_SQLSCRIPTSDIR}"
  42. doins -r dba/*
  43. if use doc ; then
  44. einfo "Installing documentation"
  45. dohtml -r docs/api/ docs/website/
  46. fi
  47. insinto /etc/${PN}
  48. doins config/* "${FILESDIR}/vhost-example"
  49. webapp_postinst_txt en "${FILESDIR}/postinstall-en.txt"
  50. webapp_src_install
  51. fperms +x "${MY_SQLSCRIPTSDIR}/create-database.sh"
  52. fperms +x "${MY_SQLSCRIPTSDIR}/update-davical-database"
  53. }