Compile FAQ maintained by Rafael Jeffman Questions 1. About Compile 1.1. What are Compile, Recipes and source packages? 1.2. Why should I use source packages instead of binary ones? 2. How to use Compile 2.1. How do I create a Recipe for a program based on GNU Autotools? 2.2. Does Compile support dependencies? 2.3. How do I create a program which is based of many source archives? 2.4. How do I make it download and use a file when the resulting file is not a part of the URL? 2.5. I've already downloaded the source URL. How do I use it? 1. About Compile 1.1. What are Compile, Recipes and source packages? Compile is the system used by GoboLinux to install programs using their source code distribution instead of a pre-compiled binary version. Altough inspired by Gentoo's Portage, it was built from scratch to reflect the philosophy of GoboLinux and to be easily integrated to it. Recipes are how the configuration files used by Compile are called. They contain a recipe on how to obtain and compile a program from its sources. A Recipe may also contain patches to be applied to the source code in order to make the program work properly. Source packages in GoboLinux differ a little from other distributions. Apart from possible patches that are released with a Recipe, the sources for a given program is obtained from the official distribution site. There is no "GoboLinux Repository" for sources. 1.2. Why should I use source packages instead of binary ones? There might be many reasons for installing software from the source code. The most common are: * *Optimization* Some software is very sensible to machine optimization. For these, compiling for a specific target may enhance its usage. A good example is MPlayer. * *Compilation Options/Dependencies* Most software has many compilation options that may alter its avaiable features, optimization parameters and runtime dependencies. Binary distributions are released with a pre-selected set of compilation options that may not be the optimal one neither the ones required in a specific usage scenario. * *Consistency* It is easier to keep the system consistency installing all software from source code. 2. How to use Compile 2.1. How do I create a Recipe for a program based on GNU Autotools? Most of the open source software available today, when installed from the source code uses the GNU Autotools for configuring its compile options and to generate system dependent code. Their installation is often performed by issuing three commands: configure, make and make install. For example, most - if not all - of the software avaiable at GNU.org can be installed this way. For what can be called "well behaved" programs, that is those programs that respect the configuration of installation paths, a Recipe would be like: url=ftp://ftp.gtk.org/pub/gtk/v2.0/pango-1.0.5.tar.bz2 is_compileprogram=yes This Recipe tells Compile where this program (Pango--1.0.5) can be found using the *url* directive and that it can be compiled using standard GNU Autotools procedure by setting *is_compileprogram* to /yes/. *is_compileprogram* is derived from the old method for installing program from sources called CompileProgram. To select configure options set *configure_options*, as in the ImageMagick--5.5.7-10 Recipe: url=ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-5.5.7-10.tar.bz2 dir=ImageMagick-5.5.7 is_compileprogram=yes configure_options=( "--enable-shared" "--with-x" "--without-perl" ) 2.2. Does Compile support dependencies? Yes. It is the same as in the /Programs hierarchy: through a Resources/Dependencies file. In fact, the Resources/ directory inside, say, Recipes/Foo/1.0 is copied directly to /Programs/Foo/1.0 after compilation. This way you can set Environment variables, configuration Defaults, etc. The Compile program verifies the Dependencies file and, if there is a program which is not in /Programs and a recipe for it is available, it gets compiled first. 2.3. How do I create a program which is based of many source archives? You can use a meta-recipe. KDE and Enlightenment, for example, are done this way. Create a separate recipe for each component. Then, in the meta-recipe, specify the recipe type as is_meta=yes and list the recipes to be included in the include array. When you compile the meta-recipe, all subpackages will be built into the same /Programs entry. (For example, all components of KDE will be installed at /Programs/KDE , but if you don't use KDE and only want to build ARTS separately, you can just 'Compile ARTS' and it will get installed at /Programs/ARTS). 2.4. How do I make it download and use a file when the resulting file is not a part of the URL? Specify both the "url" variable and the "file" variable. 2.5. I've already downloaded the source URL. How do I use it? Put the file in the Archives directory.