PDA

View Full Version : HOWTO: Distro specific install of screenlets


kwaanens
February 2nd, 2008, 03:18 PM
NOTE: This guide is similar to the one at http://screenlets.org/index.php/FAQ This one is only edited by kwaanens, the wiki is open to anyone. Keep that in mind, and check the last posts of this thread, to see if anything has changed, and this post hasn't been updated. The wiki might or might not be more up to date, but ideally they will be the same. If there is anything wrong here send me a PM, e-mail me at ketil.w.aanensen@gmail.com (yeah, I trust gmails spam filter that much :) ) or add to this thread. If there's anything wrong on the wiki, please edit it.

By now, most of you probably know about Aantn's branch. This is where development is going on right now. Some-guy keeps a repo for most distros. It's at:

deb http://download.opensuse.org/repositories/home:/some-guy:/screenlets/DISTRO_HERE ./

Distro names are:
Debian_Etch
Fedora_9
Mandriva_2008
openSUSE_10.2
openSUSE_10.3
openSUSE_11.0
openSUSE_Factory
xUbuntu_7.04
xUbuntu_7.10
xUbuntu_8.04

Ketilwaa/Kwaanens is keeping an Ubuntu repo whenever there are reasons for not updating the main repo, i.e. during times of heavy development that will cause breakage. It's at:
deb http://ppa.launchpad.net/ketilwaa/ubuntu hardy main

################################################## #########
# #
# Much of the following is old stuff. Some of it still applies. Will be corrected in due time #
# #
################################################## #########


CONTENTS: All major headlines are in red.
1. What's happening?
2. Ubuntu installation
2a. Removing the old cruft
2b. Just get the newest package
2c. Using the package manager (GUI style)
2d. Using the package manager (console style)
3. OpenSUSE installation
3a. Using the package manager (console style)
3b. Using the package manager (GUI style)
4. OpenSUSE: Removing/uninstalling
5. Fedora installation (not here yet)
6. Gentoo installation
7. Where are the individual screenlets?
8. What's in ~/.config/screenlets?
9. Running the screenlets

1: WHAT'S HAPPENING?
Whise has taken it upon himself to make contributions to screenlets. Up until today (02.02.2008) he has had a separate branch. He have tried contacting RYX for a while, to talk about how to handle these changes to the code. RYX is apparently MIA, so there is now a consensus to merge to trunk. So, Screenlets' trunk is now being updated by Whise.
(RYX is free to check out trunk from whenever he feels like, so this process should not be seen as a takeover, but as progressing.)

----------------------------------------------------------------------------------------

2: UBUNTU INSTALLATION

NOTE:
1. Do NOT, NOT, NOT use any other packages from this repo, or you're in for surprises!
2. PPA repositories does not use GPG keys by design, so don't bother asking!
3. ALWAYS use 3rd party repos with caution

Anyway: Gilir has made an Ubuntu repo. There are three ways (at least) to set this up on your computer:
- Console mode
- GUI mode
- Just get the package.

Gilir's repo is at
deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe
or
deb http://ppa.launchpad.net/gilir/ubuntu hardy main universe

Ketilwaa/Kwaanens (that would be me) have Aantn's branch (Universal-applets) in my PPA. It's at:
deb http://ppa.launchpad.net/ketilwaa/ubuntu hardy main
If you want that, use it in place of "deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe" below.

----------------------------------------------------------------------------------------

2a: FIRST REMOVING THE OLD CRUFT:

There are two ways you could have used previous versions:
Either by using your package manager, or by using bzr to get the latest from trunk or whise's revisions in Screenlets-new.

If you used the package manager:
GUI mode:
1. In Synaptic: Search for "screenlets"
2. If an old version is installed (if it has a green square with a yellow arrow into it), right-click it, choose "Completely remove".
3. Click "Apply"

Console mode:
Run the following:
sudo apt-get remove --purge screenlets

If you used bzr, do the following in a console:

cd Screenlets-new
sudo make uninstall
sudo rm -rf /usr/lib/python2.5/site-packages/screenlets*


NOTE: the first command in this last code box may be a different one, if you renamed the directory, etc.

----------------------------------------------------------------------------------------

2b: JUST GET THE NEWEST PACKAGE:
First, make you removed previous packages. (Scroll down a bit)
1. Go to: http://ppa.launchpad.net/gilir/ubuntu/pool/main/s/screenlets/
2. Download the package that applies to your system.
3. Double click the file you just downloaded.
> Done.

You will NOT be notified of updates through you package manager if you do this.

----------------------------------------------------------------------------------------

