Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
giskismet
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
BrummBrumm
n00b
n00b


Joined: 04 Jan 2008
Posts: 58

PostPosted: Fri Feb 25, 2011 2:05 pm    Post subject: giskismet Reply with quote

hello.

I wanted to install 'giskismet' ( see http://my-trac.assembla.com/giskismet/ ) but found nothing about it in portage, so i wrote this ebuild based on /usr/portage/net-irc/irssi-svn/irssi-svn-0.3.ebuild as it gets its sources from svn too.


Code:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-irc/irssi-svn/irssi-svn-0.3.ebuild,v 1.22 2008/11/10 18:59:46 swegener Exp $

inherit subversion
ESVN_REPO_URI="https://my-svn.assembla.com/svn/giskismet/trunk"
ESVN_STORE_DIR="${DISTDIR}/svn-src"
ESVN_PROJECT="${PN}"
ESVN_BOOTSTRAP="make clean; perl ./Makefile.PL"

DESCRIPTION="Visualize gps-information produced by kismet."
HOMEPAGE="http://my-trac.assembla.com/giskismet/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~x86-fbsd"
IUSE=""

RDEPEND="dev-perl/XML-LibXML
         dev-perl/DBI
         dev-perl/DBD-SQLite"

DEPEND="${RDEPEND}"

RDEPEND="${RDEPEND}"

src_compile() {
        emake || die "emake failed"
}

src_install() {
        make \
                DESTDIR="${D}" \
                docdir=/usr/share/doc/${PF} \
                install || die "make install failed"

                dodoc README.txt INSTALL.txt CHANGELOG.txt COPYING.txt || die "dodoc failed"
}

It works - at least for me. However, as this is the first ebuild i wrote, i do not know if there is anything wrong with it, how to categorize/name it correctly (i saved it to /usr/local/portage/sci-geosciences/giskismet/giskismet-0.02.ebuild) and how to share it correctly. I left the comments in the header unchanged. Can anybody please give me some advise on how to do all this correctly?

Thanks.
Back to top
View user's profile Send private message
titanofold
Developer
Developer


Joined: 30 Dec 2003
Posts: 235
Location: Bryson City, NC USA

PostPosted: Fri Feb 25, 2011 2:45 pm    Post subject: Reply with quote

Unless I'm mistaken, you shouldn't DEPEND on an RDEPEND if it is only necessary to to run the package, but not necessary to build it. And you have RDEPEND listed twice.

src_install() should use 'emake' rather than just make.

Have you tested the ebuild on all of those arches? If not, KEYWORDS should only contain the arches you've tested the ebuild and package on.
_________________
The best things in life are free.
Guy-1: Surely, you will fold with me...
Guy-2: Alright, but don't call me Shirley
Back to top
View user's profile Send private message
BrummBrumm
n00b
n00b


Joined: 04 Jan 2008
Posts: 58

PostPosted: Fri Feb 25, 2011 3:15 pm    Post subject: Reply with quote

hi.

Thanks! :)

as I said.. i dont know much about building ebuilds...
i have not tested it on all that platforms. just on my x86-box... i thought it means 'unstable or untested on these platforms' ..
shouldn't have omited that part in the ebuild-manpage :) sorry

I dont know if i got this right:
RDEPEND should be a list of dependencies for runtime while DEPEND is a list of dependencies for compilation/installation?
giskismet is a perl-script and the installation-hints on their website say

Quote:

GISKismet is written in Perl and requires the following Perl modules:

* XML::LibXML
* DBI
* DBD::SQLite


the Makefile.PL which is to be run before 'make' checks for these dependencies too as far as i understand that script, so it should be a DEPEND-dependencie as well.

Code:

$cat Makefile.PL
use ExtUtils::MakeMaker;

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

WriteMakefile(
    'NAME'        => 'giskismet',
    'AUTHOR'      => 'Joshua D. Abraham',
    'VERSION'     => '0.02',
    'EXE_FILES'   => [ 'giskismet' ],
    'INSTALLDIRS' => 'site',
    'MAN1PODS'    => {
        'giskismet.man.1'   => 'blib/man1/giskismet.1p',
    },
    'PREREQ_PM' => {
        'XML::LibXML'  => '1.01',
        'DBI'           => '1.50',
        'DBD::SQLite'   => '1.11',
    },
    'dist' => {
        'SUFFIX'       => ".gz",
        'DIST_DEFAULT' => 'all tardist',
        'COMPRESS'     => "gzip -9f"
    },
    'realclean' => { 'FILES' => '' },
    'clean'     => { 'FILES' => '' },
);

if i don't got this right, please give me further advises... i'm new to this

Thanks
Back to top
View user's profile Send private message
titanofold
Developer
Developer


Joined: 30 Dec 2003
Posts: 235
Location: Bryson City, NC USA

PostPosted: Fri Feb 25, 2011 3:30 pm    Post subject: Reply with quote

Didn't mean to freak you out. Yeah, you've got it right in that case. Those modules are required at build time. (I'm not familiar with the package, so good on you for knowing.)

The developer manual goes into detail about what is and is not allowed in an ebuild. The ebuild man page is correct in its statement, but it doesn't cover the nuances.

You can add keywords to the ebuild by asking someone who does have that arch available to them to test the ebuild. The arch teams are usually willing to help out, so that'd be a good starting point there.
_________________
The best things in life are free.
Guy-1: Surely, you will fold with me...
Guy-2: Alright, but don't call me Shirley
Back to top
View user's profile Send private message
BrummBrumm
n00b
n00b


Joined: 04 Jan 2008
Posts: 58

PostPosted: Fri Feb 25, 2011 4:16 pm    Post subject: Reply with quote

You haven't freaked me out :)
I'm just uncertain about all that stuff because it's the first time I play around with ebuilds... not counting some overlays...

With 'developer manual' you mean what is to be found at http://devmanual.gentoo.org/ ?
They say the header has to be just the content of header.txt from ${PORTDIR}.. i changed this. I'm no developer btw :)

By 'arch teams' you mean those listed at http://www.gentoo.org/proj/en/base/ ?
I have corrected the ebuild according to your suggestions, but am still uncertain if there is something I have to consider due to the fact that I used other peoples ebuild to build this? I know its not that big... but I dont want somebody to get angy :)

I am currently working on my diploma thesis so I don't have the time to get that deep into this topic... I will read that developer-manual when I'm done and correct everything else :)

Code:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit subversion
ESVN_REPO_URI="https://my-svn.assembla.com/svn/giskismet/trunk"
ESVN_STORE_DIR="${DISTDIR}/svn-src"
ESVN_PROJECT="${PN}"
ESVN_BOOTSTRAP="make clean; perl ./Makefile.PL"

DESCRIPTION="Visualize gps-information produced by kismet."
HOMEPAGE="http://my-trac.assembla.com/giskismet/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

RDEPEND="dev-perl/XML-LibXML
         dev-perl/DBI
         dev-perl/DBD-SQLite"

DEPEND="${RDEPEND}"

src_compile() {
        emake || die "emake failed"
}

src_install() {
        emake \
                DESTDIR="${D}" \
                docdir=/usr/share/doc/${PF} \
                install || die "make install failed"

                dodoc README.txt INSTALL.txt CHANGELOG.txt COPYING.txt || die "dodoc failed"
}



Thanks for your help so far :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum