On Wed, Dec 05, 2007 at 01:49:29PM -0500, Jean-Claude Gervais wrote:
> I understand how to use crossdev to generate a toolchain and xmerge
> to then build ebuilds for a target system, but what if I have a
> simple app that is not distributed as an ebuild?
>
> What is the proper way to get the project to build for the intended
> target?
Write an ebuild. Seriously. It's pretty easy.
> Here is the source file, helloworld.c
> .-.-.-.-.-.-.-..-.-.-.-.-.-.-.
> int main ( void ) {
> return 0;
> }
> .-.-.-.-.-.-.-..-.-.-.-.-.-.-.
>
>
> Here is the makefile:
> .-.-.-.-.-.-.-..-.-.-.-.-.-.-.
> all: helloworld
>
> helloworld: helloworld.o
> .-.-.-.-.-.-.-..-.-.-.-.-.-.-.
Ok. Make a tarball with a subdirectory named helloworld-1.0 that
contains your two files. The ebuild can then be as simple as:
--8<-- helloworld-1.0.ebuild
DESCRIPTION="hello world thing"
HOMEPAGE=""
SRC_URI="helloworld.tar.gz"
LICENSE="GPL-2" # or perhaps "your.com_proprietary" ?
SLOT="0"
KEYWORDS="amd64 x86" # add archs here of course.
IUSE=""
DEPEND=""
src_compile() {
emake
}
src_install() {
dobin helloworld
}
-->8--
Note that this should never be distributed since SRC_URI only has the
filename, and thus this requires the tarball to be placed in
/usr/portage/distfiles by some other means than portage.
Maybe make an internal URL, and add RESTRICT="mirror" instead. That
is much cleaner.
Make digests with ebuild helloworld-1.0.ebuild digest and then it
should xmerge.
//Peter
--
[EMAIL PROTECTED] mailing list