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

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

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


Revision 1.2 - (hide annotations) (download)
Wed Apr 9 13:51:54 2008 UTC (16 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -0 lines
Add Id to top of spec

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

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