nextcloud-client-2.2.4-r2.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils
  5. DESCRIPTION="Nextcloud themed desktop client"
  6. HOMEPAGE="https://github.com/nextcloud/client_theming"
  7. SRC_URI="http://download.owncloud.com/desktop/stable/owncloudclient-${PV}.tar.xz
  8. https://github.com/nextcloud/client_theming/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="CC-BY-3.0 GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="doc dolphin nautilus samba +sftp test"
  13. COMMON_DEPEND=">=dev-db/sqlite-3.4:3
  14. dev-libs/qtkeychain[qt5]
  15. dev-qt/qtconcurrent:5
  16. dev-qt/qtcore:5
  17. dev-qt/qtdbus:5
  18. dev-qt/qtgui:5
  19. dev-qt/qtnetwork:5
  20. dev-qt/qtsql:5
  21. dev-qt/qtwebkit:5
  22. sys-fs/inotify-tools
  23. virtual/libiconv
  24. dolphin? (
  25. kde-frameworks/kcoreaddons:5
  26. kde-frameworks/kio:5
  27. )
  28. nautilus? ( dev-python/nautilus-python )
  29. samba? ( >=net-fs/samba-3.5 )
  30. sftp? ( >=net-libs/libssh-0.5 )
  31. "
  32. RDEPEND="${COMMON_DEPEND}
  33. !net-misc/ocsync
  34. !net-misc/owncloud-client
  35. "
  36. DEPEND="${COMMON_DEPEND}
  37. dev-qt/linguist-tools:5
  38. doc? (
  39. dev-python/sphinx
  40. dev-texlive/texlive-latexextra
  41. virtual/latex-base
  42. )
  43. dolphin? ( kde-frameworks/extra-cmake-modules )
  44. test? (
  45. dev-util/cmocka
  46. dev-qt/qttest:5
  47. )
  48. "
  49. S=${WORKDIR}/client_theming-${PV}
  50. PATCHES=(
  51. "${FILESDIR}"/${P}-dolphin.patch
  52. )
  53. src_unpack() {
  54. default
  55. rmdir "${S}"/client || die
  56. mv "${WORKDIR}"/owncloudclient-${PV} "${S}"/client \
  57. || die
  58. }
  59. src_prepare() {
  60. CMAKE_USE_DIR="${S}"/client
  61. # Keep tests in ${T}
  62. sed -i -e "s#\"/tmp#\"${T}#g" client/test/test*.cpp || die
  63. # Fix icon name
  64. sed -e "/^Icon.*=/s/@APPLICATION_EXECUTABLE@/Nextcloud/" \
  65. -i client/mirall.desktop.in || die
  66. if ! use nautilus; then
  67. pushd client/shell_integration > /dev/null || die
  68. cmake_comment_add_subdirectory nautilus
  69. popd > /dev/null || die
  70. fi
  71. default
  72. }
  73. src_configure() {
  74. local mycmakeargs=(
  75. -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
  76. -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
  77. -DWITH_ICONV=ON
  78. -DWITH_DOC=$(usex doc)
  79. -DCMAKE_DISABLE_FIND_PACKAGE_KF5=$(usex !dolphin)
  80. -DBUILD_WITH_QT4=OFF
  81. -DCMAKE_DISABLE_FIND_PACKAGE_Libsmbclient=$(usex !samba)
  82. -DCMAKE_DISABLE_FIND_PACKAGE_LibSSH=$(usex !sftp)
  83. -DUNIT_TESTING=$(usex test)
  84. -DOEM_THEME_DIR="${S}"/nextcloudtheme
  85. )
  86. cmake-utils_src_configure
  87. }
  88. pkg_postinst() {
  89. if ! use doc ; then
  90. elog "Documentation and man pages not installed"
  91. elog "Enable doc USE-flag to generate them"
  92. fi
  93. }