alpha-quadrant/app-admin/drush/drush-5.1.ebuild
2012-04-26 13:12:46 +02:00

45 lines
1.1 KiB
Bash

# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="4"
DESCRIPTION="Drush is a command line shell and scripting interface for Drupal"
HOMEPAGE="http://drupal.org/project/drush"
SRC_URI="http://ftp.drupal.org/files/projects/${PN}-7.x-${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples"
DEPEND="dev-lang/php[cli,simplexml] dev-php/pear"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}"
src_prepare() {
sed -i -e "s!/share/doc/drush!/share/doc/${P}!" includes/environment.inc || die
sed -i -e "s!\.php'!.php.bz2'!" commands/core/docs.drush.inc || die
# preparing bashcomp
mkdir bashcomp && mv drush.complete.sh bashcomp/drush || die
# cleanup
rm drush.bat includes/.gitignore
}
src_install() {
local docs="README.txt docs"
use examples && docs="${docs} examples"
insinto /usr/share/drush
doins -r drush.php drush.info includes commands lib LICENSE.txt
exeinto /usr/share/drush
doexe drush
dosym /usr/share/drush/drush /usr/bin/drush
dodoc -r ${docs}
keepdir /etc/drush
insinto /usr/share/bash-completion
doins bashcomp/drush
}