Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can someone help me making an ebuild
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
ptitoine
n00b
n00b


Joined: 13 May 2003
Posts: 54
Location: Nantes, France

PostPosted: Tue Jan 03, 2006 8:21 pm    Post subject: can someone help me making an ebuild Reply with quote

hello,

I'm making an ebuild for a program called checkgmail, it's a gmail notifier written whit perl.
But i don't know whre to unpack the source ?

if someone has an idea

the source http://checkgmail.sourceforge.net/#download

thanks
_________________
IBM T40p Gentooed :-)
Back to top
View user's profile Send private message
robbyjo
Guru
Guru


Joined: 06 Apr 2003
Posts: 462

PostPosted: Tue Jan 03, 2006 8:30 pm    Post subject: Reply with quote

The easiest one is to copy and paste an existing ebuild file, simple enough for your needs. For Perl ebuilds, you probably want to look at one of the ebuilds at /usr/portage/dev-perl/ directories. Copy and modify as needed.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jan 03, 2006 9:08 pm    Post subject: Reply with quote

Issue ebuild file.ebuild unpack, and the source is unpacked into /var/tmp/portage/app-ver/

Look in /usr/portage/ for perl ebuilds, for methods.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
ptitoine
n00b
n00b


Joined: 13 May 2003
Posts: 54
Location: Nantes, France

PostPosted: Tue Jan 03, 2006 10:52 pm    Post subject: Reply with quote

ok, but where should I put the checkgmail perl script after unpacking ?

in /usr/bin or /bin or ... ?
can I remove the other files that are in the tarball ? (only txt files Changelog, Copying, Readme and todo) ?

thanks
_________________
IBM T40p Gentooed :-)
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jan 03, 2006 11:05 pm    Post subject: Reply with quote

I'm not familiar with installing Perl scripts. But, I repeat, look at the thousands of ebuilds in /usr/portage for inspiration.

There's a learning curve involved here, of reading through the documentation and looking at the existing ebuilds. The reward is to be able to create ebuilds 8)

So, do some reading, and then ask away :wink:

Hints: Get used to the idea of the sandbox - ${D} (where D means "destination", I think).

If you get stuck, post what you've created so far, and ask for help, rather than giving up - creating and testing an ebuild through its potentially-multiple USE flags can be tiresome, but there could well be someone else out there who is willing to pick up the baton.
Back to top
View user's profile Send private message
ptitoine
n00b
n00b


Joined: 13 May 2003
Posts: 54
Location: Nantes, France

PostPosted: Wed Jan 04, 2006 12:01 pm    Post subject: Reply with quote

Hi all

I've done the two needed ebuilds

Code:
dev-perl/Crypt-Simple-0.06

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

inherit perl-module

DESCRIPTION="Crypt::Simple module for perl"
HOMEPAGE="http://search.cpan.org/~kasei/${P}"
SRC_URI="http://search.cpan.org/CPAN/authors/id/K/KA/KASEI/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND="virtual/libc
        >=dev-lang/perl-5
        >=dev-perl/Crypt-Blowfish-2.09-r3
        >=dev-perl/FreezeThaw-0.43-r1
        "

export OPTIMIZE="${CFLAGS}"


this ebuild seem to be ok there I've no problem with it

Code:
mail-client/checkgmail-1.4

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

#inherit gnome2 eutils

#IUSE="doc ssl gtkhtml pcre ldap crypt kerberos threads sqlite"
DESCRIPTION="Gmail notifier for GNOME"
SRC_URI="http://ovh.dl.sourceforge.net/sourceforge/checkgmail/${P}.tar.bz2"
HOMEPAGE="http://checkgmail.sourceforge.net/"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86"

IUSE="savepwd"

RDEPEND=">=dev-perl/gtk2-perl-1.1
        >=dev-perl/gtk2-trayicon-0.03
        >=dev-perl/libwww-perl-5.800
        >=dev-perl/Crypt-SSLeay-0.49
        >=dev-perl/XML-Simple-2.12
        >=x11-libs/gtk+-2.6
        savepwd? ( >=dev-perl/Crypt-Simple-0.06 )
"

DEPEND="${RDEPEND}"

src_unpack(){
        unpack ${A}
        cd ${S}
        cp checkgmail /usr/bin/checkgmail

        einfo "checkgmail has been installed in /usr/bin ;)"
}

DOCS="COPYING ChangeLog README TODO"


Iv'e problem with this one, if you remove the program, the script (/usr/bin/checkgmail) is still on the system ;)

If someone can help :?:
_________________
IBM T40p Gentooed :-)
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Jan 04, 2006 5:07 pm    Post subject: Reply with quote

You should not be altering the live system in src_unpack. Instead, have:
Code:
src_install() {
   dobin checkgmail || die
}
Back to top
View user's profile Send private message
ptitoine
n00b
n00b


Joined: 13 May 2003
Posts: 54
Location: Nantes, France

PostPosted: Wed Jan 04, 2006 8:14 pm    Post subject: Reply with quote

ok corrected ebuild

Code:
mail-client/checkgmail-1.4

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

#inherit gnome2 eutils

#IUSE="doc ssl gtkhtml pcre ldap crypt kerberos threads sqlite"
DESCRIPTION="Gmail notifier for GNOME"
SRC_URI="http://ovh.dl.sourceforge.net/sourceforge/checkgmail/${P}.tar.bz2"
HOMEPAGE="http://checkgmail.sourceforge.net/"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86"

IUSE="savepwd"

RDEPEND=">=dev-perl/gtk2-perl-1.1
        >=dev-perl/gtk2-trayicon-0.03
        >=dev-perl/libwww-perl-5.800
        >=dev-perl/Crypt-SSLeay-0.49
        >=dev-perl/XML-Simple-2.12
        >=x11-libs/gtk+-2.6
        savepwd? ( >=dev-perl/Crypt-Simple-0.06 )
"

DEPEND="${RDEPEND}"

src_unpack(){
        unpack ${A}
        cd ${S}
}

src_install(){
        DESTTREE="/usr"
        dobin checkgmail || die
        einfo einfo "checkgmail has been installed in /usr/bin ;)"
}

DOCS="COPYING ChangeLog README TODO"


thanks
_________________
IBM T40p Gentooed :-)
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Jan 04, 2006 8:27 pm    Post subject: Reply with quote

Tidied: :)

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

DESCRIPTION="Gmail notifier for GNOME"
HOMEPAGE="http://checkgmail.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

IUSE="savepwd"

DEPEND=">=dev-perl/gtk2-perl-1.1
        >=dev-perl/gtk2-trayicon-0.03
        >=dev-perl/libwww-perl-5.800
        >=dev-perl/Crypt-SSLeay-0.49
        >=dev-perl/XML-Simple-2.12
        >=x11-libs/gtk+-2.6
        savepwd? ( >=dev-perl/Crypt-Simple-0.06 )"

src_install() {
        dobin checkgmail || die "dobin failed"
        dodoc COPYING ChangeLog README TODO
}
Back to top
View user's profile Send private message
ptitoine
n00b
n00b


Joined: 13 May 2003
Posts: 54
Location: Nantes, France

PostPosted: Wed Jan 04, 2006 9:21 pm    Post subject: Reply with quote

Thanks paul !
If you want to submit them to portage, do it !
_________________
IBM T40p Gentooed :-)
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Jan 04, 2006 9:30 pm    Post subject: Reply with quote

You submit it :wink: . I don't have gmail, so the package isn't relevant to me.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Jan 05, 2006 10:40 pm    Post subject: Reply with quote

The latest ebuilds are on bugzilla.
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