2c: USING THE PACKAGE MANAGER: GUI STYLE:
1. Open Synaptic.
2. Go to: Settings > Repositories > Tab: 3rd party.
3. Click "Add".
4. Add the following:
deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe
5. Click OK, close, etc. until only the main Synaptic window is open. Click "Update" (Far left button)

6. In Synaptic: Search for "screenlets"
7. Mark it for installation
8. "Apply"

You will be notified by the update manager whenever there's an update to the installed package.

----------------------------------------------------------------------------------------

2d: USING THE PACKAGE MANAGER: CONSOLE STYLE:

echo "deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe #Gilir's screenlets packages and some stuff you shouldn't use" | sudo tee -a /etc/apt/sources.list
[your passord]
sudo apt-get update
sudo apt-get install screenlets

You will be notified by the update manager whenever there's an update to the installed package.

----------------------------------------------------------------------------------------

3: OPENSUSE INSTALLATION

Make sure you completely remove old versions, and their system wide settings before installing. See Ubuntu instructions for hints on how to do this

Here are packages: http://packman.links2linux.de/package/screenlets
There is a thread about the packages here: http://forum.compiz-fusion.org/showthread.php?t=6831

3a: USING THE PACKAGE MANAGER: CONSOLE STYLE:

After putting in the repo, run the following:

zypper refresh
zypper install screenlets

3b: USING THE PACKAGE MANAGER: GUI STYLE:

Again, after putting in the repo:
Use Yast

----------------------------------------------------------------------------------------

4: OPENSUSE: REMOVING/UNINSTALLING

If you used zypper or yast

zypper remove screenlets

If you used the tar.gz package

cd Screenlets-new
su
make uninstall
rm -rf /usr/lib(64)/python2.5/site-packages/screenlets*

rm -rf ~/.screenlets
su -c "rm -rf /usr/share/screenlets"

----------------------------------------------------------------------------------------

5: FEDORA INSTALLATION

Make sure you completely remove old versions, and their system wide settings before installing. See Ubuntu instructions for hints on how to do this

TODO: Someone give me instructions please.

----------------------------------------------------------------------------------------

6: GENTOO INSTALLATION

Create Overlay

Create some directorys:
cd /usr/portage/local
mkdir -p myoverlay/{eclass,x11-plugins/screenlets}

Append the directory to the make.file:
PORTDIR_OVERLAY="/usr/portage/local/myoverlay $PORTDIR_OVERLAY"

Before we can start we need the bzr eclass to handle bzr branches (myoverlay/eclass/bzr.eclass):
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Originally derived from the git eclass
#
# Just set EBZR_REPO_URI to the url of the branch and the src_unpack this
# eclass provides will put an export of the branch in ${WORKDIR}/${PN}.

inherit eutils

EBZR="bzr.eclass"

EXPORT_FUNCTIONS src_unpack

HOMEPAGE="http://bazaar-vcs.org/"
DESCRIPTION="Based on the ${GIT} eclass"

## -- add bzr in DEPEND
#
DEPEND="dev-util/bzr"


## -- EBZR_STORE_DIR: bzr sources store directory
#
EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src"


## -- EBZR_FETCH_CMD: bzr fetch command
#
EBZR_FETCH_CMD="bzr checkout"

## -- EBZR_UPDATE_CMD: bzr update command
#
EBZR_UPDATE_CMD="bzr update"

## -- EBZR_DIFFSTAT_CMD: Command to get diffstat output
#
EBZR_DIFFSTAT_CMD="bzr diff"

## -- EBZR_EXPORT_CMD: Command to export branch
#
EBZR_EXPORT_CMD="bzr export"

## -- EBZR_REVNO_CMD: Command to list revision number of branch
#
EBZR_REVNO_CMD="bzr revno"

## -- EBZR_OPTIONS:
#
# the options passed to branch and merge
#
: ${EBZR_OPTIONS:=}


## -- EBZR_REPO_URI: repository uri
#
# e.g. http://foo, sftp://bar
#
# supported protocols:
# http://
# https://
# sftp://
# rsync://
#
: ${EBZR_REPO_URI:=}


## -- EBZR_BOOTSTRAP:
#
# bootstrap script or command like autogen.sh or etc..
#
: ${EBZR_BOOTSTRAP:=}


## -- EBZR_PATCHES:
#
# bzr eclass can apply patches in git_bootstrap().
# you can use regexp in this valiable like *.diff or *.patch or etc.
# NOTE: this patches will apply before eval EGIT_BOOTSTRAP.
#
# the process of applying the patch is:
# 1. just epatch it, if the patch exists in the path.
# 2. scan it under FILESDIR and epatch it, if the patch exists in FILESDIR.
# 3. die.
#
: ${EBZR_PATCHES:=}


