Add auth bits to Blerg::Database
[blerg.git] / lib / perl / Blerg-Database / Makefile.PL
1 use 5.008000;
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.
5 WriteMakefile(
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'
16         # Un-comment this if you add C files to link with later:
17     # OBJECT            => '$(O_FILES)', # link all the C files too
18 );
19 if  (eval {require ExtUtils::Constant; 1}) {
20   # If you edit these definitions to change the constants used by this module,
21   # you will need to use the generated const-c.inc and const-xs.inc
22   # files to replace their "fallback" counterparts before distributing your
23   # changes.
24   my @names = (qw(RECORDS_PER_SEGMENT MAX_RECORD_SIZE MAX_TAG_LENGTH MAX_TAGS_PER_RECORD),
25     {name => 'BASEURL', type => 'PV'},
26     {name => 'DATA_PATH', type => 'PV'},
27     {name => 'HASH_TAGS_PATH', type => 'PV'},
28     {name => 'REF_TAGS_PATH', type => 'PV'},
29   );
30   ExtUtils::Constant::WriteConstants(
31                                      NAME         => 'Blerg::Database',
32                                      NAMES        => \@names,
33                                      DEFAULT_TYPE => 'IV',
34                                      C_FILE       => 'const-c.inc',
35                                      XS_FILE      => 'const-xs.inc',
36                                   );
37
38 }
39 else {
40   use File::Copy;
41   use File::Spec;
42   foreach my $file ('const-c.inc', 'const-xs.inc') {
43     my $fallback = File::Spec->catfile('fallback', $file);
44     copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
45   }
46 }