Commit cac0d352 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Added proper META.yml file

parent a3364cd1
# Copyright (C) 2008 Daniel Berrange <dan@berrange.com>
use strict;
use warnings;
die unless (scalar @ARGV == 1);
open SRC, "lib/Net/DBus.pm"
or die "lib/Net/DBus.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__
--- #YAML:1.0
name: Net-DBus
abstract: Extension for the DBus bindings
version: @VERSION@
author:
- Daniel P. Berrange <dan@berrange.com>
license: gpl
generated_by: ExtUtils::MakeMaker version 6.30
requires:
Time::HiRes: 0
XML::Twig: 0
build_requires:
Test::More: 0
Test::Pod: 0
Test::Pod::Coverage: 0
resources:
license: http://www.gnu.org/licenses/gpl.html
homepage: http://www.freedesktop.org/wiki/Software/dbus
repository: http://hg.berrange.com/libraries/net-dbus--devel
MailingList: http://lists.freedesktop.org/mailman/listinfo/dbus/
distribution_type: module
meta-spec:
version: 1.3
url: http://module-build.sourceforge.net/META-spec-v1.3.html
......@@ -30,6 +30,7 @@ WriteMakefile(
"-DDBUS_API_SUBJECT_TO_CHANGE -DHAVE_CONN_DISCONNECT=0 -DNET_DBUS_DEBUG=1" :
"-DDBUS_API_SUBJECT_TO_CHANGE -DHAVE_CONN_DISCONNECT=1 -DNET_DBUS_DEBUG=1"),
'INC' => "-Wall $DBUS_CFLAGS",
'NO_META' => 1,
'depend' => {
Net-DBus.spec => '$(VERSION_FROM)',
Makefile => '$(VERSION_FROM)',
......
......@@ -12,13 +12,12 @@ open SRC, "lib/Net/DBus.pm"
our $VERSION;
while (<SRC>) {
if (/$VERSION\s*=\s*'(.*)'/) {
if (/\$VERSION\s*=\s*'(.*)'/) {
$VERSION=$1;
}
}
close SRC;
local $/ = undef;
$_ = <DATA>;
s/\@VERSION\@/$VERSION/g;
......@@ -29,12 +28,6 @@ close SPEC;
__DATA__
# Automatically generated by DBus.spec.PL
%define debug_package %{nil}
%define perlvendorarch %(perl -e 'use Config; print $Config{installvendorarch}')
%define perlvendorlib %(perl -e 'use Config; print $Config{installvendorlib}')
%define perlvendorprefix %(perl -e 'use Config; print $Config{vendorprefix}')
%define perlvendorman3 %{perlvendorprefix}/share/man/man3
%define perlversion %(perl -e 'use Config; print $Config{version}')
%define appname Net-DBus
%define _extra_release %{?extra_release:%{extra_release}}
......@@ -43,19 +36,19 @@ Summary: Perl API to the DBus message system
Name: perl-%{appname}
Version: @VERSION@
Release: 1%{_extra_release}
License: GPL
Group: Applications/Internet
Source: %{appname}-%{version}.tar.gz
BuildRoot: /var/tmp/%{appname}-%{version}-root
#BuildArchitectures: noarch
Requires: perl = %{perlversion}
# For XML::Twig
Requires: perl(XML::Twig)
# For Time::HiRes
Requires: perl(Time::HiRes)
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 >= 0.33
BuildRequires: dbus-devel >= 0.33
BuildRequires: dbus-devel > 0.33
BuildRequires: perl(XML::Twig)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
%description
Provides a Perl API to the DBus message system
......@@ -66,28 +59,35 @@ Provides a Perl API to the DBus message system
%build
if [ -z "$DBUS_HOME" ]; then
perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor
%{__perl} Makefile.PL INSTALLDIRS=vendor
else
perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor DBUS_HOME=$DBUS_HOME
%{__perl} Makefile.PL INSTALLDIRS=vendor DBUS_HOME=$DBUS_HOME
fi
make
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install INSTALLVENDORMAN3DIR=$RPM_BUILD_ROOT%{perlvendorman3}
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 COPYING examples/*.pl
%{perlvendorman3}/*
%{perlvendorarch}/Net/DBus.pm
%{perlvendorarch}/Net/DBus/
%{perlvendorarch}/auto/Net/DBus
%doc README CHANGES AUTHORS LICENSE examples/*.pl
%{_mandir}/man3/*
%{perl_vendorarch}/Net/DBus.pm
%{perl_vendorarch}/Net/DBus/
%{perl_vendorarch}/auto/Net/DBus
%changelog
* Fri Jan 6 2006 Daniel Berrange <berrange@localhost.localdomain> - 0.33.1-1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment