net-mail/mailbox-count: new version 0.0.5.
[gentoo.git] / net-misc / owncloud-client / owncloud-client-2.6.1.13407.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit cmake-utils xdg
7
8 DESCRIPTION="Synchronize files from ownCloud Server with your computer"
9 HOMEPAGE="https://owncloud.org/"
10 SRC_URI="https://download.owncloud.com/desktop/stable/${P/-}.tar.xz"
11
12 LICENSE="CC-BY-3.0 GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="doc dolphin gnome-keyring nautilus test"
16
17 COMMON_DEPEND=">=dev-db/sqlite-3.4:3
18         dev-libs/qtkeychain[qt5(+)]
19         dev-qt/qtconcurrent:5
20         dev-qt/qtcore:5
21         dev-qt/qtdbus:5
22         dev-qt/qtgui:5
23         dev-qt/qtnetwork:5[ssl]
24         dev-qt/qtsql:5
25         dev-qt/qtwidgets:5
26         dev-qt/qtxml:5
27         sys-fs/inotify-tools
28         dolphin? (
29                 kde-frameworks/kcoreaddons:5
30                 kde-frameworks/kio:5
31         )
32         nautilus? ( dev-python/nautilus-python )"
33
34 RDEPEND="${COMMON_DEPEND}
35         gnome-keyring? ( gnome-base/gnome-keyring )"
36 DEPEND="${COMMON_DEPEND}
37         dev-qt/linguist-tools:5
38         doc? (
39                 dev-python/sphinx
40                 dev-tex/latexmk
41                 dev-texlive/texlive-latexextra
42                 virtual/latex-base
43         )
44         dolphin? ( kde-frameworks/extra-cmake-modules )
45         test? (
46                 dev-util/cmocka
47                 dev-qt/qttest:5
48         )"
49
50 RESTRICT="!test? ( test )"
51
52 S=${WORKDIR}/${P/-}
53
54 src_prepare() {
55         # Keep tests in ${T}
56         sed -i -e "s#\"/tmp#\"${T}#g" test/test*.cpp || die
57
58         if ! use nautilus; then
59                 pushd shell_integration > /dev/null || die
60                 cmake_comment_add_subdirectory nautilus
61                 popd > /dev/null || die
62         fi
63         cmake-utils_src_prepare
64 }
65
66 src_configure() {
67         local mycmakeargs=(
68                 -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
69                 -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
70                 -DCMAKE_DISABLE_FIND_PACKAGE_Sphinx=$(usex !doc)
71                 -DCMAKE_DISABLE_FIND_PACKAGE_KF5=$(usex !dolphin)
72                 -DBUILD_TESTING=$(usex test)
73         )
74
75         cmake-utils_src_configure
76 }
77
78 pkg_postinst() {
79         if ! use doc ; then
80                 elog "Documentation and man pages not installed"
81                 elog "Enable doc USE-flag to generate them"
82         fi
83         xdg_pkg_postinst
84 }