alpha-quadrant/app-admin/drush/drush-5.1.ebuild

56 lines
1.3 KiB
Bash
Raw Normal View History

2011-08-29 16:02:40 +02:00
# 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"
2011-08-29 16:02:40 +02:00
DEPEND="dev-lang/php[cli,simplexml]
dev-php/pear
dev-php/PEAR-Console_Getopt
dev-php/PEAR-Console_Table"
2011-08-29 16:02:40 +02:00
RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}"
2012-02-24 10:13:55 +01:00
src_prepare() {
sed -i \
-e "s!\(/share/doc/\)drush!\1${P}!g" \
-e "s!README\.txt!\0.bz2!g" \
includes/bootstrap.inc || die
sed -i -e "s!\.php'!.php.bz2'!g" commands/core/docs.drush.inc || die
2012-04-26 13:12:46 +02:00
# preparing bashcomp
mkdir bashcomp
sed \
-e "1,2d" \
-e "5,11d" \
drush.complete.sh > bashcomp/drush
2012-04-26 13:12:46 +02:00
# cleanup
rm drush.bat includes/.gitignore
2012-02-24 10:13:55 +01:00
}
2011-08-29 16:02:40 +02:00
src_install() {
local docs="README.txt docs"
2012-02-24 10:13:55 +01:00
use examples && docs="${docs} examples"
2011-08-29 16:02:40 +02:00
insinto /usr/share/drush
2012-04-26 13:12:46 +02:00
doins -r drush.php drush.info includes commands lib LICENSE.txt
2011-08-29 16:02:40 +02:00
exeinto /usr/share/drush
doexe drush
dosym /usr/share/drush/drush /usr/bin/drush
dodoc -r ${docs}
2012-02-28 12:13:32 +01:00
keepdir /etc/drush
2012-04-26 13:12:46 +02:00
insinto /usr/share/bash-completion
doins bashcomp/drush
2011-08-29 16:02:40 +02:00
}