Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-devhelp
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-devhelp@g.o
From: Mike Frysinger <vapier@g.o>
Subject: Re: [gentoo-dev] My first ebuild: app-cdr/furiusisomount-
Date: Sun, 25 Sep 2011 15:22:02 -0400
[ bcc gentoo-dev, to gentoo-devhelp]

On Sat, Sep 24, 2011 at 05:59, Moritz Schlarb <mail@...> wrote:
> Hello developers!
> I wrote my first ebuild and I would like to ask for some feedback on it.

we use the gentoo-devhelp list for this stuff

> Because the application neither has a makefile nor is using distribute
> since it's python, I have to install all files by hand, or have I?

use the distutils eclass ?  see if it has a or something like that.

> DESCRIPTION="Simple Gtk+ Interface to Mount ISO, IMG, BIN, MDF and NRG Image files without burning to disk."

the description is generally a sentence fragment, so drop the period at the end

> #

don't leave uncomment URLs in there

> KEYWORDS="~x86"

generally we default to ~amd64 ~x86.  especially since you said this
is python code and not compiled.

> src_prepare() {
> 	mv ${PN}_${PV} ${P}

mucking with source tree layout is generally a src_unpack operation

>	sed -i -e "s/\"\(src\/\)\"/\/usr\/share\/${PN}\/\1/" ${P}/furiusisomount || die "sed failed"

use ":" as your separator and you wan't have to escape all of the
forward slashes.

when dealing with long lines, it's customary to wrap it like so:
    sed -i \
        <-e option> \
        <-e option> \
        path/to/file || die

also, there's no need to add a message to `die` here since the PM is
smart enough to show you the snippet of code that failed as well as
the line number

> src_install() {

i think once you convert to distutils, much of this will go away.
i'll respond just to give you an idea of how to do things in general.

>	dodir /usr/share/${PN}/
>	dodir /usr/share/${PN}/src
>	insinto /usr/share/${PN}/src

there's no need for these dodir's as the doins and such helpers will
automatically create the required directories

>	for i in $(find src -name '*.py' ) ; do

when you use variables, you need to do "local i" so you don't
clobber/export them unintentionally

i imagine the `find` could be replaced with: src/*.py

>		doins $i

need to use "|| die" when using `doins`

Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
How to install MIME types?
Next by thread:
ebuild for gcc SVN-trunk fails since 2 weeks, why?
Previous by date:
Re: How to install MIME types?
Next by date:
ebuild for gcc SVN-trunk fails since 2 weeks, why?

Updated Jun 03, 2012

Summary: Archive of the gentoo-devhelp mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.