This PR provides support for easily taking a directory tree and turning it into a package.
The PR includes a new recipe type called DirRecipe which implements an empty build and an install phase that copies files over from the build dir. It also deletes cookies, otherwise they end up in the FPM artifact.
The PR also includes a new handler of type 'directory' that specifies the part of the directory tree to use as source.
I use this setup often for packaging and versioning things like scripts or other elements that need to be versioned and packaged.
Here is an example use.
class Scripts < FPM::Cookery::DirRecipe
homepage 'https://www.example.com/'
source File.join('/home/vagrant/build/stage/'), :with => :directory
name 'scripts'
version '1:1.0.0'
revision '0'
arch 'all'
vendor 'me'
maintainer 'Foo Bar <foo@bar.com>'
description 'Some scripts'
def build
FileUtils.chmod("u=rw,go=r", Dir.glob(File.join(builddir,'/path/to/place/scripts/*')))
end
end
This PR provides support for easily taking a directory tree and turning it into a package.
The PR includes a new recipe type called DirRecipe which implements an empty build and an install phase that copies files over from the build dir. It also deletes cookies, otherwise they end up in the FPM artifact.
The PR also includes a new handler of type 'directory' that specifies the part of the directory tree to use as source.
I use this setup often for packaging and versioning things like scripts or other elements that need to be versioned and packaged. Here is an example use.
If accepted, I will update the docs/wiki.