desiderantes / stew

Simple buid system for the 21st century
GNU General Public License v3.0
2 stars 0 forks source link

Add debhelper support for Bake #6

Open desiderantes opened 7 years ago

desiderantes commented 7 years ago

Add debhelper support for Bake.

Launchpad Details: #LP1117755 Robert Ancell - 2013-02-06 22:28:24 +0000

desiderantes commented 7 years ago

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

Launchpad Details: #LPC Robert Ancell - 2013-02-06 22:31:43 +0000

desiderantes commented 7 years ago

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_insourcedir("bake", @); }

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

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

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

1

Launchpad Details: #LPC Robert Ancell - 2013-05-15 09:58:47 +0000

desiderantes commented 7 years ago

As far as I've seen in bake-generated packaging, destdir aka install-directory is currently being set to debian/, 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 -dbg, -common or -dev in addition to , simply installing everything to debian/ 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. 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.

Launchpad Details: #LPC Sergey "Shnatsel" Davidoff - 2013-09-15 10:26:28 +0000