## -- EBZR_BRANCH:
#
# bzr eclass can fetch any branch in bzr_fetch().
# Defaults to 'trunk'
#
: ${EBZR_BRANCH:=trunk}


## -- EBZR_REVISION:
#
# Revision to get, if not latest (see http://bazaar-vcs.org/BzrRevisionSpec)
#
: ${EBZR_REVISION:=}


## -- EBZR_CACHE_DIR:
#
# The location in which to cache the version, relative to EBZR_STORE_DIR.
#
: ${EBZR_CACHE_DIR:=${PN}}


## -- bzr_fetch() ------------------------------------------------- #

bzr_fetch() {

local EBZR_BRANCH_DIR

# EBZR_REPO_URI is empty.
[[ -z ${EBZR_REPO_URI} ]] && die "${EBZR}: EBZR_REPO_URI is empty."

# check for the protocol or pull from a local repo.
if [[ -z ${EBZR_REPO_URI%%:*} ]] ; then
case ${EBZR_REPO_URI%%:*} in
http|https|rsync|sftp)
;;
*)
die "${EBZR}: fetch from ${EBZR_REPO_URI%:*} is not yet implemented."
;;
esac
fi

if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
debug-print "${FUNCNAME}: initial branch. creating bzr directory"
addwrite /
mkdir -p "${EBZR_STORE_DIR}" \
|| die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}."
chmod -f o+rw "${EBZR_STORE_DIR}" \
|| die "${EBZR}: can't chmod ${EBZR_STORE_DIR}."
export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}"
fi



cd -P "${EBZR_STORE_DIR}" || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"

# every time
addwrite "${EBZR_STORE_DIR}"

EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}"

addwrite "${EBZR_BRANCH_DIR}"

debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}"

if [[ ! -d ${EBZR_BRANCH_DIR} || ${EBZR_REVISION} ]] ; then
# fetch branch
einfo "bzr branch start -->"
einfo " repository: ${EBZR_REPO_URI}${EBZR_BRANCH}"

