linux-fetion-9999.ebuild [原创]

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

inherit eutils qt4
inherit subversion

DESCRIPTION="Linux Fetion a KDE IM client, Using CHINA MOBILE's Fetion Protocol"
HOMEPAGE="http://www.libfetion.cn/ http://code.google.com/p/libfetion-gui"

SRC_URI=""
ESVN_REPO_URI="http://${PN}-gui.googlecode.com/svn/trunk"

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

RESTRICT="primaryuri"


RDEPEND="|| ( ( x11-libs/qt-gui
    x11-libs/qt-qt3support )
    >=x11-libs/qt-4.3 )
    virtual/libstdc++
    net-misc/curl
    "

DEPEND="${RDEPEND}
    >=sys-devel/automake-1.5
    "
ESVN_STORE_DIR="${S}"
S="${WORKDIR}/${P}/${PN}/trunk/qt4_src"

src_unpack() {
    ESVN_REPO_URI="http://libfetion-gui.googlecode.com/svn/trunk/"
    einfo "S = ${S}"
    einfo "STORE_DIR = ${ESVN_STORE_DIR}"
    local repo_uri="${ESVN_REPO_URI}"
    subversion_wc_info ${repo_uri}

    subversion_src_unpack
    einfo "S = ${S}"
    einfo "STORE_DIR = ${ESVN_STORE_DIR}"
    cd ${S}
}



src_compile()
{
    if use amd64 ; then
        sed -i -e "/libfetion.a/c    LIBS += -lcurl ./libfetion_64.a" ${PN}.pro
        sed -i -e "/libfetion_32.a/c    LIBS += -lcurl ./libfetion_64.a" ${PN}.pro
    else
        sed -i -e "/libfetion_64.a/c    LIBS += -lcurl ./libfetion_32.a" ${PN}.pro
        sed -i -e "/libfetion.a/c    LIBS += -lcurl ./libfetion_32.a" ${PN}.pro
    fi
    eqmake4 ${PN}.pro || die "qmake fail"
    emake || die "emake fail"
}

src_install()
{
    einfo "S = ${S}"
    einfo "install APIDocs"
    insinto /usr/share/libfetion
    doins fetion_utf8_CN.qm

    doins APIDocs
    insinto /usr/share/applications
    doins misc/LibFetion.desktop

    insinto /usr/share/pixmaps
    doins misc/fetion.png

    insinto /usr/share/app-install/icons
    doins misc/fetion.png

    dobin ${PN}
}

由于libfetion在googlecode开了个窝,所以觉得有必要还是弄个linux-fetion-9999.ebuild svn fetch方式来使用新代码,试了可用,但暂时还不适合放到gentoo-china-overlay上去
最近blog在http://planet.gentoo-cn.org 乱码问题一直很麻烦,注册了个
http://feed.feedsky.com/axlrose 不知道有搞头不

你可能感兴趣的:(#gentoo)