File: Net-DBus-GLib.spec.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 (93 lines) | stat: -rw-r--r-- 2,125 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- rpm-spec -*-
# Copyright (C) 2004-2008 Daniel Berrange <dan@berrange.com>

use strict;
use warnings;

die unless (scalar @ARGV == 1);

open SRC, "lib/Net/DBus/GLib.pm"
    or die "lib/Net/DBus/GLib.pm: $!";

our $VERSION;
while (<SRC>) {
    if (/\$VERSION\s*=\s*'(.*)'/) {
	$VERSION=$1;
    }
}
close SRC;

local $/ = undef;
$_ = <DATA>;
s/\@VERSION\@/$VERSION/g;

open SPEC, ">$ARGV[0]" or die "$!";
print SPEC $_;
close SPEC;
__DATA__
# Automatically generated by Net-DBus-GLib.spec.PL


%define appname Net-DBus-GLib
%define _extra_release %{?extra_release:%{extra_release}}

Summary: Perl API to the DBus GLib extensions
Name: perl-%{appname}
Version: @VERSION@
Release: 1%{_extra_release}
License: GPLv2+ or Artistic
Group: Development/Libraries
URL:            http://search.cpan.org/dist/%{appname}
Source0:        http://www.cpan.org/modules/by-module/Net/%{appname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: dbus-glib >= 0.33
BuildRequires: dbus-glib-devel >= 0.33
BuildRequires: perl(Net::DBus)
BuildRequires: perl(Glib)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::Pod::Coverage)

%description
Provides a Perl API to the DBus GLib extensions

%prep
%setup -q -n %{appname}-%{version}


%build
if [ -z "$DBUS_HOME" ]; then
  %{__perl} Makefile.PL INSTALLDIRS=vendor
else
  %{__perl} Makefile.PL INSTALLDIRS=vendor DBUS_HOME=$DBUS_HOME
fi
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -name perllocal.pod -exec rm -f {} \;
find $RPM_BUILD_ROOT -name .packlist -exec rm -f {} \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc README CHANGES AUTHORS LICENSE examples/*.pl
%{_mandir}/man3/*
%{perl_vendorarch}/Net/DBus/GLib.pm
%{perl_vendorarch}/auto/Net/DBus/GLib

%changelog
* Mon Jan  7 2008 Daniel P. Berrange <dan@berrange.com> - 0.33.0-1
- Initial build