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 my $DBUS_LIBS = `pkg-config --libs dbus-1`;
7 my $DBUS_CFLAGS = `pkg-config --cflags dbus-1`;
9 if (!defined $DBUS_LIBS || !defined DBUS_CFLAGS) {
10 die "could not run 'pkg-config' to determine compiler/linker flags for dbus library: $!\n";
12 if (!$DBUS_LIBS || !$DBUS_CFLAGS) {
13 die "'pkg-config' didn't report any compiler/linker flags for dbus library\n";
22 'NAME' => 'Net::DBus',
23 'VERSION_FROM' => 'lib/Net/DBus.pm',
29 'AUTHOR' => 'Daniel Berrange <dan@berrange.com>',
30 'LIBS' => [$DBUS_LIBS],
31 'DEFINE' => ("-DNET_DBUS_DEBUG=1"),
32 'INC' => "$wall $DBUS_CFLAGS",
35 Net-DBus.spec => '$(VERSION_FROM)',
36 Makefile => '$(VERSION_FROM)',
39 FILES => 'Net-DBus.spec',
47 my ($self, $path) = @_;
48 ($path =~ /\~$/ || $path =~ m,/CVS/,) ? undef : $path;