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

Revision 8699, 3.6 KB checked in by tomop, 10 years ago (diff)

spamassassin-3.4.0

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