summaryrefslogtreecommitdiff
path: root/perl-MIME-tools.spec
blob: d2cae8f4e8bf2c96de3267764a77b349bf739cbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Conditional build:
%bcond_without	tests	# do not perform "make test"
#
%include	/usr/lib/rpm/macros.perl
%define		pdir	MIME
%define		pnam	tools
Summary:	MIME::tools - modules for parsing (and creating!) MIME entities
Summary(pl.UTF-8):	MIME::tools - zestaw modułów do operacji na danych w formacie MIME
Name:		perl-MIME-tools
Version:	5.427
Release:	1
# same as perl
License:	GPL v1+ or Artistic
Group:		Development/Languages/Perl
Source0:	http://www.cpan.org/modules/by-module/MIME/%{pdir}-%{pnam}-%{version}.tar.gz
# Source0-md5:	4333caa7238cb9eafb5f7fb39fcbd8e7
URL:		http://search.cpan.org/dist/MIME-tools/
BuildRequires:	perl-devel >= 1:5.8.0
%if %{with tests}
BuildRequires:	perl(File::Path) >= 1
BuildRequires:	perl(File::Spec) >= 0.6
BuildRequires:	perl-File-Temp >= 0.18
BuildRequires:	perl-IO-stringy >= 1.211
BuildRequires:	perl-MIME-Base64 >= 2.20
BuildRequires:	perl-MailTools >= 1.05
%endif
BuildRequires:	rpm-perlprov >= 4.1-13
BuildArch:	noarch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

# optional
%define		_noautoreq	'perl(Convert::BinHex)'

%description
MIME-tools is a collection of Perl5 MIME:: modules for parsing,
decoding and generating single- or multipart (even nested multipart)
MIME messages. (Yes, kids, that means you can send messages with
attached GIF files).

%description -l pl.UTF-8
MIME::tools to zestaw modułów MIME:: dla Perla 5 do analizy,
dekodowania oraz tworzenia jedno- i wieloczęściowych (a nawet
zagnieżdżonych wieloczęściowych) wiadomości MIME (tak, to znaczy, że
można wysyłać wiadomości z dołączonymi plikami GIF).

%prep
%setup -q -n %{pdir}-%{pnam}-%{version}

%build
%{__perl} Makefile.PL \
	INSTALLDIRS=vendor
%{__make}

%{?with_tests:%{__make} test}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/MIME-tools/.packlist

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc README*
%{perl_vendorlib}/MIME/*.pm
%{perl_vendorlib}/MIME/Parser
%{perl_vendorlib}/MIME/Decoder
%{perl_vendorlib}/MIME/Field
%{_mandir}/man3/*
%{_examplesdir}/%{name}-%{version}