Skip to content

Commit

Permalink
Merge pull request #29 from bluca/main
Browse files Browse the repository at this point in the history
dh: install makefile include and derive distro/url from environment
  • Loading branch information
keszybz authored Mar 7, 2022
2 parents 2450788 + 1a78f46 commit 8815da8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions debian/dh-package-notes.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
dh/dh_package_notes usr/bin
generate-package-notes.sh => usr/bin/generate-package-notes
dh/package_notes.pm usr/share/perl5/Debian/Debhelper/Sequence
dh/package-notes.mk usr/share/debhelper/dh_package_notes
12 changes: 9 additions & 3 deletions dh/dh_package_notes
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use strict;
use warnings;
use Debian::Debhelper::Dh_Lib
qw(%dh doit hostarch init isnative sourcepackage);
use Dpkg::Vendor qw(get_current_vendor);
our $VERSION = '0.6';

=head1 SYNOPSIS
Expand All @@ -36,7 +37,7 @@ B<dh-sequence-package-notes> to the Build-Depends or add
B<--with package_notes> to the B<dh $@> call to make this happen.
The package using B<dh_package_notes> also needs to manually set in debian/rules
B<export DEB_LDFLAGS_MAINT_APPEND = -Wl,-dT,debian/.debhelper/notes.ld> as it is
B<include /usr/share/debhelper/dh_package_notes/package-notes.mk> as it is
not possible to do so from a debhelper addon.
=cut
Expand All @@ -46,15 +47,20 @@ init();
isnative( $dh{MAINPACKAGE} ); # Necessary to have $dh{VERSION}
my $source_package = sourcepackage();
my $package_arch = hostarch();
my $vendor = get_current_vendor();
my $url = $ENV{'DEBUGINFOD_URLS'};
if (!defined $url) {
$url = "https://debuginfod.debian.net";
}
my %options = ( 'stdout' => "debian/.debhelper/notes.ld" );
my @cmd = (
"/usr/bin/generate-package-notes",
"--type", "deb",
"--os", "debian",
"--os", lc ${vendor},
"--name", ${source_package},
"--architecture", ${package_arch},
"--version", $dh{VERSION},
"--debugInfoUrl", "https://debuginfod.debian.net"
"--debugInfoUrl", ${url}
);

if ( not mkdir("debian/.debhelper") ) {
Expand Down
4 changes: 4 additions & 0 deletions dh/package-notes.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: CC0-1.0
# Include from debian/rules to use with dh_package_notes.
# See dh_package_notes(1) for details
export DEB_LDFLAGS_MAINT_APPEND+= -Wl,-dT,$(CURDIR)/debian/.debhelper/notes.ld

0 comments on commit 8815da8

Please sign in to comment.