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

Annotation 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.4 - (hide annotations) (download)
Wed Apr 2 15:03:55 2008 UTC (16 years, 8 months ago) by slords
Branch: MAIN
Changes since 1.3: +3 -7 lines
Add Id, Authority, Name

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

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