metabuild [options] meta_module_conf_file
metabuild [options] meta_module_conf_file
E.g.,
metabuild -v emacs.conf
metabuild - download and build meta modules automatically
For support, post in the Wolvix, GoblinX or Slax forum, or at https://sourceforge.net/tracker/?group_id=204283&atid=988992 .
The metabuild script is a simple shell script that creates a LZMA
compressed module (.lzm) from a list of Slackware packages (.tgz). The idea of the script is to use the ready-built tgz packages in any Slackware package repository).
It also makes it simpler to host and share user-contributed meta modules, as it is only a few bytes in size and can be easily attached or posted on websites, forums, blogs, etc.
metabuild $ $Revision: 1.3 $ metabuild - download and build customized lzm modules automatically. Usage: metabuild [options] meta_module_conf_file Examples: cat ~/.metabuild.ini metabuild -v --update metabuild -v emacs.conf Source options: -m, --mirror=url slackware mirror (eg http://slackware.osuosl.org/) (mandatory) -r, --release=n slackware release (eg, slackware-12.1) (mandatory) -c, --cache=dir cache directory to store downloaded slackware packages (default=`.') (mandatory) -t, --type=rep repository type (tgz/lzm). (default=`tgz') Download options: --download only download slackware packages to cache, no build. (toggle) (default=off) --no-download do not download, use files from cache instead. (toggle) (default=off) -u, --update update package list of the given release Build options: -d, --dest=dir destiantion directory that store built lzm modules (default=`.') --tag=id tag used to build meta package name --name=id overwrite the built meta package name with this otherwise, the meta package name will be constructed as <conf_name>-<release_id>-<tag>.lzm --cleanup cleanup the intermediate work dir after build Other options: -v, --verbose be verbose, show commands run -n, --no-exec no execution, only show commands to run
The script simply downloads (wget) all the packages in the list specified in the meta_module_conf_file file, installs them to a build directory (ROOT=) and generates a LZMA module from the build with the installed packages. (dir2lzm)
You can set site-wise defaults without specifying the command line options by editing the metabuild.ini file installed with the package. Or, you can overwrite the site-wise default within the ~/.metabuild.ini file.
Here is my building environment:
$ cat ~/.metabuild.ini # -*- shell-script -*- _opt_mirror=http://gulus.usherbrooke.ca/. . ./slackware/ _opt_release=slackware-11.0 _opt_cache="pkgs" _opt_dest="mods"
Please choose a slackware mirror that is close to you.
After initializing your own building environment, you need to download the packages list for your specific slackware release:
metabuild -v --update
Now you are ready to build the meta modules.
![]() |
You MUST complete this step before building any meta modules. |
Here's a short guide on how to create your own MetaModule .conf file:
Take a look at the sample tcl-tk.conf file:
# list package(s) for the module line by line in PKGLIST PKGLIST='tcl/tcl tcl/tk tcl/expect'
Make sure you only specify one package per line, and it can uniquely identify the package you want.
Optionally, you can add the MODNAME, MODVERS variables in the .conf file.
Example:
MODNAME=my_own_tcl_module MODVERS=1.0
That's it. You can now run the script with the command:
metabuild -v /path/to/tcl-tk.conf
Once the script is done, you should find the module in your "_opt_dest" directory. With the above settings, it is:
* Module: tcl-tk-slackware-11.0.lzm * Output: mods/tcl-tk-slackware-11.0.lzm
![]() |
|
The MetaModule .conf does not necessarily consist of more than one package. The sample emacs.conf file http://live-developers.svn.sourceforge.net/viewvc/live-developers/meta/MetaModule/trunk/emacs.conf?view=markup demonstrates this.
If you use 'tgz2lzm' to build a emacs module, you will get this warning whenever you start emacs:
Warning: Lisp directory `/usr/share/emacs/21.4/leim' does not exist.
The single-package emacs.conf sample file demonstrates how to avoid such nuisances. With the help of the script and .conf file, the pre/post_build() function in the .conf file to be exact, you can do all the tweaking you like. For example, you can strip the module of documentation, headers, locale files, etc. This kind of tweaking is best done on a module-by-module basis.
Here is a copy of the emacs.conf sample file:
# list package(s) for the module line by line in PKGLIST PKGLIST=e/emacs-2 # To curb: "Warning: Lisp directory `/usr/share/emacs/21.4/leim' does not exist" function post_build() { mkdir -p $ROOTDIR/usr/share/emacs/21.4/leim }
![]() |
Have you noticed that PKGLIST is specified as 'e/emacs-2' instead of 'e/emacs'? That's the trick to make sure it will pick the unique package that you want, instead of a bunch of other ones. This is what you will get if you use 'e/emacs' instead: |
[metabuild] pkg: e/emacs, file: ./slackware/e/emacs-21.4a-i486-3.tgz ./slackware/e/emacs-info-21.4a-noarch-1.tgz ./slackware/e/emacs-leim-21.4-noarch-1.tgz ./slackware/e/emacs-lisp-21.4a-noarch-1.tgz
./slackware/e/emacs-misc-21.4a-noarch-1.tgz ./slackware/e/emacs-nox-21.4a-i486-2.tgz basename: extra operand `./slackware/e/emacs-leim-21.4-noarch-1.tgz' Try `basename --help' for more information.
[metabuild] error: Error in the .conf file at line 'e/emacs'. Make sure only one package can be selected from it.
![]() |
Please don't expect the script to be idiot-proof, and be ready to look under the hood if things breaks down. One tip for a smoother ride: try the given examples first will give you an easier start. |
Since metabuild-1.3, it is possible to use multiple repositories. It is not fully automatic yet, but as long as you have downloaded the supporting packages in '$_opt_cache', it will work fine. Here is an example building mplayer module from the slacky.eu repository.
% metabuild -v --tag='xpt' 800_multimedia-base-video.conf 21:14:56 [metabuild] Building the module as '800_multimedia-base-video-1.0-xpt.lzm' 21:14:56 [metabuild] Downloading package(s). This might take a while... 21:14:56 [metabuild] pkg: arts-, file: 21:14:56 [metabuild] warning: Package 'arts-' not found. 21:14:56 [metabuild] pkg: /sdl-, file: 21:14:56 [metabuild] warning: Package '/sdl-' not found. 21:14:56 [metabuild] pkg: mesa-, file: 21:14:56 [metabuild] warning: Package 'mesa-' not found. 21:14:56 [metabuild] pkg: /jack-, file: ./multimedia/jack-audio/0.109.2/jack-audio-connection-kit-0.109.2-i486-1sl.tgz 21:14:56 [metabuild] Downloading './multimedia/jack-audio/0.109.2/jack-audio-connection-kit-0.109.2-i486-1sl.tgz ' --2008-06-24 21:14:57-- http://slacky.uglyplace.org/repository/slackware-12.0/multimedia/jack-audio/0.109.2/jack-audio-connection-kit-0.109.2-i486-1sl.tgz[] 21:14:58 [metabuild] pkg: /mplayer-, file: ./multimedia/mplayer/1.0rc2try1/mplayer-1.0rc2try1-i686-1sl.tgz 21:14:59 [metabuild] Already have package './multimedia/mplayer/1.0rc2try1/mplayer-1.0rc2try1-i686-1sl.tgz ' 21:14:59 [metabuild] pkg: mplayerplug-in, file: ./multimedia/mplayerplug-in/3.50mplayerplug-in-3.50-i486-1sl.tgz 21:14:59 [metabuild] Already have package './multimedia/mplayerplug-in/3.50/mplayerplug-in-3.50-i486-1sl.tgz ' 21:14:59 [metabuild] pkg: flash-player-plugin-9.0.1, file: ./system/flash-player/9.0.124.0/flash-player-plugin-9.0.124.0-i386-1sl.tgz 21:14:59 [metabuild] Already have package './system/flash-player/9.0.124.0/flash-player-plugin-9.0.124.0-i386-1sl.tgz ' 21:14:59 [metabuild] Installing package(s) to the build directory... 21:15:00 [metabuild] Package 'arts-' not found in 'packages.lst' file. Looking into local cache 'pkgs.slacky/' instead. 21:15:00 [metabuild] ROOT=/tmp/build installpkg pkgs.slacky/arts-1.5.9-i486-2.tgz Installing package arts-1.5.9-i486-2... 21:15:05 [metabuild] Package '/sdl-' not found in 'packages.lst' file. Looking into local cache 'pkgs.slacky/' instead. 21:15:05 [metabuild] ROOT=/tmp/build installpkg pkgs.slacky/sdl-1.2.13-i486-2.tgz 21:15:08 [metabuild] Package 'mesa-' not found in 'packages.lst' file. Looking into local cache 'pkgs.slacky/' instead. 21:15:08 [metabuild] ROOT=/tmp/build installpkg pkgs.slacky/mesa-7.0.2-i486-1.tgz 21:15:20 [metabuild] ROOT=/tmp/build installpkg pkgs.slacky/jack-audio-connection-kit-0.109.2-i486-1sl.tgz [...]
Here is the conf file at its early stage:
# -*- shell-script -*- MODVERS=1.0 # /qt-3 PKGLIST='arts- /sdl- mesa- /jack- /faac- /mplayer- mplayerplug-in flash-player-plugin-9.0.1'
To use slapt-get, the following command will make it easier for you to configure your slapt-get from your metabuild configuration file.
source ~/.metabuild.ini echo "SOURCE=$_opt_mirror/$_opt_release/" | tee -a /etc/slapt-get/slapt-getrc
I actually download all packages via slapt-get, them symlink them into my cache directory:
source ~/.metabuild.ini find /var/slapt-get/goblinx -iname *tgz -print ln -sf `!!` $_opt_cache
The advantage of using slapt-get is that you can make sure all dependencies are included in the metabuild configuration file. The advantage of using GoblinX is that its slapt-get repository includes default Slackware packages, and has their dependencies information as well. So slapt-get can do dependency check even for default Slackware packages. Further, GoblinX repository has more packages than Slackware default.
Unpack
Issue
make make install
You are encouraged to check out svn directly, as the script will not have continuous formal stable releases, since developers constantly concentrate on further development and bug patching. The sourceforge packages would be released far apart.
Please check http://xpt.sourceforge.net/techdocs/vc/svn/svn03-SubversionSetup/index.html#linux_live_developers_central_svn_setup
on how to access the 'linux-live developers' svn repository.
If you don't want to bother with svn, then you can download the latest code as shown by this file:
build (big) metamodules from (small) metamodules.
build from .lzm modules / repositories (—type is unimplemented yet).