2 use ExtUtils::MakeMaker;
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
6 NAME => 'Blerg::Database',
7 VERSION_FROM => 'lib/Blerg/Database.pm', # finds $VERSION
8 PREREQ_PM => {}, # e.g., Module::Name => 1.1
9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
10 (ABSTRACT_FROM => 'lib/Blerg/Database.pm', # retrieve abstract from module
11 AUTHOR => 'Chip Black <bytex64@bytex64.net>') : ()),
12 LIBS => [''], # e.g., '-lm'
13 OBJECT => '$(BASEEXT)$(OBJ_EXT) ../../../blerg.a ../../../blerg_auth.a ../../../builddeps/scrypt.a',
14 DEFINE => '', # e.g., '-DHAVE_SOMETHING'
15 INC => '-I../../..', # e.g., '-I. -I/usr/include/other'
17 if (eval {require ExtUtils::Constant; 1}) {
18 # If you edit these definitions to change the constants used by this module,
19 # you will need to use the generated const-c.inc and const-xs.inc
20 # files to replace their "fallback" counterparts before distributing your
22 my @names = (qw(RECORDS_PER_SEGMENT MAX_RECORD_SIZE MAX_TAG_LENGTH MAX_TAGS_PER_RECORD BLERGSTATUS_MUTED BLERGSTATUS_MENTIONED),
23 {name => 'BASEURL', type => 'PV'},
24 {name => 'DATA_PATH', type => 'PV'},
25 {name => 'HASH_TAGS_PATH', type => 'PV'},
26 {name => 'REF_TAGS_PATH', type => 'PV'},
28 ExtUtils::Constant::WriteConstants(
29 NAME => 'Blerg::Database',
32 C_FILE => 'const-c.inc',
33 XS_FILE => 'const-xs.inc',
41 foreach my $file ('const-c.inc', 'const-xs.inc') {
42 my $fallback = File::Spec->catfile('fallback', $file);
43 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";