/[smeserver]/rpms/perl-Test-Inline/sme7/Test-Inline.spec
ViewVC logotype

Contents of /rpms/perl-Test-Inline/sme7/Test-Inline.spec

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


Revision 1.1 - (show annotations) (download)
Tue Jun 12 17:03:36 2007 UTC (17 years, 4 months ago) by slords
Branch: MAIN
CVS Tags: perl-Test-Inline-0_16-1_el4_sme
Import on branch sme7 of package perl-Test-Inline-0.16-1.el4.sme.src.rpm

1 #
2 # - Test::Inline -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.026]
4 # The following arguments were used:
5 # --release=1centos Test::Inline
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
7 #
8 %define pkgname Test-Inline
9 %define filelist %{pkgname}-%{version}-filelist
10 %define NVR %{pkgname}-%{version}-%{release}
11 %define maketest 1
12
13 name: perl-Test-Inline
14 summary: Test-Inline - Inlining your tests next to the code being tested.
15 version: 0.16
16 release: 1%{?dist}
17 license: Artistic
18 group: Applications/CPAN
19 url: http://www.cpan.org
20 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
21 buildarch: noarch
22 prefix: %(echo %{_prefix})
23 source: http://search.cpan.org/dist/M/MS/MSCHWERN/Test-Inline-0.16.tar.gz
24
25 %description
26 B<LOOK AT Test::Inline::Tutorial FIRST!>
27
28 Embedding tests allows tests to be placed near the code its testing.
29 This is a nice supplement to the traditional .t files. It's like
30 XUnit, Perl-style.
31
32 Test::Tutorial is just documentation. To actually get anything done
33 you use pod2test. Read the Test::Inline::Tutoral, really.
34
35 A test is denoted using either "=for testing" or a "=begin/end
36 testing" block.
37
38 =item B<is_pirate>
39
40 @pirates = is_pirate(@arrrgs);
41
42 Go through @arrrgs and return a list of pirates.
43
44 =begin testing
45
46 my @p = is_pirate('Blargbeard', 'Alfonse', 'Capt. Hampton', 'Wesley');
47 ok(@p == 2);
48
49 =end testing
50
51 #
52 # This package was generated automatically with the cpan2rpm
53 # utility. To get this software or for more information
54 # please visit: http://perl.arix.com/
55 #
56
57 %prep
58 %setup -q -n %{pkgname}-%{version}
59 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
60
61 %build
62 grep -rsl '^#!.*perl' . |
63 grep -v '.bak$' |xargs --no-run-if-empty \
64 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
65 CFLAGS="$RPM_OPT_FLAGS"
66 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
67 %{__make}
68 %if %maketest
69 %{__make} test
70 %endif
71
72 %install
73 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
74
75 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
76
77 [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
78
79 # SuSE Linux
80 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
81 then
82 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
83 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
84 | %{__sed} -e s+%{buildroot}++g \
85 > %{buildroot}/var/adm/perl-modules/%{name}
86 fi
87
88 # remove special files
89 find %{buildroot} -name "perllocal.pod" \
90 -o -name ".packlist" \
91 -o -name "*.bs" \
92 |xargs -i rm -f {}
93
94 # no empty directories
95 find %{buildroot}%{_prefix} \
96 -type d -depth \
97 -exec rmdir {} \; 2>/dev/null
98
99 %{__perl} -MFile::Find -le '
100 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
101 print "%doc bin Changes docs";
102 for my $x (sort @dirs, @files) {
103 push @ret, $x unless indirs($x);
104 }
105 print join "\n", sort @ret;
106
107 sub wanted {
108 return if /auto$/;
109
110 local $_ = $File::Find::name;
111 my $f = $_; s|^\Q%{buildroot}\E||;
112 return unless length;
113 return $files[@files] = $_ if -f $f;
114
115 $d = $_;
116 /\Q$d\E/ && return for reverse sort @INC;
117 $d =~ /\Q$_\E/ && return
118 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
119
120 $dirs[@dirs] = $_;
121 }
122
123 sub indirs {
124 my $x = shift;
125 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
126 }
127 ' > %filelist
128
129 [ -z %filelist ] && {
130 echo "ERROR: empty %files listing"
131 exit -1
132 }
133
134 %clean
135 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
136
137 %files -f %filelist
138 %defattr(-,root,root)
139
140 %changelog
141 * Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
142 - Clean up spec so package can be built by koji/plague
143
144 * Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
145 - Update to new release naming. No functional changes.
146 - Make Packager generic
147
148 * Thu Sep 2 2004 charlieb@charlieb-centos
149 - Initial build.

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