/[smeserver]/rpms/perl-Email-Sender/sme10/Email-Sender.spec
ViewVC logotype

Contents of /rpms/perl-Email-Sender/sme10/Email-Sender.spec

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


Revision 1.1 - (show annotations) (download)
Tue Dec 7 17:33:31 2021 UTC (2 years, 10 months ago) by jcrisp
Branch: MAIN
CVS Tags: perl-Email-Sender-1_300036-1, HEAD
Import perl-Email-Sender

1 %define pkgname Email-Sender
2 %define filelist %{pkgname}-%{version}-filelist
3 %define NVR %{pkgname}-%{version}-%{release}
4 %define maketest 0
5
6 name: perl-Email-Sender
7 summary: Email-Sender - a library for sending email
8 version: 1.300036
9 release: 1
10 vendor: Ricardo Signes <rjbs@cpan.org>
11 packager: Arix International <cpan2rpm@arix.com>
12 license: Artistic
13 group: Applications/CPAN
14 url: http://www.cpan.org
15 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
16 buildarch: noarch
17 prefix: %(echo %{_prefix})
18 source: http://search.cpan.org//CPAN/authors/id/R/RJ/RJBS/Email-Sender-1.300036.tar.gz
19 Patch1: Email-Sender-makefile.patch
20
21 BuildRequires: perl(ExtUtils::MakeMaker)
22
23 %description
24 Email::Sender - a library for sending email
25 Email::Sender replaces the old and sometimes problematic Email::Send library,
26 which did a decent job at handling very simple email sending tasks,
27 but was not suitable for serious use, for a variety of reasons.
28
29 #
30 # This package was generated automatically with the cpan2rpm
31 # utility. To get this software or for more information
32 # please visit: http://perl.arix.com/
33 #
34
35 %prep
36 %setup -q -n %{pkgname}-%{version}
37 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
38
39 %patch1 -p1
40
41 %build
42 grep -rsl '^#!.*perl' . |
43 grep -v '.bak$' |xargs --no-run-if-empty \
44 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
45 CFLAGS="$RPM_OPT_FLAGS"
46 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
47 %{__make}
48 %if %maketest
49 %{__make} test
50 %endif
51
52 %install
53 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
54
55 %{makeinstall} INSTALLDIRS=vendor `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
56
57 cmd=/usr/share/spec-helper/compress_files
58 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
59 [ -x $cmd ] && $cmd
60
61 # SuSE Linux
62 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
63 then
64 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
65 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
66 | %{__sed} -e s+%{buildroot}++g \
67 > %{buildroot}/var/adm/perl-modules/%{name}
68 fi
69
70 # remove special files
71 find %{buildroot} -name "perllocal.pod" \
72 -o -name ".packlist" \
73 -o -name "*.bs" \
74 |xargs -i rm -f {}
75
76 # no empty directories
77 find %{buildroot}%{_prefix} \
78 -type d -depth \
79 -exec rmdir {} \; 2>/dev/null
80
81 %{__perl} -MFile::Find -le '
82 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
83 print "%doc xt util misc Changes README LICENSE";
84 for my $x (sort @dirs, @files) {
85 push @ret, $x unless indirs($x);
86 }
87 print join "\n", sort @ret;
88
89 sub wanted {
90 return if /auto$/;
91
92 local $_ = $File::Find::name;
93 my $f = $_; s|^\Q%{buildroot}\E||;
94 return unless length;
95 return $files[@files] = $_ if -f $f;
96
97 $d = $_;
98 /\Q$d\E/ && return for reverse sort @INC;
99 $d =~ /\Q$_\E/ && return
100 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
101
102 $dirs[@dirs] = $_;
103 }
104
105 sub indirs {
106 my $x = shift;
107 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
108 }
109 ' > %filelist
110
111 [ -z %filelist ] && {
112 echo "ERROR: empty %files listing"
113 exit -1
114 }
115
116 %clean
117 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
118
119 %files -f %filelist
120 %defattr(-,root,root)
121
122 %changelog
123 * Tue Dec 07 2021 John Crisp <jcrisp@safeandsoundit.co.uk> -1.300036-1
124 - First import to SME Server [SME: ]
125
126 * Wed Jul 2 2014 <daniel@firewall-services.com> - 1.300011-1
127 - Initial build.

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