Debian.pm 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright © 2009 Raphaël Hertzog <hertzog@debian.org>
  2. #
  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.
  7. #
  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.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. package Dpkg::Vendor::Debian;
  16. use strict;
  17. use warnings;
  18. use base qw(Dpkg::Vendor::Default);
  19. use Dpkg::Control::Types;
  20. =head1 NAME
  21. Dpkg::Vendor::Debian - Debian vendor object
  22. =head1 DESCRIPTION
  23. This vendor object customize the behaviour of dpkg scripts
  24. for Debian specific actions.
  25. =cut
  26. sub run_hook {
  27. my ($self, $hook, @params) = @_;
  28. if ($hook eq "keyrings") {
  29. return ('/usr/share/keyrings/debian-keyring.gpg',
  30. '/usr/share/keyrings/debian-maintainers.gpg');
  31. } elsif ($hook eq "register-custom-fields") {
  32. return (
  33. [ "register", "Dm-Upload-Allowed",
  34. CTRL_INFO_SRC | CTRL_INDEX_SRC | CTRL_PKG_SRC ],
  35. [ "insert_after", CTRL_INDEX_SRC, "Uploaders", "Dm-Upload-Allowed" ],
  36. [ "insert_after", CTRL_PKG_SRC, "Uploaders", "Dm-Upload-Allowed" ],
  37. );
  38. } else {
  39. return $self->SUPER::run_hook($hook, @params);
  40. }
  41. }
  42. 1;