dpkg_deploy plugin
Dpkg deployment element
A ScriptElement implementation for creating debian packages
Default Configuration
- The dpkg_deploy default configuration:
#dpkg_deploy default configuration # When specifying dependencies, one needs to specify one of the # dependencies as the 'input' element. # # The 'input' should be a debian package structure which should have # the 'dpkg-data' public data describing how they can be packaged. # # E.g.: # # build-depends: # - filename: base-tooling.bst # - filename: input.bst # config: # input: True # variables: # packages' default value will be automatically replaced with # defaults calculated from the input's split-rules. Replace this # with a space-separated list of packages to have more control # over what gets generated. # packages: <PACKAGES> buildpkg: | for package in %{packages}; do /bin/chmod 0755 %{build-root}/$package/DEBIAN dpkg-deb --build %{build-root}/$package %{install-root} done config: build-commands: - | %{buildpkg}
Public Data
This plugin uses the public data of the element indicated by config.input to generate debian packages.
split-rules
This plugin consumes the input element’s split-rules to identify which file goes in which package, e.g.
public:
bst:
split-rules:
foo:
- /sbin/foo
- /usr/bin/bar
bar:
- /etc/quux
dpkg-data
control
The control field is used to generate the control file for each package, e.g.
public:
bst:
dpkg-data:
foo:
control: |
Source: foo
Section: blah
Build-depends: bar (>= 1337), baz
...
name
If the “name” field is present, the generated package will use that field to determine its name. If “name” is not present, the generated package will be named <element_name>-<package_name>
i.e. in an element named foo:
public:
bst:
dpkg-data:
bar:
name: foobar
will be named “foobar”, while the following data:
public:
bst:
dpkg-data:
bar:
...
will create a package named “foo-bar”
package-scripts
preinst, postinst, prerm and postrm scripts will be generated based on data in pacakge-scripts, if it exists. The scripts are formatted as raw text, e.g.
public:
bst:
package-scripts:
foo:
preinst: |
#!/usr/bin/bash
/sbin/ldconfig
bar:
postinst: |
#!/usr/bin/bash
/usr/share/fonts/generate_fonts.sh