# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit eutils DESCRIPTION="The Palm Mojo SDK to develop Palm Pre applications" HOMEPAGE="http://developer.palm.com/" SRC_URI="https://cdn.downloads.palm.com/sdkdownloads/1.2.0.33/sdkBinaries/palm-sdk_1.2.0-svn202408-sdk77-pho33_i386.deb" LICENSE="${PN}" SLOT="0" KEYWORDS="~amd64" IUSE="" DEPEND="" RDEPEND="${DEPEND} >=app-emulation/virtualbox-bin-2.2.0 >=virtual/jre-1.5" # there sould be more dependencys, I'll add as needed src_prepare() { rm ./control.tar.gz || die "src_prepare failed" rm ./debian-binary || die "src_prepare failed" unpack ./data.tar.gz rm ./data.tar.gz || die "src_prepare failed" } src_install() { dodoc usr/share/doc/palm-sdk/changelog.Debian.gz || die dosym /opt/PalmSDK/0.1/bin/palm-emulator /usr/bin/palm-emulator || die dosym /opt/PalmSDK/0.1/bin/palm-generate /usr/bin/palm-generate || die dosym /opt/PalmSDK/0.1/bin/palm-install /usr/bin/palm-install || die dosym /opt/PalmSDK/0.1/bin/palm-launch /usr/bin/palm-launch || die dosym /opt/PalmSDK/0.1/bin/palm-log /usr/bin/palm-log || die dosym /opt/PalmSDK/0.1/bin/palm-package /usr/bin/palm-package || die dosym /opt/PalmSDK/0.1/bin/palm-worm /usr/bin/palm-worm || die newicon "${FILESDIR}/${P}-palm-emulator.png" palm-emulator.png make_desktop_entry palm-emulator "Palm Mojo SDK Emulator" palm-emulator.png Development || die dodir opt mv opt/PalmSDK "${D}"opt || die "src_install failed" # TODO there sould be some files to remove/replace by system libs dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage || die # dirty hack # TODO Find out how change the string /usr/bin/VBoxManage in # /opt/PalmSDK/0.1/share/jars/webos-emulator_x64.jar to pass correct VBoxManage path } pkg_postinst() { if ! grep "localhost" /etc/hosts | grep -s -q "127.0.0.1" ; then ewarn "Add \"127.0.0.1 localhost\" to your /etc/hosts" fi if ! grep -s -q "qemu" /etc/hosts ; then ewarn "Add \"127.0.0.1 qemu\" to your /etc/hosts" fi if ! grep -s -q "device" /etc/hosts ; then ewarn "Add something like \"192.168.2.101 device\" to your /etc/hosts" fi einfo "Dont forget to add your account to vboxusers group!" }