A common miss-assumption in ROCK Linux 2.0 packages is that everything has to be done manually. A package with multiple source tar-balls needs to be extracted, configured, compiled and installed with custom code in the .conf file. But this is wrong!
The first improvement over doing everything manually is to use build_this_package which extracts the srctar and does all the extraction, configuring, compiling and installation. The first cleanup could be:
abc_main()
{
srctar=abc-lib-$ver.tar.bz2
build_this_package
srctar=abc-$ver.tar.bz2
build_this_package
}
custmain=abc_main
But using the features of the ROCK Linux 2.0 build system this can even be reduced to no code in the .conf at all! Since each tarball only needs to be build the normal auto detectable way, why shouldn't the Build-System iterate over all tar-balls itself? As you already might guess the build system provides this feature ;-)
Per default the Build-System uses the first D tag as main source tar-ball, since often the others are data archives which are not build-able. So you simply need to specify which tar-balls are build-able by setting the SRC tag in the .desc file to a pattern matching these files. An example:
[SRC] xine
[D] 0 xine-lib-1-beta12.tar.gz https://unc.dl.sourceforge.net/xine/
[D] 0 xine-ui-0.9.21.tar.gz https://unc.dl.sourceforge.net/xine/
Since the pattern xine is included in each of the two downloads both are just build the normal automatically chosen way.
|