${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${EBZR_REPO_URI}${EBZR_BRANCH}" ${EBZR_BRANCH_DIR} \
|| die "${EBZR}: can't branch from ${EBZR_REPO_URI}${EBZR_BRANCH}."

else
# update branch
einfo "bzr merge start -->"
einfo " repository: ${EBZR_REPO_URI}${EBZR_BRANCH}"

cd "${EBZR_BRANCH_DIR}"
${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \
|| die "${EBZR}: can't merge from ${EBZR_REPO_URI}${EBZR_BRANCH}."
${EBZR_DIFFSTAT_CMD}
fi

cd "${EBZR_BRANCH_DIR}"

einfo "exporting..."
${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} "${WORKDIR}/${P}" \
|| die "${EBZR}: export failed"

einfo "Revision ${EBZR_REVNO_COMMAND} is now in ${WORKDIR}/${P}"

cd "${WORKDIR}"
}


## -- bzr_bootstrap() ------------------------------------------------ #

bzr_bootstrap() {

local patch lpatch

cd "${S}"

if [[ -n ${EBZR_PATCHES} ]] ; then
einfo "apply patches -->"

for patch in ${EBZR_PATCHES} ; do
if [[ -f ${patch} ]] ; then
epatch ${patch}
else
for lpatch in "${FILESDIR}"/${patch} ; do
if [[ -f ${lpatch} ]] ; then
epatch ${lpatch}
else
die "${EBZR}: ${patch} is not found"
fi
done
fi
done
echo
fi

if [[ -n ${EBZR_BOOTSTRAP} ]] ; then
einfo "begin bootstrap -->"

if [[ -f ${EBZR_BOOTSTRAP} ]] && [[ -x ${EBZR_BOOTSTRAP} ]] ; then
einfo " bootstrap with a file: ${EBZR_BOOTSTRAP}"
eval "./${EBZR_BOOTSTRAP}" \
|| die "${EBZR}: can't execute EBZR_BOOTSTRAP."
else
einfo " bootstrap with commands: ${EBZR_BOOTSTRAP}"
eval "${EBZR_BOOTSTRAP}" \
|| die "${EBZR}: can't eval EBZR_BOOTSTRAP."
fi
fi

}


## -- bzr_src_unpack() ------------------------------------------------ #

bzr_src_unpack() {

bzr_fetch || die "${EBZR}: unknown problem in bzr_fetch()."
bzr_bootstrap || die "${EBZR}: unknown problem in bzr_bootstrap()."

}

After that we can add the overlay (myoverlay/x11-plugins/screenlets/screenlets-9999.ebuild):
Code:

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

inherit gnome2 bzr autotools eutils distutils

EBZR_REPO_URI="http://bazaar.launchpad.net/~screenlets-dev/screenlets/"

DESCRIPTION="Screenlets are small owner-drawn applications"
HOMEPAGE="http://www.screenlets.org"
SRC_URI=""

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
dev-python/dbus-python
>=dev-python/gnome-python-desktop-2.16.0
dev-python/pyxdg
x11-libs/libnotify
x11-misc/notification-daemon
x11-misc/xdg-utils"

RDEPEND="${DEPEND}"

src_unpack() {
bzr_src_unpack
}

src_install() {
distutils_src_install

insinto /usr/share/desktop-directories
doins "${S}"/desktop-menu/desktop-directories/Screenlets.directory

insinto /usr/share/icons
doins "${S}"/desktop-menu/screenlets.svg

# Insert .desktop files
for x in $(find "${S}"/desktop-menu -name "*.desktop"); do
domenu ${x}
done
}

Create the digest...
ebuild myoverlay/x11-plugins/screenlets/screenlets-9999.ebuild digest

last step:
echo "x11-plugins/screenlets **" >> /etc/portage/package.keywords

Now you can emerge screenlets:
emerge screenlets

----------------------------------------------------------------------------------------

7: WHERE ARE THE INDIVIDUAL SCREENLETS NOW?

The screenlets are in /usr/share/screenlets. 3rd party screenlets should be saved in ~/.screenlets (If that directory doesn't exist, create it)

----------------------------------------------------------------------------------------

8: WHAT'S IN ~/.config/screenlets?

That would be the settings for each individual screenlets, which can be changed manually (if you know what to do), or changed via each individual screenlet.

----------------------------------------------------------------------------------------

9: RUNNING THE SCREENLETS:

Start Screenlets-manager, either by
Console: $ screenlets-manager
ALT + F2: screenlets-manager
Or find it in the menu.

From Screenlets-manager you can start screenlets and add or remove them to/from your start up session.

----------------------------------------------------------------------------------------

TODO for this post:
- Ubuntu: How to set up Synaptic to use screenlets from this repo, and nothing else
- typos and other stuff.
- add other distro specific instructions

some-guy
February 2nd, 2008, 03:31 PM
I think you mean
sudo echo "deb ...
:D

kwaanens
February 2nd, 2008, 03:34 PM
You're so right my friend. I even fixed that mistake, and then redid it. Not my day, I guess... :) Anyway, it's of course fixed now.

some-guy
February 2nd, 2008, 03:54 PM
shouldn't it be
sudo echo "deb ...
and not
sudo "echo deb ...
:rolleyes:

kwaanens
February 2nd, 2008, 03:56 PM
Damned typos... What's wrong with me today..? Fixed and fixed again.

plun
February 2nd, 2008, 04:01 PM
Maybe important...:)

Earlier versions must be uninstalled

sudo apt-get remove --purge screenletsIf Screenlets-new is installed

cd screenlets-new

sudo make uninstall

sudo rm -rf /usr/lib/python2.5/site-packages/screenlets*

And then install new version

-------------------------------

For "the lazy"..... direct URL to the deb file

Just to download and let gdebi install

http://ppa.launchpad.net/gilir/ubuntu/pool/main/s/screenlets/

Have Fun...;)

whise
February 2nd, 2008, 04:11 PM
very nice faq ... thanks for your contribution
:)

kwaanens
February 2nd, 2008, 04:20 PM
@ Whise: Thanks
@ Plun: Done.

crdlb
February 2nd, 2008, 05:39 PM
Running echo with sudo doesn't actually accomplish anything.

sudo echo "deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe #Gilir's screenlets packages and some stuff you shouldn't use" >> /etc/apt/sources.list

should be

echo "deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe #Gilir's screenlets packages and some stuff you shouldn't use" | sudo tee -a /etc/apt/sources.list

kwaanens
February 2nd, 2008, 06:00 PM
Really? Did you try it?
I did, and I just did it again:

$ sudo echo "deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe #Gilir's screenlets packages and some stuff you shouldn't use" >> /etc/apt/sources.list

and it worked fine:

$ cat /etc/apt/sources.list
<snip some stuff>
deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe #Gilir's screenlets packages and some stuff you shouldn't use

By the way: I put this on the screenlets wiki too. With a link to this thread.

