Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / external-dependencies / Mail-RFC822-Address.spec
blobf5abf9eda785a0d16e774db7ead287d670e9ca5d
2 # - Mail::RFC822::Address -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=0.3 '--author=Paul Warren' Mail-RFC822-Address-0.3.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Mail-RFC822-Address
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Mail-RFC822-Address
15 summary: Mail-RFC822-Address - Perl extension for validating email addresses
16 version: 0.3
17 release: 1
18 vendor: Paul Warren
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
21 group: Applications/CPAN
22 url: http://www.cpan.org
23 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
24 buildarch: noarch
25 prefix: %(echo %{_prefix})
26 source: Mail-RFC822-Address-0.3.tar.gz
28 %description
29 Mail::RFC822::Address validates email addresses against the grammar described
30 in RFC 822 using regular expressions. How to validate a user supplied email
31 address is a FAQ (see perlfaq9): the only sure way to see if a supplied email
32 address is genuine is to send an email to it and see if the user recieves it.
33 The one useful check that can be performed on an address is to check that the
34 email address is syntactically valid. That is what this module does.
36 This module is functionally equivalent to RFC::RFC822::Address, but uses
37 regular expressions rather than the Parse::RecDescent parser. This means that
38 startup time is greatly reduced making it suitable for use in transient scripts
39 such as CGI scripts.
42 # This package was generated automatically with the cpan2rpm
43 # utility. To get this software or for more information
44 # please visit: http://perl.arix.com/
47 %prep
48 %setup -q -n %{pkgname}-%{version}
49 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
51 %build
52 grep -rsl '^#!.*perl' . |
53 grep -v '.bak$' |xargs --no-run-if-empty \
54 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
55 CFLAGS="$RPM_OPT_FLAGS"
56 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
57 %{__make}
58 %if %maketest
59 %{__make} test
60 %endif
62 %install
63 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
65 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
67 cmd=/usr/share/spec-helper/compress_files
68 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
69 [ -x $cmd ] && $cmd
71 # SuSE Linux
72 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
73 then
74 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
75 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
76 | %{__sed} -e s+%{buildroot}++g \
77 > %{buildroot}/var/adm/perl-modules/%{name}
80 # remove special files
81 find %{buildroot} -name "perllocal.pod" \
82 -o -name ".packlist" \
83 -o -name "*.bs" \
84 |xargs -i rm -f {}
86 # no empty directories
87 find %{buildroot}%{_prefix} \
88 -type d -depth \
89 -exec rmdir {} \; 2>/dev/null
91 %{__perl} -MFile::Find -le '
92 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
93 print "%doc Changes INSTALL";
94 for my $x (sort @dirs, @files) {
95 push @ret, $x unless indirs($x);
97 print join "\n", sort @ret;
99 sub wanted {
100 return if /auto$/;
102 local $_ = $File::Find::name;
103 my $f = $_; s|^\Q%{buildroot}\E||;
104 return unless length;
105 return $files[@files] = $_ if -f $f;
107 $d = $_;
108 /\Q$d\E/ && return for reverse sort @INC;
109 $d =~ /\Q$_\E/ && return
110 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
112 $dirs[@dirs] = $_;
115 sub indirs {
116 my $x = shift;
117 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
119 ' > %filelist
121 [ -z %filelist ] && {
122 echo "ERROR: empty %files listing"
123 exit -1
126 %clean
127 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
129 %files -f %filelist
130 %defattr(-,root,root)
132 %changelog
133 * Thu Nov 23 2006 root@dca02
134 - Initial build.