File: Makefile.PL

package info (click to toggle)
libnet-dbus-glib-perl 0.33.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 152 kB
  • sloc: perl: 85; sh: 34; makefile: 3
file content (44 lines) | stat: -rw-r--r-- 1,146 bytes parent folder | download | duplicates (3)
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
use 5.006;
use ExtUtils::MakeMaker;

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

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

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

package MY;

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

__END__