sweetthdevil
February 2nd, 2008, 06:03 PM
Many thanks, just change form bazaar to your repo and everything worked great, but the command "sudo echo" did not work, not a huge issue but though I let you know.

Thanks again!

kwaanens
February 2nd, 2008, 06:05 PM
Weird...
This was mentioned a couple of posts before, but it works fine here.

- Ketil

crdlb
February 2nd, 2008, 07:10 PM
the permissions must be incorrect on your /etc/apt/sources.list (only thing I can imagine that would allow that to work). See ls -l /etc/apt/sources.list

kwaanens
February 2nd, 2008, 07:12 PM
You're correct! I'll change the first post immediately.

EDIT: Fixed. I don't get why that wouldn't work. I mean, you're sending the result of the echo to file as super user. How can that not work. Oh, well, You live, you learn.

kwaanens
February 2nd, 2008, 07:16 PM
BTW: Anyway for you to sticky this thread, being a moderator and all?

plun
February 2nd, 2008, 07:55 PM
Well, bump...:p

Also this thread should be sticky

http://forum.compiz-fusion.org/showthread.php?t=6831

Open Suses packages.

:)

kwaanens
February 2nd, 2008, 09:03 PM
I sent a mail through the "Contact us" link at the bottom of this forum. Hopefully it helps, but I'm guessing it must be someone high ranking, because as I understand the moderator function they have moderating rights in specific parts of the forums. (i.e. RYX is moderating this part)

kwaanens
February 3rd, 2008, 01:15 PM
Thanks for stickying this and the other relevant thread!

kwaanens
February 4th, 2008, 01:59 PM
Updated the guide for other distros, so we don't have to sticky many of these. OpenSUSE instructions are lacking, need more info. Fedora needs everything. Either PM me, or message this thread.

- Ketil

sagara
February 5th, 2008, 02:41 AM
After installing screenlets using this guide, where are all the screenlets now installed?
How about the local config folder for all screenlets?

