/[smecontribs]/rpms/perl-Mail-Ezmlm-Archive/contribs7/Mail-Ezmlm-Archive.spec
ViewVC logotype

Contents of /rpms/perl-Mail-Ezmlm-Archive/contribs7/Mail-Ezmlm-Archive.spec

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


Revision 1.7 - (show annotations) (download)
Tue Nov 25 16:20:14 2008 UTC (15 years, 11 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +0 -0 lines
Restore

1 # $Id: Mail-Ezmlm-Archive.spec,v 1.5 2008/04/23 19:18:54 slords Exp $
2 # Authority: picsone
3 # Name: Normando Hall
4
5 %define pkgname Mail-Ezmlm-Archive
6 %define filelist %{pkgname}-%{version}-filelist
7 %define NVR %{pkgname}-%{version}-%{release}
8 %define maketest 1
9
10 name: perl-Mail-Ezmlm-Archive
11 summary: Mail-Ezmlm-Archive - Object methods for ezmlm-idx archives
12 version: 0.16
13 release: 1%{?dist}
14 license: Artistic
15 group: Applications/CPAN
16 url: http://www.cpan.org
17 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
18 buildarch: noarch
19 prefix: %(echo %{_prefix})
20 source: http://search.cpan.org/CPAN/authors/id/A/AA/AAR/Mail-Ezmlm-Archive-0.16.tar.gz
21
22 %description
23 None.
24
25 #
26 # This package was generated automatically with the cpan2rpm
27 # utility. To get this software or for more information
28 # please visit: http://perl.arix.com/
29 #
30
31 %prep
32 %setup -q -n %{pkgname}-%{version}
33 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
34
35 %build
36 grep -rsl '^#!.*perl' . |
37 grep -v '.bak$' |xargs --no-run-if-empty \
38 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
39 CFLAGS="$RPM_OPT_FLAGS"
40 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
41 %{__make}
42 %if %maketest
43 %{__make} test
44 %endif
45
46 %install
47 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
48
49 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
50
51 cmd=/usr/share/spec-helper/compress_files
52 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
53 [ -x $cmd ] && $cmd
54
55 # SuSE Linux
56 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
57 then
58 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
59 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
60 | %{__sed} -e s+%{buildroot}++g \
61 > %{buildroot}/var/adm/perl-modules/%{name}
62 fi
63
64 # remove special files
65 find %{buildroot} -name "perllocal.pod" \
66 -o -name ".packlist" \
67 -o -name "*.bs" \
68 |xargs -i rm -f {}
69
70 # no empty directories
71 find %{buildroot}%{_prefix} \
72 -type d -depth \
73 -exec rmdir {} \; 2>/dev/null
74
75 %{__perl} -MFile::Find -le '
76 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
77 print "%doc README";
78 for my $x (sort @dirs, @files) {
79 push @ret, $x unless indirs($x);
80 }
81 print join "\n", sort @ret;
82
83 sub wanted {
84 return if /auto$/;
85
86 local $_ = $File::Find::name;
87 my $f = $_; s|^\Q%{buildroot}\E||;
88 return unless length;
89 return $files[@files] = $_ if -f $f;
90
91 $d = $_;
92 /\Q$d\E/ && return for reverse sort @INC;
93 $d =~ /\Q$_\E/ && return
94 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
95
96 $dirs[@dirs] = $_;
97 }
98
99 sub indirs {
100 my $x = shift;
101 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
102 }
103 ' > %filelist
104
105 [ -z %filelist ] && {
106 echo "ERROR: empty %files listing"
107 exit -1
108 }
109
110 %clean
111 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
112
113 %files -f %filelist
114 %defattr(-,root,root)
115
116 %changelog
117 * Mon Dec 3 2007 root@servidor
118 - Initial build.

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