1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit bash-completion-r1
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"
18 RDEPEND="dev-lang/php[cli,ctype,json,simplexml]
19 dev-php/PEAR-Console_Table"
21 # Fixes the bash completion script, check the patch for Gentoo/upstream
23 PATCHES=( "${FILESDIR}/update-bash-completion-script-for-2.1.patch" )
28 # dodoc compresses all of the documentation, so we fix the filenames
31 # First, the README location in bootstrap.inc.
33 "s!/share/doc/drush!/share/doc/${PF}!" \
34 -e "s!README\.md!\0.bz2!g" \
35 includes/bootstrap.inc || die
37 # Next, the list of documentation in docs.drush.inc. Note that
38 # html files don't get compressed.
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
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
55 insinto /usr/share/drush
56 doins -r classes commands includes lib misc
57 doins drush_logo-black.png drush.info drush.php
59 exeinto /usr/share/drush
61 dosym ../share/drush/drush /usr/bin/drush
64 newbashcomp drush.complete.sh drush