summaryrefslogtreecommitdiff
path: root/packaging/perl-Variable-Magic.spec
blob: 0548070657e8868198a25d832a6fbb88544ade87 (plain)
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
Name:           perl-Variable-Magic
Version:        0.63
Release:        1
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Associate user-defined magic to variables from Perl.
Url:            https://metacpan.org/pod/Variable::Magic
Group:          Development/Libraries
Source0:        %{name}-%{version}.tar.gz
Source1001: 	perl-Variable-Magic.manifest
BuildRequires:  perl
BuildRequires:  perl(MIME::Base64)
BuildArch:      noarch

%description
Magic is Perl's way of enhancing variables. This mechanism 
lets the user add extra data to any variable and hook 
syntactical operations (such as access, assignment or destruction) 
that can be applied to it. With this module, you can add 
your own magic to any variable without having to write a single line of XS.

You'll realize that these magic variables look a lot like tied variables. 
It is not surprising, as tied variables are implemented as a special 
kind of magic, just like any 'irregular' Perl variable : scalars like $!, 
$( or $^W, the %ENV and %SIG hashes, the @ISA array, vec() and substr() 
lvalues, threads::shared variables... They all share the same underlying 
C API, and this module gives you direct access to it.

%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1001} .

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
%perl_make_install
##perl_process_packlist
{
#!/bin/bash
if test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT%perl_vendorarch/auto; then
 find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm
  if [ %{_target_cpu} == noarch ]; then
   find $RPM_BUILD_ROOT%perl_vendorarch/auto -depth -type d -print0 | xargs -0 -r rm -rf
  fi
fi
rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
}

%perl_gen_filelist

%files -f %{name}.files
%license README