Create the following file:
package "foo" do
version "0.0.1"
type "deb"
file {
source "/some/place/in/filesystem"
dest "/some/place/to/put/it"
}
files {
source "/some/bunch/of/files/*"
dest "/some/other/place"
}
end
Invoke the associated packager
script as follows:
$ packager execute <filename>
You now have foo-0.0.1.x86_64.deb
with several files in it wherever you
invoked packager
.
You can pass in the following options to the packager:
This is a boolean that, if set, will do everything up to, but not including, invoking fpm.
This will set helpers that can be used within the DSL. The example will set
the helper pkg_name
to "foo" and the helper pkg_version
to "0.0.1".
Due to how Thor works, you must pass multiple variables at the same time. As shown above, Thor requires keys and values to be joined by a colon (":").
Consider providing helpers for the following:
- Package version
- A root directory (so that your source files can be relative to something)
- Package type (you may want to build a deb vs. an rpm at different times)
- package
name
Stringtype
Stringversion
VersionStringfile
/files
source
Stringdest
String
link
/links
source
Stringdest
Stringlink
Boolean
requires
Array[String]provides
Array[String]before_install
Array[String]
If link
is true in your file, then a symbolic link will be created instead of
a file being copied.