1 # Use: perl Makefile.PL OPTIMIZE="-O0 -g -Wdeclaration-after-statement"
2 # or: perl Makefile.PL PREFIX=/home/mike/universe
5 use ExtUtils::MakeMaker;
8 my $yazconf = "yaz-config";
9 my $yazver = `$yazconf --version`;
10 my $yazinc = `$yazconf --cflags threads`;
11 my $yazlibs = `$yazconf --libs threads`;
12 if (!$yazver || !$yazinc || !$yazlibs) {
14 ERROR: Unable to call script: yaz-config
15 If you are using a YAZ installation from the Debian package "yaz", you
16 will also need to install "libyaz-dev" in order to build this module.
21 check_version($yazver, "4.0.0");
24 # $yazinc = '-Ic:\yaz\include';
25 # $yazlibs = 'c:\yaz\lib\yaz.lib';
27 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
28 # the contents of the Makefile that is written.
30 NAME => 'Net::Z3950::ZOOM',
31 VERSION_FROM => 'lib/Net/Z3950/ZOOM.pm', # finds $VERSION
32 PREREQ_PM => { "MARC::Record" => 1.38 },
33 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
34 (ABSTRACT_FROM => 'lib/Net/Z3950/ZOOM.pm', # retrieve abstract from module
35 AUTHOR => 'Mike Taylor <mike@>') : ()),
36 LIBS => [ $yazlibs ], # e.g., '-lm'
37 DEFINE => '', # e.g., '-DHAVE_SOMETHING'
38 # Insert -I. if you add *.h files later:
39 INC => $yazinc, # e.g., '-I/usr/include/other'
40 # Un-comment this if you add C files to link with later:
41 # OBJECT => '$(O_FILES)', # link all the C files too
42 # Use this to test for illegal code that GCC stupidly permits by default:
43 # OPTIMIZE => "-Wdeclaration-after-statement -g -O0",
44 EXE_FILES => [ 'samples/zoom/zselect', 'samples/zoom/zoomdump',
45 'samples/zoom/zoom-delete-records' ],
52 my($gmajor, $gminor, $gtrivial) = ($got =~ /(\d+)\.(\d+)\.(\d+)/);
53 my($wmajor, $wminor, $wtrivial) = ($want =~ /(\d+)\.(\d+)\.(\d+)/);
54 if (($gmajor < $wmajor) ||
55 ($gmajor == $wmajor && $gminor < $wminor) ||
56 ($gmajor == $wmajor && $gminor == $wminor && $gtrivial < $wtrivial)) {
59 ZOOM-Perl requires at least version $want of YAZ,
60 but you only have version $got.
66 sub MY::postamble { "debian: debian/output
69 dpkg-buildpackage -us -uc -rfakeroot -d
72 mv ../libnet-z3950-zoom-perl* debian/output
75 rm -rf debian/libnet-z3950-zoom-perl debian/output