bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

Recipe for installing a bunch of files #178

Closed NikolausDemmel closed 7 years ago

NikolausDemmel commented 7 years ago

Most examples I found so far are about downloading some source (e.g. tar), compiling, and installing.

I have a fairly simple case where I just have a bunch of config or binary files that I want to bundle up into a debian package that installs them in various different places. There is now download or compilation step.

How can I express that as an fpm recipe?

eperdeme commented 7 years ago

class myapp < FPM::Cookery::DirRecipe

name 'myapp' version 1.0.0 source File.join("#{Dir.pwd}/../src/"), :with => 'directory' revision 0 arch 'all'

def build FileUtils.chmod(0755, Dir.glob(File.join(builddir,'*'))) end

def install prefix('local/bin').mkdir prefix('local/bin').install Dir['*'] end end

NikolausDemmel commented 7 years ago

Awesome. Thanks!