2 use ExtUtils::MakeMaker;
3 use ExtUtils::PkgConfig;
6 my %openssl_info = ExtUtils::PkgConfig->find(qw/ eopenssl openssl /);
7 die "OpenSSL must be v1.0 or higher" unless ExtUtils::PkgConfig->atleast_version('openssl', '1.0');
9 my $libpath = ExtUtils::PkgConfig->libs_only_L($openssl_info{pkg});
11 # If this is not set, non-default paths such as eopenssl's are not found on OpenBSD
12 $ENV{LD_LIBRARY_PATH} //= '';
13 $ENV{LD_LIBRARY_PATH} .= ':' if length $ENV{LD_LIBRARY_PATH};
14 $ENV{LD_LIBRARY_PATH} .= $libpath;
18 header => 'openssl/ssl.h',
23 if(!(ctx = SSL_CTX_new(SSLv23_client_method()))) return 1;
24 SSL_CTX_set_psk_client_callback(ctx, (unsigned int (*)(SSL*,const char*,char*,unsigned int,unsigned char*,unsigned int))NULL);
29 ERROR: your OpenSSL implementation does not include RFC4279 pre-shared key
30 functions, so NSCA-ng will not work. If this is LibreSSL, you probably have
31 a package called `eopenssl' that installs the original OpenSSL.
37 NAME => 'Net::NSCAng::Client',
38 VERSION_FROM => 'lib/Net/NSCAng/Client.pm',
39 MIN_PERL_VERSION => '5.10.1',
41 CONFIGURE_REQUIRES => {
42 'ExtUtils::MakeMaker' => 6.52,
43 'ExtUtils::PkgConfig' => 0,
44 'Devel::CheckLib' => 0,
48 'Test::Exception' => 0,
51 'Test::CheckManifest' => 0,
53 ABSTRACT_FROM => 'lib/Net/NSCAng/Client.pm', # retrieve abstract from module
54 AUTHOR => 'Matthias Bethke <matthias@towiski.de>',
56 LIBS => [ ExtUtils::PkgConfig->libs($openssl_info{pkg}) ],
59 OBJECT => '$(O_FILES)',
63 url => 'git@github.com:mbethke/nsca-ng.git',
64 web => 'https://github.com/mbethke/nsca-ng/tree/perl-module/perl',
67 dist => { COMPRESS => 'bzip2', SUFFIX => 'bz2', },
68 clean => { FILES => 'Net-NSCAng-Client-*' },