From 8c1fc347f7d50b64f3693ba1d7e064bf9ccbae8c Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Wed, 28 Apr 2010 22:27:08 +0200 Subject: dpkg-source: implement --before-build and --after-build command Those commands are really hooks that source formats can use and that will be called by dpkg-buildpackage before and after the actual build. Source formats "2.0" and "3.0 (quilt)" use this hook to ensure patches are applied before the build. --- scripts/Dpkg/Source/Package.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/Dpkg/Source/Package.pm') diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm index 6c9cba2ca..c9d1a07e2 100644 --- a/scripts/Dpkg/Source/Package.pm +++ b/scripts/Dpkg/Source/Package.pm @@ -374,6 +374,10 @@ sub do_extract { # Function used specifically during creation of a source package +sub before_build { + my ($self, $dir) = @_; +} + sub build { my $self = shift; eval { $self->do_build(@_) }; @@ -383,6 +387,10 @@ sub build { } } +sub after_build { + my ($self, $dir) = @_; +} + sub do_build { internerr("Dpkg::Source::Package doesn't know how to build a " . "source package. Use one of the subclasses."); -- cgit v1.2.3