source: projects/specs/trunk/p/perl-Net-SMTP-SSL/perl-Net-SMTP-SSL-vl.spec @ 12120

Revision 12120, 4.0 KB checked in by tomop, 5 years ago (diff)

perl-5.26 and friends

Line 
1
2%define pkgname Net-SMTP-SSL
3%define filelist %{pkgname}-%{version}-filelist
4%define NVR %{pkgname}-%{version}-%{release}
5%define maketest 1
6
7Name:      perl-Net-SMTP-SSL
8Summary:   SSL support for Net::SMTP
9Version:   1.04
10Release:   1%{?_dist_release}
11License:   Artistic
12Group:     Development/Libraries
13URL:       http://search.cpan.org/~cwest/Net-SMTP-SSL/
14
15Source:    http://search.cpan.org//CPAN/authors/id/C/CW/CWEST/%{pkgname}-%{version}.tar.gz
16
17BuildRoot: %{_tmppath}/%{name}-%{version}-root
18BuildArch: noarch
19BuildRequires: perl(IO::Socket::SSL)
20Requires:      perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
21
22Vendor:    Project Vine
23distribution: Vine Linux
24packager:  tomop
25
26%description
27Implements the same API as L<Net::SMTP|Net::SMTP>, but uses
28L<IO::Socket::SSL|IO::Socket::SSL> for its network operations. Due to
29the nature of C<Net::SMTP>'s C<new> method, it is not overridden to make
30use of a default port for the SMTPS service. Perhaps future versions
31will be smart like that. Port C<465> is usually what you want, and it's
32not a pain to specify that.
33
34For interface documentation, please see L<Net::SMTP|Net::SMTP>.
35
36#
37# This package was generated automatically with the cpan2rpm
38# utility.  To get this software or for more information
39# please visit: http://perl.arix.com/
40#
41
42%prep
43%setup -q -n %{pkgname}-%{version}
44chmod -R u+w %{_builddir}/%{pkgname}-%{version}
45
46%build
47grep -rsl '^#!.*perl' . |
48grep -v '.bak$' |xargs --no-run-if-empty \
49%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
50CFLAGS="$RPM_OPT_FLAGS"
51%{__perl} Makefile.PL INSTALLDIRS="vendor" `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
52%{__make}
53%if %maketest
54%{__make} test
55%endif
56
57%install
58[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
59
60%{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
61
62cmd=/usr/share/spec-helper/compress_files
63[ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
64[ -x $cmd ] && $cmd
65
66# SuSE Linux
67if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
68then
69    %{__mkdir_p} %{buildroot}/var/adm/perl-modules
70    %{__cat} `find %{buildroot} -name "perllocal.pod"`  \
71        | %{__sed} -e s+%{buildroot}++g                 \
72        > %{buildroot}/var/adm/perl-modules/%{name}
73fi
74
75# remove special files
76find %{buildroot} -name "perllocal.pod" \
77    -o -name ".packlist"                \
78    -o -name "*.bs"                     \
79    |xargs -i rm -f {}
80
81# no empty directories
82find %{buildroot}%{_prefix}             \
83    -type d -depth                      \
84    -exec rmdir {} \; 2>/dev/null
85
86%{__perl} -MFile::Find -le '
87    find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
88    print "%doc  Changes README";
89    for my $x (sort @dirs, @files) {
90        push @ret, $x unless indirs($x);
91        }
92    print join "\n", sort @ret;
93
94    sub wanted {
95        return if /auto$/;
96
97        local $_ = $File::Find::name;
98        my $f = $_; s|^\Q%{buildroot}\E||;
99        return unless length;
100        return $files[@files] = $_ if -f $f;
101
102        $d = $_;
103        /\Q$d\E/ && return for reverse sort @INC;
104        $d =~ /\Q$_\E/ && return
105            for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
106
107        $dirs[@dirs] = $_;
108        }
109
110    sub indirs {
111        my $x = shift;
112        $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
113        }
114    ' > %filelist
115
116[ -z %filelist ] && {
117    echo "ERROR: empty %files listing"
118    exit -1
119    }
120
121%clean
122[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
123
124%files -f %filelist
125%defattr(-,root,root)
126
127%changelog
128* Sat May 18 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.04-1
129- new upstream release.
130- rebuilt with perl-5.26.
131
132* Sat Oct 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.01-2
133- moved to Development/Libraries Group
134
135* Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.01-1
136- initial build for Vine Linux.
137
Note: See TracBrowser for help on using the repository browser.