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