kwaanens
February 5th, 2008, 12:30 PM
The screenlets are in /usr/share/screenlets. 3rd party screenlets should be saved in ~/.screenlets (If that directory doesn't exist, create it)

I'll add that to the initial post later.

- Ketil

some-guy
February 5th, 2008, 03:37 PM
Add the removal of the screenlets, then in opensuse put
zypper refresh
zypper install screenlets (for console) or
install it with yast (for gui) :D


Having a step for adding the packman repo shouldn't be necessary because almost all suse user's add it :D

kwaanens
February 5th, 2008, 10:28 PM
Do you mean a section of how to remove Screenlets for each distro?

Is the OpenSUSE stuff otherwise OK now? (wait 30 secs after reading this, and it will be done. Edit: It's done by now obviously)

- Ketil

kwaanens
February 5th, 2008, 11:06 PM
I updated the screenlets.org faq too. Please feel free to help me out. (I don't have that much time on my hands)

Why contribute? You want development to Screenlets happen faster? Well, more users mean more testers and more developers and more feedback to developers. So: more users => progress

- Ketil

some-guy
February 5th, 2008, 11:37 PM
to remove screenlets, run
zypper remove screenlets
for packages or
cd Screenlets-new
su
make uninstall
rm -rf /usr/lib(64)/python2.5/site-packages/screenlets*
then
rm -rf ~/.screenlets
su -c "rm -rf /usr/share/screenlets"

:D
(for SuSE)

kwaanens
February 5th, 2008, 11:48 PM
Done. Someone please update the faq. I have no time to make all these updates x2. I'll probably keep Ubuntu up to date on the faq, because that's what I use.

Fedora instructions please?

Lunx
February 7th, 2008, 08:29 PM
Setup for Gentoo to use the bzr branch.

Create Overlay
Create some directorys:
cd /usr/portage/local
mkdir -p myoverlay/{eclass,x11-plugins/screenlets}
Append the directory to the make.file:
PORTDIR_OVERLAY="/usr/portage/local/myoverlay $PORTDIR_OVERLAY"
Before we can start we need the bzr eclass to handle bzr branches (myoverlay/eclass/bzr.eclass):
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Originally derived from the git eclass
#
# Just set EBZR_REPO_URI to the url of the branch and the src_unpack this
# eclass provides will put an export of the branch in ${WORKDIR}/${PN}.

inherit eutils

EBZR="bzr.eclass"

EXPORT_FUNCTIONS src_unpack

HOMEPAGE="http://bazaar-vcs.org/"
DESCRIPTION="Based on the ${GIT} eclass"

## -- add bzr in DEPEND
#
DEPEND="dev-util/bzr"


## -- EBZR_STORE_DIR: bzr sources store directory
#
EBZR_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/bzr-src"


## -- EBZR_FETCH_CMD: bzr fetch command
#
EBZR_FETCH_CMD="bzr checkout"

## -- EBZR_UPDATE_CMD: bzr update command
#
EBZR_UPDATE_CMD="bzr update"

## -- EBZR_DIFFSTAT_CMD: Command to get diffstat output
#
EBZR_DIFFSTAT_CMD="bzr diff"

## -- EBZR_EXPORT_CMD: Command to export branch
#
EBZR_EXPORT_CMD="bzr export"

## -- EBZR_REVNO_CMD: Command to list revision number of branch
#
EBZR_REVNO_CMD="bzr revno"

## -- EBZR_OPTIONS:
#
# the options passed to branch and merge
#
: ${EBZR_OPTIONS:=}


## -- EBZR_REPO_URI: repository uri
#
# e.g. http://foo, sftp://bar
#
# supported protocols:
# http://
# https://
# sftp://
# rsync://
#
: ${EBZR_REPO_URI:=}


## -- EBZR_BOOTSTRAP:
#
# bootstrap script or command like autogen.sh or etc..
#
: ${EBZR_BOOTSTRAP:=}


## -- EBZR_PATCHES:
#
# bzr eclass can apply patches in git_bootstrap().
# you can use regexp in this valiable like *.diff or *.patch or etc.
# NOTE: this patches will apply before eval EGIT_BOOTSTRAP.
#
# the process of applying the patch is:
# 1. just epatch it, if the patch exists in the path.
# 2. scan it under FILESDIR and epatch it, if the patch exists in FILESDIR.
# 3. die.
#
: ${EBZR_PATCHES:=}


## -- EBZR_BRANCH:
#
# bzr eclass can fetch any branch in bzr_fetch().
# Defaults to 'trunk'
#
: ${EBZR_BRANCH:=trunk}


## -- EBZR_REVISION:
#
# Revision to get, if not latest (see http://bazaar-vcs.org/BzrRevisionSpec)
#
: ${EBZR_REVISION:=}


## -- EBZR_CACHE_DIR:
#
# The location in which to cache the version, relative to EBZR_STORE_DIR.
#
: ${EBZR_CACHE_DIR:=${PN}}


## -- bzr_fetch() ------------------------------------------------- #

bzr_fetch() {

local EBZR_BRANCH_DIR

# EBZR_REPO_URI is empty.
[[ -z ${EBZR_REPO_URI} ]] && die "${EBZR}: EBZR_REPO_URI is empty."

# check for the protocol or pull from a local repo.
if [[ -z ${EBZR_REPO_URI%%:*} ]] ; then
case ${EBZR_REPO_URI%%:*} in
http|https|rsync|sftp)
;;
*)
die "${EBZR}: fetch from ${EBZR_REPO_URI%:*} is not yet implemented."
;;
esac
fi

if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
debug-print "${FUNCNAME}: initial branch. creating bzr directory"
addwrite /
mkdir -p "${EBZR_STORE_DIR}" \
|| die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}."
chmod -f o+rw "${EBZR_STORE_DIR}" \
|| die "${EBZR}: can't chmod ${EBZR_STORE_DIR}."
export SANDBOX_WRITE="${SANDBOX_WRITE%%:/}"
fi



cd -P "${EBZR_STORE_DIR}" || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"

# every time
addwrite "${EBZR_STORE_DIR}"

EBZR_BRANCH_DIR="${EBZR_STORE_DIR}/${EBZR_CACHE_DIR}"

addwrite "${EBZR_BRANCH_DIR}"

debug-print "${FUNCNAME}: EBZR_OPTIONS = ${EBZR_OPTIONS}"

if [[ ! -d ${EBZR_BRANCH_DIR} || ${EBZR_REVISION} ]] ; then
# fetch branch
einfo "bzr branch start -->"
einfo " repository: ${EBZR_REPO_URI}${EBZR_BRANCH}"

${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${EBZR_REPO_URI}${EBZR_BRANCH}" ${EBZR_BRANCH_DIR} \
|| die "${EBZR}: can't branch from ${EBZR_REPO_URI}${EBZR_BRANCH}."

else
# update branch
einfo "bzr merge start -->"
einfo " repository: ${EBZR_REPO_URI}${EBZR_BRANCH}"

cd "${EBZR_BRANCH_DIR}"
${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} \
|| die "${EBZR}: can't merge from ${EBZR_REPO_URI}${EBZR_BRANCH}."
${EBZR_DIFFSTAT_CMD}
fi

cd "${EBZR_BRANCH_DIR}"

einfo "exporting..."
${EBZR_EXPORT_CMD} ${EBZR_REVISION:+-r ${EBZR_REVISION}} "${WORKDIR}/${P}" \
|| die "${EBZR}: export failed"

einfo "Revision ${EBZR_REVNO_COMMAND} is now in ${WORKDIR}/${P}"

cd "${WORKDIR}"
}


## -- bzr_bootstrap() ------------------------------------------------ #

bzr_bootstrap() {

local patch lpatch

cd "${S}"

if [[ -n ${EBZR_PATCHES} ]] ; then
einfo "apply patches -->"

for patch in ${EBZR_PATCHES} ; do
if [[ -f ${patch} ]] ; then
epatch ${patch}
else
for lpatch in "${FILESDIR}"/${patch} ; do
if [[ -f ${lpatch} ]] ; then
epatch ${lpatch}
else
die "${EBZR}: ${patch} is not found"
fi
done
fi
done
echo
fi

if [[ -n ${EBZR_BOOTSTRAP} ]] ; then
einfo "begin bootstrap -->"

if [[ -f ${EBZR_BOOTSTRAP} ]] && [[ -x ${EBZR_BOOTSTRAP} ]] ; then
einfo " bootstrap with a file: ${EBZR_BOOTSTRAP}"
eval "./${EBZR_BOOTSTRAP}" \
|| die "${EBZR}: can't execute EBZR_BOOTSTRAP."
else
einfo " bootstrap with commands: ${EBZR_BOOTSTRAP}"
eval "${EBZR_BOOTSTRAP}" \
|| die "${EBZR}: can't eval EBZR_BOOTSTRAP."
fi
fi

}


## -- bzr_src_unpack() ------------------------------------------------ #

bzr_src_unpack() {

bzr_fetch || die "${EBZR}: unknown problem in bzr_fetch()."
bzr_bootstrap || die "${EBZR}: unknown problem in bzr_bootstrap()."

}
After that we can add the overlay (myoverlay/x11-plugins/screenlets/screenlets-9999.ebuild):
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit gnome2 bzr autotools eutils distutils

EBZR_REPO_URI="http://bazaar.launchpad.net/~screenlets-dev/screenlets/"

DESCRIPTION="Screenlets are small owner-drawn applications"
HOMEPAGE="http://www.screenlets.org"
SRC_URI=""

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
dev-python/dbus-python
>=dev-python/gnome-python-desktop-2.16.0
dev-python/pyxdg
x11-libs/libnotify
x11-misc/notification-daemon
x11-misc/xdg-utils"

RDEPEND="${DEPEND}"

src_unpack() {
bzr_src_unpack
}

src_install() {
distutils_src_install

insinto /usr/share/desktop-directories
doins "${S}"/desktop-menu/desktop-directories/Screenlets.directory

insinto /usr/share/icons
doins "${S}"/desktop-menu/screenlets.svg

# Insert .desktop files
for x in $(find "${S}"/desktop-menu -name "*.desktop"); do
domenu ${x}
done
}
Create the digest...
ebuild myoverlay/x11-plugins/screenlets/screenlets-9999.ebuild digest
last step:
echo "x11-plugins/screenlets **" >> /etc/portage/package.keywords

Now you can emerge screenlets:emerge screenlets
I hope i make no error. The ebuild is a post from alpha1974 from the (gentoo forum (http://forums.gentoo.org/viewtopic-t-652604-start-25.html)).
Have fun with it

whise
February 7th, 2008, 08:53 PM
thats cool thanks

kwaanens
February 7th, 2008, 09:42 PM
Yikes! Nice to get a reminder why I don't use Gentoo. No offense :)

I added it to the initial post. I also added this to the faq. Can someone please, please, please help me update that FAQ? I've asked this a couple of times now. It's still here: http://screenlets.org/index.php/FAQ

- Ketil

whise
February 7th, 2008, 10:33 PM
kwaanens i want to tell you i apreciate the work you are doing for this comunity

some-guy
February 8th, 2008, 06:20 PM
I am in the process of locking the pages to User-only editing to prevent ( some) spam (and of course I'll try to update the FAQ :D)
EDIT: Done locking, I'll let the screenlet's owner do their pages (simply add __NOEDITSECTION__ to the top), now I need to update the FAQ :D

kwaanens
February 8th, 2008, 08:58 PM
Nice some-guy! I noticed your work before seeing your post :)

kwaanens
February 8th, 2008, 10:14 PM
I am in the process of locking the pages to User-only editing to prevent ( some) spam (and of course I'll try to update the FAQ :D)
EDIT: Done locking, I'll let the screenlet's owner do their pages (simply add __NOEDITSECTION__ to the top), now I need to update the FAQ :D

The __NOEDITSECTION__ seems not to work very well, unfortunately. I've removed spam a couple of times after you put it in.

- Ketil

some-guy
February 8th, 2008, 10:34 PM
we need RYX to give someone admin permissions...

smartboyathome
February 9th, 2008, 06:09 AM
some-guy: I removed more spam from that page, but it seems IPs are still able to edit it.

mario18
March 5th, 2008, 07:54 PM
i noticed when i went to emerge screenlets it brought in gnome in as a dependency when i have it disabled in my USE. ok, so emerge --nodep screenlets - works just fine, everything is gravy. go to start screenlet-manager and i get the folowing error
ImportError: No module named rsvg

i do a little research and find out that i need gnome desktop?%@*^% why? i dont want it. any way to do this with kde only?

some-guy
March 5th, 2008, 08:11 PM
python-librsvg is required for screenlets, ubuntu packages it in python-gnome-..., I am not sure about gentoo, though if you install it manually screenlets should work...

mario18
March 6th, 2008, 02:35 AM
ill give it a try thx

mario@HeavyWeight ~ $ emerge -s librsvg
Searching...
[ Results for search key : librsvg ]
[ Applications found : 1 ]

* gnome-base/librsvg
Latest version available: 2.20.0
Latest version installed: 2.20.0
Size of files: 452 kB
Homepage: http://librsvg.sourceforge.net/
Description: Scalable Vector Graphics (SVG) rendering library
License: LGPL-2


says i have it already??

some-guy
March 6th, 2008, 02:49 AM
you need the python bindings for it, either pylibrsvg or python-librsvg

mario18
March 6th, 2008, 03:32 AM
what are these?
/usr/bin/rsvg
/usr/bin/rsvg-view
/usr/bin/rsvg-convert
/usr/lib64/pkgconfig/librsvg-2.0.pc
/usr/lib64/librsvg-2.la
/usr/lib64/librsvg-2.a
/usr/lib64/librsvg-2.so.2.20.0
/usr/lib64/librsvg-2.so
/usr/lib64/librsvg-2.so.2

some-guy
March 6th, 2008, 03:59 AM
what are these?
/usr/bin/rsvg
/usr/bin/rsvg-view
/usr/bin/rsvg-convert
/usr/lib64/pkgconfig/librsvg-2.0.pc
/usr/lib64/librsvg-2.la
/usr/lib64/librsvg-2.a
/usr/lib64/librsvg-2.so.2.20.0
/usr/lib64/librsvg-2.so
/usr/lib64/librsvg-2.so.2

that is the actual librsvg, however python apps cannot use it without the bindings for it

try this
go to http://ftp.gnome.org/pub/GNOME/sources/gnome-python-desktop/
and download a matching version
in it edit configure so all of the dependency checking is removed
have it only build python-librsvg and install it

mario18
March 8th, 2008, 08:43 PM
i flipping hate gnome. i got the python-gnome-desktop installed, no more complaints about rsvg now...
mario@HeavyWeight ~ $ screenletsd --gui
Loading Daemon
GConf python module not found. GConf settings backend is disabled.
Traceback (most recent call last):
File "/usr/share/screenlets-manager/screenlets-manager.py", line 31, in <module>
import screenlets
File "/usr/lib64/python2.5/site-packages/screenlets/__init__.py", line 43, in <module>
from options import *
File "/usr/lib64/python2.5/site-packages/screenlets/options.py", line 216, in <module>
import gnomekeyring
ImportError: No module named gnomekeyring
Traceback (most recent call last):
File "/usr/share/screenlets-manager/screenlets-daemon.py", line 29, in <module>
import screenlets
File "/usr/lib64/python2.5/site-packages/screenlets/__init__.py", line 43, in <module>
from options import *
File "/usr/lib64/python2.5/site-packages/screenlets/options.py", line 216, in <module>
import gnomekeyring
ImportError: No module named gnomekeyring


why is it trying to use gnome? is there a way to tell it to use kde? or do i need to have both?

merging the gconf backend now, will update in a few...

still the same error, im going to play with it for a while, any help woulb be appreciated.. thx mario

mario18
March 10th, 2008, 04:42 PM
im still having the same problem after merging gconf. im guessing it wants gconf running? does anyone have this working under kde?

after letting it pull in all the dependency's it works now. great feature to have with compiz-fusion, thx for all your help guys

playac
March 15th, 2008, 05:01 PM
Is the screenlets.org site down?