perl-Net-SMTP-SSL-vl.spec 4.0 KB

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