-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
60 lines (56 loc) · 1.85 KB
/
Makefile.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use 5.008;
use strict;
use warnings;
use ExtUtils::MakeMaker;
use ExtUtils::PkgConfig;
# Check if we have libftdi installed
my %lftdi_cfg;
eval {
%lftdi_cfg = ExtUtils::PkgConfig->find(qw( libftdi libftdi1 ));
};
if ( my $err = $@ ) {
warn $err;
exit 0;
}
WriteMakefile(
NAME => 'Device::FTDI',
AUTHOR => 'Paul "LeoNerd" Evans <[email protected]>',
VERSION_FROM => 'lib/Device/FTDI.pm',
ABSTRACT => 'use USB-attached serial interface chips from FTDI',
INC => $lftdi_cfg{cflags},
LIBS => [ $lftdi_cfg{libs} ],
( $ExtUtils::MakeMaker::VERSION >= 6.3002
? ( 'LICENSE' => 'perl' )
: () ),
PL_FILES => {},
PREREQ_PM => {
'Device::Chip::Adapter' => '0.02',
'Device::Chip::ProtocolBase::SPI' => 0,
'Future' => 0,
'Test::More' => 0,
'Test::HexString' => 0,
},
CONFIGURE_REQUIRES => { 'ExtUtils::PkgConfig' => 0, },
BUILD_REQUIRES => { 'Test::More' => 0.94, },
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Device-FTDI-*' },
depend => { 'FTDI.c' => 'const_xs.inc' },
META_MERGE => {
resources => {
homepage => 'https://github.com/leonerd/perl-Device-FTDI',
bugtracker => 'https://github.com/leonerd/perl-Device-FTDI/issues',
repository => 'git://github.com/leonerd/perl-Device-FTDI',
license => 'http://dev.perl.org/licenses/',
},
x_contributors => [
'Pavel Shaydo <[email protected]>',
'Paul "LeoNerd" Evans <[email protected]>',
],
},
);
sub MY::postamble {
return <<CONST;
const_xs.inc : util/generate_const.pl
\t$^X util/generate_const.pl
CONST
}