baikal-0.2.7.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit webapp
  5. DESCRIPTION="Lightweight CalDAV+CardDAV server"
  6. HOMEPAGE="http://baikal-server.com/"
  7. SRC_URI="http://baikal-server.com/get/${PN}-regular-${PV}.tgz"
  8. LICENSE="GPL-3"
  9. KEYWORDS="~amd64"
  10. IUSE="+mysql sqlite"
  11. REQUIRED_USE="|| ( mysql sqlite )"
  12. RDEPEND=">=dev-lang/php-5.3[ctype,filter,pdo,session,xml,mysql?,sqlite?]
  13. mysql? ( virtual/mysql )
  14. sqlite? ( dev-db/sqlite )
  15. virtual/httpd-php"
  16. S=${WORKDIR}/${PN}-regular
  17. src_install() {
  18. webapp_src_preinst
  19. dodoc *.md || die "dodoc failed"
  20. einfo "Installing web files"
  21. insinto "${MY_HTDOCSDIR}"
  22. doins -r html/* html/.htaccess Core vendor || die "doins failed"
  23. einfo "Setting up container for configuration"
  24. insinto /etc/${PN}
  25. doins Specific/.htaccess || die "doins failed"
  26. einfo "Fixing symlinks"
  27. local link target
  28. find "${D}${MY_HTDOCSDIR}" -type l | while read link ; do
  29. target=$(readlink "${link}")
  30. target=${target/..\/Core/Core}
  31. rm "${link}" && ln -s "${target}" "${link}"
  32. done
  33. dosym /etc/${PN} "${MY_HTDOCSDIR}"/Specific
  34. dosym . "${MY_HTDOCSDIR}"/html
  35. webapp_postinst_txt en "${FILESDIR}/postinstall-en.txt"
  36. webapp_src_install
  37. if has_version www-servers/apache ; then
  38. fowners -R apache:apache /etc/${PN}
  39. else
  40. einfo "/etc/${PN} must be owned by the webserver user for baikal"
  41. fi
  42. }