| 1 |
#! /usr/bin/perl |
| 2 |
|
| 3 |
use strict; |
| 4 |
use warnings; |
| 5 |
|
| 6 |
use Debian::Debhelper::Dh_Lib; |
| 7 |
|
| 8 |
init(); |
| 9 |
|
| 10 |
my $cmd = '/usr/share/perl-openssl-defaults/get-libssl-abi'; |
| 11 |
my $openssl_abi_level = qx{$cmd}; |
| 12 |
|
| 13 |
die("can't extract OpenSSL ABI version with $cmd") if !defined $openssl_abi_level; |
| 14 |
|
| 15 |
chomp $openssl_abi_level; |
| 16 |
for my $package (@{ $dh{DOPACKAGES} }) { |
| 17 |
addsubstvar($package, 'perl:Depends', "perl-openssl-abi-${openssl_abi_level}", undef); |
| 18 |
} |
| 19 |
|
| 20 |
__END__ |
| 21 |
|
| 22 |
=head1 NAME |
| 23 |
|
| 24 |
dh_perl_openssl - add dependencies required for OpenSSL modules |
| 25 |
|
| 26 |
=head1 SYNOPSIS |
| 27 |
|
| 28 |
B<dh_perl_openssl> [S<I<debhelper options>>] |
| 29 |
|
| 30 |
=head1 DESCRIPTION |
| 31 |
|
| 32 |
dh_perl_openssl is a debhelper program that is responsible for adding a dependency |
| 33 |
on perl-openssl-abi-* to the ${perl:Depends} substitution variable. |
| 34 |
Such a dependency is needed for packages that expose the OpenSSL binary |
| 35 |
interface to Perl code, such as pointers to C<SSL_CTX> structs. |
| 36 |
|
| 37 |
A debhelper addon is also provided. This makes it possible to just use |
| 38 |
|
| 39 |
#!/usr/bin/make -f |
| 40 |
%: |
| 41 |
dh $@ --with perl_openssl |
| 42 |
|
| 43 |
for F<debian/rules>. |
| 44 |
|
| 45 |
Alternatively, since perl-openssl-defaults/4 you can just build depend |
| 46 |
on B<dh-sequence-perl-openssl> and omit the C<--with perl_openssl> part. |
| 47 |
|
| 48 |
=head1 SEE ALSO |
| 49 |
|
| 50 |
L<debhelper(7)> |
| 51 |
|
| 52 |
L<http://bugs.debian.org/848113> |
| 53 |
|
| 54 |
=head1 COPYRIGHT AND LICENSE |
| 55 |
|
| 56 |
Based on I<dh_perl_dbi> in the I<libdbi-perl> package by Angar Buchardt. |
| 57 |
|
| 58 |
Copyright 2010, Ansgar Burchardt <[email protected]> |
| 59 |
|
| 60 |
Copyright 2016, Niko Tyni <[email protected]> |
| 61 |
|
| 62 |
This program is free software, you can redistribute it and/or modify it under |
| 63 |
the same terms as Perl itself. |