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