Add debhelper support for Bake

Bug #1117755 reported by Robert Ancell
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bake
Triaged
Medium
Unassigned

Bug Description

Add debhelper support for Bake.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I think this is just a matter of installing /usr/share/perl5/Debian/Debhelper/Buildsystem/bake.pm

Revision history for this message
Robert Ancell (robert-ancell) wrote :

This seems to do most of work and just requires

%:
 dh $@ --buildsystem=bake

in debian/rules. The main issue is I can't seem to know the 'destdir' at configure time which is what Bake currently expects..

# A debhelper build system class for handling Bake based projects.

package Debian::Debhelper::Buildsystem::bake;

use strict;
use base 'Debian::Debhelper::Buildsystem';

sub DESCRIPTION {
 "Bake (Recipe)"
}

sub check_auto_buildable {
 my $this=shift;
 return (-e $this->get_sourcepath("Recipe")) ? 1 : 0;
}

sub new {
 my $class=shift;
 my $this=$class->SUPER::new(@_);
 $this->enforce_in_source_building();
 return $this;
}

sub configure {
 my $this=shift;
 my $destdir=shift;

 # Standard set of options for configure.
 my @opts;
    # FIXME: Need to know the destdir at compile time
 # push @opts, "install-directory=$destdir";

 $this->doit_in_sourcedir("bake", "--configure", @opts, @_);
}

sub build {
 my $this=shift;
 $this->doit_in_sourcedir("bake", @_);
}

sub test {
 my $this=shift;
 $this->doit_in_sourcedir("bake", "test", @_);
}

sub install {
 my $this=shift;
 my $destdir=shift;
 $this->doit_in_sourcedir("bake", "install", @_);
}

sub clean {
 my $this=shift;
 $this->doit_in_sourcedir("bake", "clean", @_);
 $this->doit_in_sourcedir("bake", "--unconfigure", @_);
}

1

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

As far as I've seen in bake-generated packaging, destdir aka install-directory is currently being set to debian/<packagename>, which is not always correct. It is correct if the source package generates only one binary package, but if it has several binary packages, such as <packagename>-dbg, <packagename>-common or <packagename>-dev in addition to <packagename>, simply installing everything to debian/<packagename> will not work.

As far as I know, in build systems already supported by Debhelper the destdir is set to debian/tmp and files are copied to package-specific files by debhelper according to the debian/install.<packagename> files, or at least that's what I observe in Granite packaging.

I, of course, suggest contacting debhelper maintainers for clarification, because I'm not aware of the internal workings of debhelper and my experimental data is not necessarily representative.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.