scripts/mk: On dpkg-build-api >= 1 include buildtools.mk in default.mk
[dpkg.git] / scripts / Dpkg / Vendor / Devuan.pm
blob1ff5adfd1249a487f0390e6c09b9d9d68c03fd67
1 # Copyright © 2022 Guillem Jover <guillem@debian.org>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 =encoding utf8
18 =head1 NAME
20 Dpkg::Vendor::Devuan - Devuan vendor class
22 =head1 DESCRIPTION
24 This vendor class customizes the behavior of dpkg scripts for Devuan
25 specific behavior and policies.
27 B<Note>: This is a private module, its API can change at any time.
29 =cut
31 package Dpkg::Vendor::Devuan 0.01;
33 use strict;
34 use warnings;
36 use parent qw(Dpkg::Vendor::Debian);
38 sub run_hook {
39 my ($self, $hook, @params) = @_;
41 if ($hook eq 'package-keyrings') {
42 return ('/usr/share/keyrings/devuan-keyring.gpg',
43 '/usr/share/keyrings/devuan-maintainers.gpg');
44 } elsif ($hook eq 'archive-keyrings') {
45 return ('/usr/share/keyrings/devuan-archive-keyring.gpg');
46 } elsif ($hook eq 'archive-keyrings-historic') {
47 return ('/usr/share/keyrings/devuan-archive-removed-keys.gpg');
48 } elsif ($hook eq 'extend-patch-header') {
49 my ($textref, $ch_info) = @params;
50 if ($ch_info->{'Closes'}) {
51 foreach my $bug (split(/\s+/, $ch_info->{'Closes'})) {
52 $$textref .= "Bug-Devuan: https://bugs.devuan.org/$bug\n";
55 } else {
56 return $self->SUPER::run_hook($hook, @params);
60 =head1 CHANGES
62 =head2 Version 0.xx
64 This is a private module.
66 =cut