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

Annotation of /rpms/perl-Mail-Ezmlm-Archive/contribs10/Mail-Ezmlm-Archive.spec

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


Revision 1.2 - (hide annotations) (download)
Tue Mar 15 20:07:46 2022 UTC (2 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: perl-Mail-Ezmlm-Archive-0_16-1_el7_sme, HEAD
Changes since 1.1: +2 -1 lines
* Mon Dec 3 2007 root@servidor
- Initial build.

1 jpp 1.2 # $Id: Mail-Ezmlm-Archive.spec,v 1.1 2022/03/15 20:03:25 jpp Exp $
2 jpp 1.1 # 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 jpp 1.2 BuildRequires: perl-devel
22 jpp 1.1
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     - Initial build.

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