pkgbuild format

Source packages include a special Lua file that describes the package and how to build it, entitled pkgbuild.lua. Their role and format are inspired by Archlinux’s PKGBUILD files.

The following properties should be defined:


The technical name of the source package; should also correspond to the name of the build package.


The upstream package version, expressed as a string only containing letters, numbers, dots and underscores.


The package release number as an integer, relative to the upstream package version.


A short and inline description of the source package.


The URL of the official site of the upstream software being packaged.


The identifier of the license of the software being packaged. For now, only MIT is allowed.


A sequence representing the packages on which the current source package depends at runtime.


A sequence of the source files or archives being required to build the package. For now these files must be included with the pkgbuild.

The following functions should be defined:

build(pkgdir, srcdir)

The build function, that takes the destination package directory and the source directory in which source files are available.


Should archives be directly unpacked?


What functions are available to this function? What members? The following functions should at least be available, in addition to copies of the pkgbuild globals:

fs.combine(path, ...) -- combine paths with separators.
fs.makedirs(path) -- make multiple parent directories.
fs.copy(dest_path, src_path) -- copy a given file.
fs.listdir(path) -- list files and directories.

And what about packages being required for build? Can they be represented using out of system builds? (kind of cross compiling)