Wrote my First Ebuild

And it’s not that good. It works but something is wonky about it. I got lucky and picked out a program that’s small, I got unlucky that the program is a python script and I had to manually put in the pieces by hand. I like the process though. I started the night knowing absolutely nothing about ebuilds and end the night with a whole lot learned (thanks for the help nichoj). I love the directory and structure of programming – so direct. If you know what you’re doing you can do alot with a litte bit of code. I just discovered there is another one in bugzilla… crap (one that doesn’t have any bugs in it). Hmm, just looked a few days ago… So it goes. I did do some things better like using a creating a symlink instead of manually creating a bash start script and using ${PN}. Anyways I’m still proud enough to show it off: :)

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

inherit eutils python

DESCRIPTION="Alarm Clock is a personal alarm clock applet for the Gnome panel."
HOMEPAGE="http://alarm-clock.54.pl/"
SRC_URI="http://dp0154.debowypark.waw.pl/ac/downloads/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
LANGS="pl sr sr@latin"

DEPEND=""
RDEPEND=">=dev-python/pygtk-2
    dev-python/notify-python
    dev-python/gst-python"

src_compile() {
#   cd ${S}/po
#   for LANG in ${LANGS} ; do
#       msgfmt -cv -f -o pyalarm.mo ${LANG}.po
#       cp pyalarm.mo /usr/share/locale/${LANG}/LC_MESSAGES/
    echo "#!/bin/bash" > alarm-clock
    echo "cd /usr/share/alarm-clock" >> alarm-clock
    echo "python alarm-clock.py" >> alarm-clock
}

src_install() {
    insinto /usr/share/${PN}
    doins -r gfx sound
    doins alarm-clock.py main.glade pyalarm.py

    insinto /usr/share/applications/
    doins alarm-clock.desktop

    insinto /usr/share/pixmaps
    doins gfx/alarm-clock.svg

    exeinto /usr/bin
    doexe alarm-clock
}

Update:It was nagging so updated the ebuild and it works now.

About these ads

About Gen2ly

<3's linux

Posted on 2008-03-13, in Gentoo, Linux. Bookmark the permalink. 2 Comments.

  1. Which wordpress plugin are you using for such a fancy syntax highlighting?

  2. Unfortunately i use commercial wordpress so I don’t have a choice on highlighting syntax. Its pretty hackish but I use vim’s built-in TOhtml and it’s soso colorscheme which works pretty good.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 52 other followers

%d bloggers like this: