Imported Upstream version 1.0.0
[platform/upstream/perl-Net-DBus.git] / Makefile.PL
1 use 5.006;
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
6 my $DBUS_LIBS = `pkg-config --libs dbus-1`;
7 my $DBUS_CFLAGS = `pkg-config --cflags dbus-1`;
8
9 if (!defined $DBUS_LIBS || !defined DBUS_CFLAGS) {
10     die "could not run 'pkg-config' to determine compiler/linker flags for dbus library: $!\n";
11 }
12 if (!$DBUS_LIBS || !$DBUS_CFLAGS) {
13     die "'pkg-config' didn't report any compiler/linker flags for dbus library\n";
14 }
15
16 my $wall = "";
17 if ($^O eq "linux") {
18     $wall = "-Wall";
19 }
20
21 WriteMakefile(
22               'NAME' => 'Net::DBus',
23               'VERSION_FROM' => 'lib/Net/DBus.pm',
24               'PREREQ_PM' => {
25                   'Test::More'  => 0,
26                   'Time::HiRes' => 0,
27                   'XML::Twig' => 0,
28                   },
29               'AUTHOR' => 'Daniel Berrange <dan@berrange.com>',
30               'LIBS' => [$DBUS_LIBS],
31               'DEFINE' => ("-DNET_DBUS_DEBUG=1"),
32               'INC' => "$wall $DBUS_CFLAGS",
33               'NO_META' => 1,
34               'depend' => {
35                   Net-DBus.spec => '$(VERSION_FROM)',
36                   Makefile => '$(VERSION_FROM)',
37               },
38               'realclean' => {
39                   FILES => 'Net-DBus.spec',
40               },
41 );
42
43 package MY;
44
45 sub libscan
46   {
47     my ($self, $path) = @_;
48     ($path =~ /\~$/ || $path =~ m,/CVS/,) ? undef : $path;
49   }
50
51 __END__