1 |
slords |
1.1 |
# |
2 |
|
|
# - Mail::RFC822::Address - |
3 |
|
|
# This spec file was automatically generated by cpan2rpm [ver: 2.026] |
4 |
|
|
# The following arguments were used: |
5 |
|
|
# --release=1centos Mail::RFC822::Address |
6 |
|
|
# For more information on cpan2rpm please visit: http://perl.arix.com/ |
7 |
|
|
# |
8 |
|
|
%define pkgname Mail-RFC822-Address |
9 |
|
|
%define filelist %{pkgname}-%{version}-filelist |
10 |
|
|
%define NVR %{pkgname}-%{version}-%{release} |
11 |
|
|
%define maketest 1 |
12 |
|
|
|
13 |
|
|
name: perl-Mail-RFC822-Address |
14 |
|
|
summary: Mail-RFC822-Address - Perl extension for validating email addresses |
15 |
|
|
version: 0.3 |
16 |
|
|
release: 1%{?dist} |
17 |
|
|
license: Artistic |
18 |
|
|
group: Applications/CPAN |
19 |
|
|
url: http://www.cpan.org |
20 |
|
|
buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n) |
21 |
|
|
buildarch: noarch |
22 |
|
|
prefix: %(echo %{_prefix}) |
23 |
|
|
source: http://search.cpan.org/dist/P/PD/PDWARREN/Mail-RFC822-Address-0.3.tar.gz |
24 |
|
|
|
25 |
|
|
%description |
26 |
|
|
Mail::RFC822::Address validates email addresses against the grammar described |
27 |
|
|
in RFC 822 using regular expressions. How to validate a user supplied email |
28 |
|
|
address is a FAQ (see perlfaq9): the only sure way to see if a supplied email |
29 |
|
|
address is genuine is to send an email to it and see if the user recieves it. |
30 |
|
|
The one useful check that can be performed on an address is to check that the |
31 |
|
|
email address is syntactically valid. That is what this module does. |
32 |
|
|
|
33 |
|
|
This module is functionally equivalent to RFC::RFC822::Address, but uses |
34 |
|
|
regular expressions rather than the Parse::RecDescent parser. This means that |
35 |
|
|
startup time is greatly reduced making it suitable for use in transient scripts |
36 |
|
|
such as CGI scripts. |
37 |
|
|
|
38 |
|
|
# |
39 |
|
|
# This package was generated automatically with the cpan2rpm |
40 |
|
|
# utility. To get this software or for more information |
41 |
|
|
# please visit: http://perl.arix.com/ |
42 |
|
|
# |
43 |
|
|
|
44 |
|
|
%prep |
45 |
|
|
%setup -q -n %{pkgname}-%{version} |
46 |
|
|
chmod -R u+w %{_builddir}/%{pkgname}-%{version} |
47 |
|
|
|
48 |
|
|
%build |
49 |
|
|
grep -rsl '^#!.*perl' . | |
50 |
|
|
grep -v '.bak$' |xargs --no-run-if-empty \ |
51 |
|
|
%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' |
52 |
|
|
CFLAGS="$RPM_OPT_FLAGS" |
53 |
|
|
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '` |
54 |
|
|
%{__make} |
55 |
|
|
%if %maketest |
56 |
|
|
%{__make} test |
57 |
|
|
%endif |
58 |
|
|
|
59 |
|
|
%install |
60 |
|
|
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
61 |
|
|
|
62 |
|
|
%{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '` |
63 |
|
|
|
64 |
|
|
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
65 |
|
|
|
66 |
|
|
# SuSE Linux |
67 |
|
|
if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ] |
68 |
|
|
then |
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} |
73 |
|
|
fi |
74 |
|
|
|
75 |
|
|
# remove special files |
76 |
|
|
find %{buildroot} -name "perllocal.pod" \ |
77 |
|
|
-o -name ".packlist" \ |
78 |
|
|
-o -name "*.bs" \ |
79 |
|
|
|xargs -i rm -f {} |
80 |
|
|
|
81 |
|
|
# no empty directories |
82 |
|
|
find %{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 INSTALL"; |
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 |
|
|
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
129 |
|
|
- Clean up spec so package can be built by koji/plague |
130 |
|
|
|
131 |
|
|
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
132 |
|
|
- Update to new release naming. No functional changes. |
133 |
|
|
- Make Packager generic |
134 |
|
|
|
135 |
|
|
* Thu Sep 2 2004 charlieb@charlieb-centos |
136 |
|
|
- Initial build. |