File: Makefile.PL

package info (click to toggle)
libnet-dbus-perl 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 720 kB
  • sloc: perl: 4,919; sh: 34; makefile: 6
file content (51 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use 5.006;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

my $DBUS_LIBS = `pkg-config --libs dbus-1`;
my $DBUS_CFLAGS = `pkg-config --cflags dbus-1`;

if (!defined $DBUS_LIBS || !defined DBUS_CFLAGS) {
    die "could not run 'pkg-config' to determine compiler/linker flags for dbus library: $!\n";
}
if (!$DBUS_LIBS || !$DBUS_CFLAGS) {
    die "'pkg-config' didn't report any compiler/linker flags for dbus library\n";
}

my $wall = "";
if ($^O eq "linux") {
    $wall = "-Wall";
}

WriteMakefile(
	      'NAME' => 'Net::DBus',
	      'VERSION_FROM' => 'lib/Net/DBus.pm',
	      'PREREQ_PM' => {
		  'Test::More'  => 0,
		  'Time::HiRes' => 0,
		  'XML::Twig' => 0,
		  },
	      'AUTHOR' => 'Daniel Berrange <dan@berrange.com>',
	      'LIBS' => [$DBUS_LIBS],
	      'DEFINE' => ("-DNET_DBUS_DEBUG=1"),
	      'INC' => "$wall $DBUS_CFLAGS",
              'NO_META' => 1,
	      'depend' => {
		  Net-DBus.spec => '$(VERSION_FROM)',
		  Makefile => '$(VERSION_FROM)',
	      },
	      'realclean' => {
		  FILES => 'Net-DBus.spec',
	      },
);

package MY;

sub libscan
  {
    my ($self, $path) = @_;
    ($path =~ /\~$/ || $path =~ m,/CVS/,) ? undef : $path;
  }

__END__