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

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