/[smeserver]/rpms/perl-Struct-Compare/sme10/Struct-Compare.spec
ViewVC logotype

Contents of /rpms/perl-Struct-Compare/sme10/Struct-Compare.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Feb 4 13:17:13 2016 UTC (8 years, 8 months ago) by vip-ire
Branch: MAIN
CVS Tags: perl-Struct-Compare-1_0_1-1, HEAD
sme10 branch

1 #
2 # - Struct::Compare -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.028]
4 # The following arguments were used:
5 # --spec-only Struct::Compare
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
7 #
8
9 %define pkgname Struct-Compare
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
13
14 name: perl-Struct-Compare
15 summary: Struct-Compare - Recursive diff for perl structures.
16 version: 1.0.1
17 release: 1
18 vendor: Ryan Davis <ryand-cmp@zenspider.com>
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
21 group: Applications/CPAN
22 url: http://www.cpan.org
23 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
24 buildarch: noarch
25 prefix: %(echo %{_prefix})
26 source: http://search.cpan.org//CPAN/authors/id/Z/ZE/ZENSPIDER/Struct-Compare-1.0.1.tar.gz
27
28 BuildRequires: perl(ExtUtils::MakeMaker)
29
30 %description
31 Compares two values of any type and structure and returns true if they
32 are the same. It does a deep comparison of the structures, so a hash
33 of a hash of a whatever will be compared correctly.
34
35 This is especially useful for writing unit tests for your modules!
36
37 #
38 # This package was generated automatically with the cpan2rpm
39 # utility. To get this software or for more information
40 # please visit: http://perl.arix.com/
41 #
42
43 %prep
44 %setup -q -n %{pkgname}-%{version}
45 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
46
47 %build
48 grep -rsl '^#!.*perl' . |
49 grep -v '.bak$' |xargs --no-run-if-empty \
50 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
51 CFLAGS="$RPM_OPT_FLAGS"
52 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
53 %{__make}
54 %if %maketest
55 %{__make} test
56 %endif
57
58 %install
59 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
60
61 %{makeinstall} INSTALLDIR=vendor `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
62
63 cmd=/usr/share/spec-helper/compress_files
64 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
65 [ -x $cmd ] && $cmd
66
67 # SuSE Linux
68 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
69 then
70 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
71 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
72 | %{__sed} -e s+%{buildroot}++g \
73 > %{buildroot}/var/adm/perl-modules/%{name}
74 fi
75
76 # remove special files
77 find %{buildroot} -name "perllocal.pod" \
78 -o -name ".packlist" \
79 -o -name "*.bs" \
80 |xargs -i rm -f {}
81
82 # no empty directories
83 find %{buildroot}%{_prefix} \
84 -type d -depth \
85 -exec rmdir {} \; 2>/dev/null
86
87 %{__perl} -MFile::Find -le '
88 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
89 print "%doc Changes";
90 for my $x (sort @dirs, @files) {
91 push @ret, $x unless indirs($x);
92 }
93 print join "\n", sort @ret;
94
95 sub wanted {
96 return if /auto$/;
97
98 local $_ = $File::Find::name;
99 my $f = $_; s|^\Q%{buildroot}\E||;
100 return unless length;
101 return $files[@files] = $_ if -f $f;
102
103 $d = $_;
104 /\Q$d\E/ && return for reverse sort @INC;
105 $d =~ /\Q$_\E/ && return
106 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
107
108 $dirs[@dirs] = $_;
109 }
110
111 sub indirs {
112 my $x = shift;
113 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
114 }
115 ' > %filelist
116
117 [ -z %filelist ] && {
118 echo "ERROR: empty %files listing"
119 exit -1
120 }
121
122 %clean
123 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
124
125 %files -f %filelist
126 %defattr(-,root,root)
127
128 %changelog
129 * Thu Dec 12 2013 <daniel@firewall-services.com> 1.0.1-1
130 - Initial build.

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed