sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / app-admin / drush / drush-6.7.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit bash-completion-r1
7
8 DESCRIPTION="Command line shell and scripting interface for Drupal"
9 HOMEPAGE="https://github.com/drush-ops/drush"
10 SRC_URI="https://github.com/drush-ops/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE=""
16
17 DEPEND=""
18 RDEPEND="dev-lang/php[cli,ctype,json,simplexml]
19         dev-php/PEAR-Console_Table"
20
21 # Fixes the bash completion script, check the patch for Gentoo/upstream
22 # bug numbers.
23 PATCHES=( "${FILESDIR}/update-bash-completion-script-for-2.1.patch" )
24
25 src_prepare() {
26         default
27
28         # dodoc compresses all of the documentation, so we fix the filenames
29         # in a few places.
30         #
31         # First, the README location in bootstrap.inc.
32         sed -i -e \
33                 "s!/share/doc/drush!/share/doc/${PF}!" \
34                 -e "s!README\.md!\0.bz2!g" \
35                 includes/bootstrap.inc || die
36
37         # Next, the list of documentation in docs.drush.inc. Note that
38         # html files don't get compressed.
39         sed -i \
40                 -e "s!\.bashrc'!.bashrc.bz2'!" \
41                 -e "s!\.inc'!.inc.bz2'!" \
42                 -e "s!\.ini'!.ini.bz2'!" \
43                 -e "s!\.md'!.md.bz2'!" \
44                 -e "s!\.php'!.php.bz2'!" \
45                 -e "s!\.script'!.script.bz2'!" \
46                 -e "s!\.txt'!.txt.bz2'!" \
47                 commands/core/docs.drush.inc || die
48 }
49
50 src_install() {
51         # Always install the examples; they're referenced within the source
52         # code and too difficult to exorcise.
53         dodoc -r README.md docs examples
54
55         insinto /usr/share/drush
56         doins -r classes commands includes lib misc
57         doins drush_logo-black.png drush.info drush.php
58
59         exeinto /usr/share/drush
60         doexe drush
61         dosym ../share/drush/drush /usr/bin/drush
62
63         keepdir /etc/drush
64         newbashcomp drush.complete.sh drush
65 }