Debian.pm 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright © 2009 Raphaël Hertzog <hertzog@debian.org>
  2. # This program is free software; you can redistribute it and/or modify
  3. # it under the terms of the GNU General Public License as published by
  4. # the Free Software Foundation; either version 2 of the License, or
  5. # (at your option) any later version.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. # GNU General Public License for more details.
  10. # You should have received a copy of the GNU General Public License along
  11. # with this program; if not, write to the Free Software Foundation, Inc.,
  12. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  13. package Dpkg::Vendor::Debian;
  14. use strict;
  15. use warnings;
  16. use base qw(Dpkg::Vendor::Default);
  17. use Dpkg::Control::Types;
  18. =head1 NAME
  19. Dpkg::Vendor::Debian - Debian vendor object
  20. =head1 DESCRIPTION
  21. This vendor object customize the behaviour of dpkg scripts
  22. for Debian specific actions.
  23. =cut
  24. sub run_hook {
  25. my ($self, $hook, @params) = @_;
  26. if ($hook eq "before-source-build") {
  27. my $srcpkg = shift @params;
  28. } elsif ($hook eq "before-changes-creation") {
  29. my $fields = shift @params;
  30. } elsif ($hook eq "keyrings") {
  31. return ('/usr/share/keyrings/debian-keyring.gpg',
  32. '/usr/share/keyrings/debian-maintainers.gpg');
  33. } elsif ($hook eq "register-custom-fields") {
  34. return (
  35. [ "register", "Dm-Upload-Allowed",
  36. CTRL_INFO_SRC | CTRL_APT_SRC | CTRL_PKG_SRC ],
  37. [ "insert_after", CTRL_APT_SRC, "Uploaders", "Dm-Upload-Allowed" ],
  38. [ "insert_after", CTRL_PKG_SRC, "Uploaders", "Dm-Upload-Allowed" ],
  39. );
  40. }
  41. }
  42. 1;