File: Config-Record.spec.PL

package info (click to toggle)
libconfig-record-perl 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 212 kB
  • ctags: 14
  • sloc: perl: 516; sh: 34; makefile: 2
file content (77 lines) | stat: -rw-r--r-- 1,902 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
# Copyright (C) 2001-2004 Daniel Berrange <dan@berrange.com>
#
# $Id: Config-Record.spec.PL,v 1.8 2006/01/27 16:25:50 dan Exp $

use strict;
use warnings;

die unless (scalar @ARGV == 1);

unless (do 'lib/Config/Record.pm')
  {
    if ($@) { die $@ };
    die "lib/Config/Record.pm: $!";
  }

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

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

%define appname Config-Record

# This macro is used for the continuous automated builds. It just
# allows an extra fragment based on the timestamp to be appended
# to the release. This distinguishes automated builds, from formal
# Fedora RPM builds
%define _extra_release %{?dist:%{dist}}%{?extra_release:%{extra_release}}


Summary: Config::Record - Simple configuration records
Name: perl-%{appname}
Version: @VERSION@
Release: 1%{_extra_release}
License: GPLv2+
Group: Applications/Internet
Source: http://www.cpan.org/authors/id/D/DA/DANBERR/%{appname}-%{version}.tar.gz
BuildRoot: /var/tmp/%{appname}-%{version}-root
BuildArchitectures: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
Config::Record provides a module for loading configuration
records. It supports scalar, array and hash parameters nested
to an arbitrary depth.

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


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%__make \

%install
rm -rf $RPM_BUILD_ROOT
%__make 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 {} \;

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS LICENSE README CHANGES
%{perl_vendorlib}/Config/Record.pm
%{perl_vendorlib}/Config/Record.pod
%{_mandir}/man3/Config::Record.3pm*