Project

buildtasks

0.02
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Rake tasks to build Debian packages
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
~> 0.45.0

Runtime

>= 0
 Project Readme

BuildTasks

Build Status

Rake tasks to build Debian packages with git-buildpackage and fpm-cookery.

Installation

Add this line to your application's Gemfile:

gem 'buildtasks'

And then execute:

$ bundle

Or install it yourself as:

$ gem install buildtasks

Usage

Require the buildtasks gem in a Rakefile and call BuildTasks::Tool.define, where "Tool" is the name of the build tool you want to use (see below for a list of options you can pass to .define).

This will create two Rake tasks:

  • build -- used to build Debian package(s)
  • publish -- used to copy built packages to directory specified by PUBLISH_DIR environment variable

Invoke the build task to first build the packages, e.g., inside a Vagrant machine or Docker container. Afterwards, run the publish task to copy the resulting packages to a known location, e.g., your host system via a shared volume.

fpm-cookery

To build packages with fpm-cookery, create a Rakefile with this content:

require "buildtasks"

BuildTasks::FPMCookery.define do
  recipe              "recipe.rb" # name of recipe file (optional)
  fpm_cookery_version "0.25.0"    # version of fpm-cookery gem to use (optional)
  fpm_version         "1.3.3"     # version of fpm gem to use (optional)
end

In case you don't need to configure any attributes:

require "buildtasks"

BuildTasks::FPMCookery.define

Note that fpm-cookery will automatically install dependencies specified by the build_depends and depends attributes in recipe.rb before building.

git-buildpackage

To build packages with git-buildpackage, create a Rakefile with this content:

require "buildtasks"

BuildTasks::GitBuildpackage.define do
  name        "thrift" # project name
  version     "0.9.1"  # git ref to build
  source      "https://github.com/apache/thrift" # git repository to clone
  apply_patch "patches/THRIFT-2211.patch"        # patch to apply before building (optional)
end

Note that all build dependencies from debian/control will be automatically installed before building.

Extending Rake tasks

.define generates ordinary Rake tasks, which you can extend.

For example, here's how to download some file before fpm-cookery starts building:

require "buildtasks"

BuildTasks::FPMCookery.define

task :download do
  sh "curl ..."
end
task :build => :download

License and Authors

Author:: Mathias Lafeldt (mathias.lafeldt@jimdo.com)

Copyright:: 2014-2016, Jimdo GmbH

Licensed under the Apache 2.0 license. See LICENSE for details.

Contributing

  1. Fork this repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request