WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Small TCE/TCZ build environment  (Read 20142 times)

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Small TCE/TCZ build environment
« on: June 19, 2009, 06:20:37 PM »
Hello,

I've hacked up a small yet rather flexible build environment for creating TCE and TCZ packages.

It's available via git:
git clone http://svolli.org/software/tinycore/.git
git clone http://git.svolli.org/tinycore.git
or
git clone git://git.svolli.org/tinycore.git


There are four files in there right now:
tcbuild/base.inc
tcbuild/bvi.desc
tcbuild/qt-4.5.desc
tcbuild/tcbuild

tcbuild is the frontend that should be copied/moved/linked to $PATH
On line 10 you can see:
TCBUILD_DIR=${HOME}/tcbuild
So that's where I keep the rest of the files. Calling it without any arguments displays a hint on how to use it:
usage: ./tcbuild package mode
modes are:
download unpack configure compile install postinstall buildtce buildtcz ls full

download: download the sourcecode
unpack: unpack the sourcecode
configure: run ./configure with appropriate options
compile: run make
install: run make install
postinstall: remove some unnecessary stuff like docs and manpages
buildtce: build the .tce files with .tce.md5.txt and .tce.info
buildtcz: build the .tcz files with .tcz.md5.txt and .tcz.info
full: run all of the above in sequence

All these steps can be run from anywhere in the filesystem, tcbuild always "cds" to the right directory.

The pathnames to which files are downloaded, unpacked, compiled, and installed are in the head of base.inc, which contains most of the functionality, tcbuild is just a frontend.

bvi.desc and qt-4.5.desc are two packages I've defined.

bvi is "binary vi", a hex-editor with vi-like keybindings. A rather basic and straight forward package.

qt-4.5 is my second attempt on building a qt-4.5.1 package for TCL. This one includes WebKit and is much more modular (7 instead of 2 packages) than the one currently provided.

If you look at these shell script you can see that this "build-framework" can be customized for single packages rather easy.

Other package description files will follow, as well as my resulting submissions from these build scripts. But now, here in Germany, it's bedtime. ;-)

Edit: 2010-03-16: the repository has moved quite some time ago, the address has been updated.
« Last Edit: March 16, 2010, 04:34:33 PM by SvOlli »

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: Small TCE/TCZ build environment
« Reply #1 on: June 21, 2009, 04:14:04 PM »
Great effort. I was just about to setup my own build system, but now I do not have to do that :).

As you noted on your git page, the TC git package could not be used to clone your stuff. Any chance of providing tcbuild as a tce (you could provide your examples under /usr/local/share/tcbuild/examples) ?

In noticed that the qt4 example was not available on your git, will this be fixed?

/Lars

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Small TCE/TCZ build environment
« Reply #2 on: June 23, 2009, 04:27:34 PM »
How about attaching the scripts as a .tgz to your post? That would be more accessible. I am interested in what you've done, but I'm too lazy to install git and pull it down. :)

Offline samedirection

  • Jr. Member
  • **
  • Posts: 64
Re: Small TCE/TCZ build environment
« Reply #3 on: June 24, 2009, 09:34:11 AM »
This looks very cool, thanks. 

@danielbarnes: I think that posting links to packages is against TC guidelines.  They want only vetted packages linked to, for safety's sake.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Small TCE/TCZ build environment
« Reply #4 on: June 24, 2009, 01:40:04 PM »
@danielbarnes: I think that posting links to packages is against TC guidelines.  They want only vetted packages linked to, for safety's sake.
That only applies to (installable) TC extensions.

Offline florian

  • Full Member
  • ***
  • Posts: 116
    • Home Page
Re: Small TCE/TCZ build environment
« Reply #5 on: June 24, 2009, 05:00:23 PM »
@SvOlli: I too am interested to check more and test this but I don't use git as version control. Can you post as attachement or hyperlink where we can simply download the tarball?


Offline samedirection

  • Jr. Member
  • **
  • Posts: 64
Re: Small TCE/TCZ build environment
« Reply #6 on: June 24, 2009, 06:53:03 PM »
@hats: ah right.  I had read the request as for a .tcz not a tgz.

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Small TCE/TCZ build environment
« Reply #7 on: June 26, 2009, 12:31:06 PM »
I've updated and moved the repository to git://svolli.org/tinycore.git

Now there are also descriptions of slang, jed, most, scite, pngphoon and an update qt-4.5.

@SvOlli: I too am interested to check more and test this but I don't use git as version control. Can you post as attachement or hyperlink where we can simply download the tarball?
I don't think throwing out tarballs is such a good idea, because:

1. Using git is easy (even on TC).
First download:
Code: [Select]
tce-wget git.tcel
git clone git://svolli.org/tinycore.git
Update is even easier:
Code: [Select]
cd path/to/tinycore
git pull

2. It makes maintenance easier for me.
- I don't have to care about putting a new tarball together.
- The source of the code is determinable.
- All the tools you for providing me with modifications are included just by using git
- A corrupted download will be automagically be detected.
Just to name a few.

Using git just for downloading something is as easy as running wget and tar, believe me and try it.

Offline 3rail

  • Full Member
  • ***
  • Posts: 114
Re: Small TCE/TCZ build environment
« Reply #8 on: August 13, 2009, 02:11:00 PM »
Is there some kind of guide or walk through on using tcbuild to build extensions?  I downloaded it via git and couldn't figure out how to get to work (sorry).  I'd like to create some new extensions for submission using this tool.

TIA

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Small TCE/TCZ build environment
« Reply #9 on: August 13, 2009, 02:43:58 PM »
Is there some kind of guide or walk through on using tcbuild to build extensions?

Nope. It's just a small hack and I didn't find the time to write the docs. I prefer to put this time in coding on my qt applications... sorry.

I never write new ".desc"-files from scratch, but use another one as a template/base for the new one. The most straight forward example is bvi.

Quote
... couldn't figure out how to get to work (sorry).
It's not hard, others managed to get it working.

The easiest way start is:
Code: [Select]
cd $HOME
mkdir src
ln -s <path/to/tcbuild-dir>
cd tcbuild
./tcbuild bvi full

This should download the source to $HOME/src, compile it and create the packages in /tmp/tcbuild/bin/bvi. If you want to hack up some packages yourself, you'll need some knowledge about (bourne) shell scripting. "bvi.desc" is the simplest package I've done so far, "qt.desc" the most complex one.

The basic idea is that "base.inc" will provide anything you'll need for a normal/simple package. If you need to modify a function (e.g. for configuring), you'll write that function yourself or copy it from base.inc and modify it to fit your needs.

I hope this first short introduction did help you enough. If it did not, or you'll get stuck in hacking up your extension, feel free to let me know, and I'll see what I can do for you.

Offline 3rail

  • Full Member
  • ***
  • Posts: 114
Re: Small TCE/TCZ build environment
« Reply #10 on: August 18, 2009, 11:22:32 AM »
@SvOlli: that was enough to get me started.  Thanks!

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Small TCE/TCZ build environment
« Reply #11 on: October 26, 2009, 10:39:52 AM »
the new git on the tc repo works for this program
dCore user

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Small TCE/TCZ build environment
« Reply #12 on: November 08, 2009, 05:30:51 PM »
Thanks, that's cool!

I've updated the repo with a bugfix, that did break the detection of the package size.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Small TCE/TCZ build environment
« Reply #13 on: November 09, 2009, 06:33:12 AM »
u should change base.inc since the command to package now is mksquashfs and not mkfs.cramfs
dCore user

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Small TCE/TCZ build environment
« Reply #14 on: November 09, 2009, 01:38:32 PM »
Done. Thanks for the hint.