app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / yandex-disk / yandex-disk-0.1.5.940_p1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit bash-completion-r1 eutils rpm
7
8 MY_P="${PN}-${PV/_p/-}"
9
10 DESCRIPTION="CLI to access Yandex Disk file storage service"
11 HOMEPAGE="https://disk.yandex.ru"
12 SRC_URI="
13         amd64? ( http://repo.yandex.ru/yandex-disk/rpm/stable/x86_64/${MY_P}.fedora.x86_64.rpm )
14         x86? ( http://repo.yandex.ru/yandex-disk/rpm/stable/i386/${MY_P}.fedora.i386.rpm )
15 "
16
17 LICENSE="YDSLA"
18 SLOT="0"
19 KEYWORDS="-* amd64 x86"
20
21 DEPEND=""
22 RDEPEND="sys-libs/zlib"
23
24 S="${WORKDIR}"
25
26 QA_PREBUILT="opt/bin/yandex-disk"
27
28 src_prepare() {
29         # bug #526312
30         sed -i \
31                 -e '/have /d' \
32                 -e 's/+o nospace/-o nospace/' \
33                 -e '/^complete/s/-X //' \
34                 etc/bash_completion.d/yandex-disk-completion.bash || die
35
36         eapply_user
37 }
38
39 src_install() {
40         exeinto /opt/bin
41         doexe usr/bin/yandex-disk
42         newbashcomp etc/bash_completion.d/yandex-disk-completion.bash "${PN}"
43         insinto /usr/share/man
44         doins -r usr/share/man/*
45         insinto /usr/share
46         doins -r usr/share/locale
47 }