#
# Version 0.1 by Evan Hisey 11-21-2004
# ehisey@gmail.com
LBE USAGE README
Quick and dirty usage:
----------------------------
1: Download CVS
2: Change to lbe/ directory
3: Run ./build_all; go get coffee
4: mkdir lbe/ltsp-src/yourpkg
5: create package.def in yourpkg dir.
6: In ltsp-src run ./build --only=yourpkg
Now for the details:
-------------------------
1: INSTALL
You will need to get the current LBE source from CVS. It is available at:
cvs -d :pserver:anonymous@cvs.ltsp.org:/usr/local/cvsroot checkout -r LTSP-4_1_0 lbe
The CVS should give you a directory called lbe/. Cd to lbe/ and run ./build-all. This
will build the LBE toolchain and environment. Go get the beverage of choice and
consider watching tv 'cus it is going to take a while.(~ 3hrs. on a P4-2.5ghz)
NOTICE>> You will get errors when it tries to build the kernel. Currently the kernel
build is not correctly automated. So at the moment you can not build the full LTSP due
to kernel and initrd.
<<NOTICE
2: USAGE
Now you should have a complete LBE toolchain to work with. Lets walkt throught creating
an app called foo-1.2. Step one is to create the package directory in LBE. Change to the
lbe/ltsp-src. Here you would create a directory called foo. In the directory called foo
you would create a file called package.def (see Sec. 3). This file would contain all the
information need to build package foo. A basic package.def file for foo would look like this:
#
# package.def file for building a package in the LTSP build enviroment
#
PKG1 = foo-1.2
MD5SUM1 = 234235sdf34fwer34234r2w3e
SOURCE1 = ftp://ftp.bar.baz/${PKG1}
UNPACK = bunzip2 < ${TARBALL} | tar xf -
BUILDIR = foo-build
SOURCEDIR = foo-1.2
CONFIGURE = ../${SOURCEDIR}/configure --prefix=/usr
BUILD = make all
INSTALL = make install
CLEAN = rm -rf ${BUILDIR} ${SOURCEDIR}
#
# EOF
#
Then from the ltsp-src/ directory you would run ./build --only=foo. If you want to make clean
rebuild you would run ./build --only=foo --clean, followed by ./build --only=foo once more.
There you have it your own LTSP package located in lbe/packages.
2.b: USAGE CAVEAT
The biggest gotcha is that any tool need to build a package must be in the LBE directory. the
LBE ./build script use chroot extensively in build the packages. You do this in the same way as
you build in the ltsp-src directory to be sure all the linked libraries are in sync.
3: PACKAGE.DEF file
Important thing to remember is that the name is lowercase. The LBE ./build command provides
a few environment variables for you to make live easier: ${TARBALL} which is the downloaded
source archive; ${CPUS} which is the number of cpus present for parallel builds
REQUIRED VARIABLES
--------------------------------------------------
PKG1 < archive name
MD5SUM1 < MD5 checksum for package
SOURCE1 < download source for archive
UNPACK < how to unpack archive
BUILDIR < name for build directory
SOURCEDIR < unpacked source code directory
CONFIGURE < configure command
BUILD < build command
INSTALL < install command
CLEAN < how to clean up the build
TODO:add what all the variables are and do.
EDIT - Added some carriage returns for the verbatim text above for readability --
DaveFenwick - 04 Mar 2005