bernd / fpm-cookery

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

builddir being set wrong with multiple directories in source #112

Closed abelletti closed 9 years ago

abelletti commented 9 years ago

This is my first time using fpm-cookery so feel free to smack me if this is user error.

I'm trying to package up Sonatype Nexus for internal deployment. The install file is at http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz. Unlike many sources, this one contains two directories at the top level, "nexus-2.11.3-01" and "sonatype-work".

What I'm finding is that "builddir" ends up set to tmp-build/sonatype-work which doesn't actually contain anything important. As a result I'm having to reference things with ".." in order to do what I need. It's a workaround but seems incorrect.

If nothing else, is there a way to manually set builddir within the recipe?

bernd commented 9 years ago

@abelletti I added extracted_source as a recipe option in 74ed6e0.

Usage:

class MyApp < FPM::Cookery::Recipe
  # ...
  source "http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz"
  extracted_source "nexus-2.11.3-01"
  # ...
end

This will be in the next fpm-cookery version.