bernd / fpm-cookery

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

Define dependencies per distro #106

Closed JamieCressey closed 9 years ago

JamieCressey commented 9 years ago

I'm currently building packages as both .deb and .rpm variants. As Debian and RHEL based distros can't seem to agree on package/library naming standards, I believe the only option is to resort to two recipes per package, one for each package manager.

Is there currently a way, or would it be possible to define distro specific dependencies in a single recipe?

E.g.

deb-depends: 'lsb-release'
rpm-depends: 'redhat-lsb'

Thanks in advanced!

bernd commented 9 years ago

You can use this:

  platforms [:debian, :ubuntu] do
    depends  'lsb-release'
  end

  platforms [:redhat, :centos] do
    depends 'redhat-lsb'
  end

Hope that helps! :smiley:

JamieCressey commented 9 years ago

Perfect, thanks!