1 |
# $Id: Ezmlm.spec,v 1.5 2016/04/21 04:21:38 unnilennium Exp $ |
2 |
# Authority: gordonr |
3 |
# Name: Gordon Rowell |
4 |
|
5 |
# |
6 |
# - Ezmlm - |
7 |
# This spec file was automatically generated by cpan2rpm [ver: 2.028] |
8 |
# The following arguments were used: |
9 |
# --make-no-test Ezmlm |
10 |
# For more information on cpan2rpm please visit: http://perl.arix.com/ |
11 |
# |
12 |
|
13 |
%define pkgname Ezmlm |
14 |
%define filelist %{pkgname}-%{version}-filelist |
15 |
%define NVR %{pkgname}-%{version}-%{release} |
16 |
%define maketest 0 |
17 |
|
18 |
name: perl-Ezmlm |
19 |
summary: Ezmlm - Object Methods for Ezmlm Mailing Lists |
20 |
version: 0.08 |
21 |
release: 4%{?dist} |
22 |
license: Artistic |
23 |
group: Applications/CPAN |
24 |
url: http://www.cpan.org |
25 |
buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n) |
26 |
buildarch: noarch |
27 |
prefix: %(echo %{_prefix}) |
28 |
source: http://search.cpan.org//CPAN/authors/id/S/SU/SUMPFRALL/Ezmlm-0.08.2.tar.gz |
29 |
Patch0: perl-Ezmlm-0.08-2-dirsubdir.patch |
30 |
Patch1: perl-Ezmlm-0.08-2-v722flags.patch |
31 |
Patch2: perl-Ezmlm-0.08-2-moreflagsv722.patch |
32 |
|
33 |
%description |
34 |
use Mail::Ezmlm; |
35 |
$list = new Mail::Ezmlm; |
36 |
|
37 |
The rest is a bit complicated for a Synopsis, see the description. |
38 |
|
39 |
# |
40 |
# This package was generated automatically with the cpan2rpm |
41 |
# utility. To get this software or for more information |
42 |
# please visit: http://perl.arix.com/ |
43 |
# |
44 |
|
45 |
%prep |
46 |
%setup -q -n %{pkgname}-%{version}.2 |
47 |
chmod -R u+w %{_builddir}/%{pkgname}-%{version}.2 |
48 |
%patch0 -p1 |
49 |
%patch1 -p1 |
50 |
%patch2 -p1 |
51 |
|
52 |
%build |
53 |
grep -rsl '^#!.*perl' . | |
54 |
grep -v '.bak$' |xargs --no-run-if-empty \ |
55 |
%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' |
56 |
CFLAGS="$RPM_OPT_FLAGS" |
57 |
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '` |
58 |
%{__make} |
59 |
%if %maketest |
60 |
%{__make} test |
61 |
%endif |
62 |
|
63 |
%install |
64 |
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
65 |
|
66 |
%{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '` |
67 |
|
68 |
cmd=/usr/share/spec-helper/compress_files |
69 |
[ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress |
70 |
[ -x $cmd ] && $cmd |
71 |
|
72 |
# SuSE Linux |
73 |
if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ] |
74 |
then |
75 |
%{__mkdir_p} %{buildroot}/var/adm/perl-modules |
76 |
%{__cat} `find %{buildroot} -name "perllocal.pod"` \ |
77 |
| %{__sed} -e s+%{buildroot}++g \ |
78 |
> %{buildroot}/var/adm/perl-modules/%{name} |
79 |
fi |
80 |
|
81 |
# remove special files |
82 |
find %{buildroot} -name "perllocal.pod" \ |
83 |
-o -name ".packlist" \ |
84 |
-o -name "*.bs" \ |
85 |
|xargs -i rm -f {} |
86 |
|
87 |
# no empty directories |
88 |
find %{buildroot}%{_prefix} \ |
89 |
-type d -depth \ |
90 |
-exec rmdir {} \; 2>/dev/null |
91 |
|
92 |
%{__perl} -MFile::Find -le ' |
93 |
find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}"); |
94 |
print "%doc Changes README"; |
95 |
for my $x (sort @dirs, @files) { |
96 |
push @ret, $x unless indirs($x); |
97 |
} |
98 |
print join "\n", sort @ret; |
99 |
|
100 |
sub wanted { |
101 |
return if /auto$/; |
102 |
|
103 |
local $_ = $File::Find::name; |
104 |
my $f = $_; s|^\Q%{buildroot}\E||; |
105 |
return unless length; |
106 |
return $files[@files] = $_ if -f $f; |
107 |
|
108 |
$d = $_; |
109 |
/\Q$d\E/ && return for reverse sort @INC; |
110 |
$d =~ /\Q$_\E/ && return |
111 |
for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|; |
112 |
|
113 |
$dirs[@dirs] = $_; |
114 |
} |
115 |
|
116 |
sub indirs { |
117 |
my $x = shift; |
118 |
$x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs; |
119 |
} |
120 |
' > %filelist |
121 |
|
122 |
[ -z %filelist ] && { |
123 |
echo "ERROR: empty %files listing" |
124 |
exit -1 |
125 |
} |
126 |
|
127 |
%clean |
128 |
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
129 |
|
130 |
%files -f %filelist |
131 |
%defattr(-,root,root) |
132 |
|
133 |
%changelog |
134 |
* Thu Apr 21 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.08-4.sme |
135 |
- updated available flags in 7.2.2 [SME: 9470] |
136 |
|
137 |
* Wed Apr 20 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.08.2-3.sme |
138 |
- fix bad syntax for calling ezmlm-* fucntion with subdir [SME: 9470] |
139 |
- added ability to get config tag from v7.2.2 ml |
140 |
|
141 |
* Tue Apr 19 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.08-2.sme |
142 |
- update to 0.08.2 |
143 |
|
144 |
* Wed Apr 23 2008 Shad L. Lords <slords@mail.com> 0.07-2.sme |
145 |
- Initial build. |