Files
gentoo-zh/eclass/googlecode.eclass
T
microcai 77ae755078 update googlecode eclass
fqterm  use googlecode.eclass
2011-05-12 09:08:39 +00:00

43 lines
834 B
Bash

# Copyright 2011 microcai
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: googlecode.eclass
# @MAINTAINER: microcai
# microcaicai@gentoo.org
# @BLURB:
# @DESCRIPTION:
# Exports portage base functions used by ebuilds written for packages hosting on google code.
inherit eutils autotools
if [ "${PV##*.}" = "9999" ]; then
inherit subversion
fi
case "${EAPI:-0}" in
3|4)
EXPORT_FUNCTIONS src_install
;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
if [ "$HOMEPAGE" = "" ]; then
HOMEPAGE="http://${PN}.googlecode.com"
fi
ESVN_REPO_URI="${HOMEPAGE}/svn/trunk/"
if [ "${TAR_SUFFIX}" = "" ] ; then
SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
else
SRC_URI="http://${PN}.googlecode.com/files/${P}.${TAR_SUFFIX}"
fi
googlecode_src_install(){
emake install DESTDIR=${D} || die
}