Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405539 - app-admin/drush-4.5 - Wrong path for examples / version bump
Summary: app-admin/drush-4.5 - Wrong path for examples / version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lance Albertson (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2012-02-24 09:44 UTC by Micha Glave
Modified: 2012-05-13 08:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
drush-4.5.ebuild (drush-4.5.ebuild,1.01 KB, text/plain)
2012-02-24 09:45 UTC, Micha Glave
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Micha Glave 2012-02-24 09:44:40 UTC
I have fixed two an issues with hard-coded path in drush-4.5

Reproducible: Always
Comment 1 Micha Glave 2012-02-24 09:45:49 UTC
Created attachment 303037 [details]
drush-4.5.ebuild
Comment 2 Micha Glave 2012-02-24 09:47:38 UTC
Comment on attachment 303037 [details]
drush-4.5.ebuild

modified drush-4.5.ebuild 

src_prepare() added.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-24 15:54:42 UTC
Comment on attachment 303037 [details]
drush-4.5.ebuild

--- drush-4.4.ebuild    2011-05-27 00:22:01.000000000 +0200
+++ -   2012-02-24 16:54:26.748734411 +0100
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/drush/drush-4.4.ebuild,v 1.1 2011/05/26 22:22:01 ramereth Exp $
+# $Header: $
 
 EAPI="4"
 
@@ -17,9 +17,16 @@
 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
+}
+
 src_install() {
        local docs="README.txt docs"
 
+       use examples && docs="${docs} examples"
+
        insinto /usr/share/drush
        doins -r .
        exeinto /usr/share/drush
@@ -27,9 +34,7 @@
        dosym /usr/share/drush/drush /usr/bin/drush
        dodoc -r ${docs}
        # cleanup
-       for i in ${docs} LICENSE.txt drush.bat examples includes/.gitignore ; do
+       for i in ${docs} LICENSE.txt drush.bat examples includes/.gitignore tests ; do
                rm -rf "${D}/usr/share/drush/${i}"
        done
-
-       use examples && cp -R examples "${D}"/usr/share/doc/"${PF}"
 }
Comment 4 Micha Glave 2012-02-28 11:12:28 UTC
Creating a host-wide config-dir `/etc/drush` for `drushrc.php` etc.
would help organizing.

-----


--- drush-4.4.ebuild    2012-02-24 16:54:26.748734411 +0100
+++ -   2012-02-28 12:14:26.748734411 +0100
@@ -37,4 +37,5 @@
        for i in ${docs} LICENSE.txt drush.bat examples includes/.gitignore tests ; do
                rm -rf "${D}/usr/share/drush/${i}"
        done
+       keepdir /etc/drush
Comment 5 Micha Glave 2012-04-26 13:04:35 UTC
drush-7.x-5.1 released. Now with bash-completion...

This ebuild works fine here. (Patched against upstream.) 

Hope someone helps that.

--- /var/portage/app-admin/drush/drush-4.5.ebuild 2012-03-09 06:03:41.000000000 +0100
+++ drush-5.1.ebuild    2012-04-26 14:50:20.352153144 +0200
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/drush/drush-4.5.ebuild,v 1.1 2012/03/09 05:03:41 ramereth Exp $
+# $Header: $
 
 EAPI="4"
 
@@ -11,25 +11,45 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="examples"
+IUSE="+examples"
 
-DEPEND="dev-lang/php[cli,simplexml] dev-php/pear"
+DEPEND="dev-lang/php[cli,simplexml]
+               dev-php/pear
+               dev-php/PEAR-Console_Getopt
+               dev-php/PEAR-Console_Table"
 RDEPEND="${DEPEND}"
 S="${WORKDIR}/${PN}"
 
+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
+
+       # preparing bashcomp 
+       mkdir bashcomp
+       sed \
+               -e "1,2d" \
+               -e "5,11d" \
+               drush.complete.sh > bashcomp/drush
+
+       # cleanup
+       rm drush.bat includes/.gitignore 
+}
+
 src_install() {
        local docs="README.txt docs"
 
+       use examples && docs="${docs} examples"
+
        insinto /usr/share/drush
-       doins -r .
+       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}
-       # cleanup
-       for i in ${docs} LICENSE.txt drush.bat examples includes/.gitignore ; do
-               rm -rf "${D}/usr/share/drush/${i}"
-       done
-
-       use examples && cp -R examples "${D}"/usr/share/doc/"${PF}"
+       keepdir /etc/drush
+       insinto /usr/share/bash-completion
+       doins bashcomp/drush  
 }
Comment 6 Lance Albertson (RETIRED) gentoo-dev 2012-05-13 08:02:57 UTC
Thanks for the patches and finding these issues. Sorry I didn't catch it originally. I just pushed all those fixes to portage and also bumped drush-5.1.

Cheers-