5.2. Adding packages

To begin the building of your package package-1.2.3, you will need the following:

Create directory ./package-1.2.3/.
Create anybuild ./package-1.2.3/package.build. You may use already existing one from another package as a template.
Copy package sources into directory ./package-1.2.3/. Their name must be as of: ./package-1.2.3/package-1.2.3.txz. Instead of .txz another formats may be used also: .tar.xz, .tgz, .tar.gz, .tar.bz2, .tbz2.
If patches to a package exist, copy them to directory ./package-1.2.3/patch/.

Then you may launch the build with command:

    any do id package-1.2.3

Anybuild writing

The main contents of anybuild are functions src_config, src_compile, src_install. Their body is generic build instructions on package building, without actions, specific to any. If needed, build strings may be replicated without changes at all.

The adaptation of existing commands makes sense, if you wish to generalize them and make more universal with API (which is one of the main purposes of any). For example, string with path to documentation --docdir=/usr/share/doc/xz-5.2.5 would be replaced with: --docdir=${PREFIX}/share/doc/${P}

Detailed guide on writing of new anybuilds is located here: any-build(7).