]>
Commit | Line | Data |
---|---|---|
7605f8f0 | 1 | %define pkgname phpmailer |
6a698734 | 2 | %define php_min_version 5.2.0 |
a991a9b9 | 3 | %include /usr/lib/rpm/macros.php |
46bf6096 | 4 | Summary: Full featured email transfer class for PHP |
423f17e4 | 5 | Summary(pl.UTF-8): W pełni funkcjonalna klasa PHP do przesyłania e-maili |
7605f8f0 | 6 | Name: php-%{pkgname} |
52a0c160 | 7 | Version: 5.2.1 |
26058974 | 8 | Release: 2 |
6a698734 | 9 | License: LGPL v2.1 |
46bf6096 | 10 | Group: Development/Languages/PHP |
46a5f4d3 | 11 | Source0: http://phpmailer.apache-extras.org.codespot.com/files/PHPMailer_%{version}.tgz |
52a0c160 | 12 | # Source0-md5: 2ef9a089aa9aae9899b4ab785ef873c3 |
a991a9b9 | 13 | Patch0: paths.patch |
5bbc8086 | 14 | Patch1: phpmailer-update-et.patch |
11151c00 | 15 | Patch2: tests.patch |
46a5f4d3 | 16 | URL: http://code.google.com/a/apache-extras.org/p/phpmailer/ |
a991a9b9 | 17 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
11151c00 | 18 | BuildRequires: rpmbuild(macros) >= 1.553 |
a991a9b9 | 19 | Requires: php-common >= 4:%{php_min_version} |
72538a42 | 20 | Requires: php-date |
a991a9b9 | 21 | Requires: php-pcre |
a991a9b9 ER |
22 | Suggests: php-mbstring |
23 | Suggests: php-openssl | |
19f5ccc5 | 24 | Obsoletes: phpmailer |
46bf6096 ER |
25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
7605f8f0 ER |
28 | %define _appdir %{php_data_dir}/%{pkgname} |
29 | %define _phpdocdir %{_docdir}/phpdoc | |
46bf6096 | 30 | |
6a698734 ER |
31 | # exclude optional php dependencies |
32 | %define _noautophp php-openssl php-mbstring php-filter | |
33 | ||
34 | # put it together for rpmbuild | |
35 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
a991a9b9 | 36 | |
46bf6096 ER |
37 | %description |
38 | PHP email transport class featuring multiple file attachments, SMTP | |
39 | servers, CCs, BCCs, HTML messages, and word wrap, and more. It can | |
40 | send email via sendmail, PHP mail(), or with SMTP. Methods are based | |
41 | on the popular AspEmail active server component. | |
42 | ||
423f17e4 JB |
43 | %description -l pl.UTF-8 |
44 | Klasa PHP do przesyłania e-mail obsługująca wiele załączników | |
45 | plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii | |
46 | itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo | |
47 | poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail. | |
48 | ||
7605f8f0 ER |
49 | %package phpdoc |
50 | Summary: Online manual for %{name} | |
51 | Summary(pl.UTF-8): Dokumentacja online do %{name} | |
52 | Group: Documentation | |
53 | Requires: php-dirs | |
54 | ||
55 | %description phpdoc | |
56 | Documentation for %{name}. | |
57 | ||
58 | %description phpdoc -l pl.UTF-8 | |
59 | Dokumentacja do %{name}. | |
60 | ||
46bf6096 | 61 | %prep |
46a5f4d3 | 62 | %setup -q -n PHPMailer_%{version} |
19f5ccc5 | 63 | %patch0 -p1 |
5bbc8086 | 64 | %patch1 -p1 |
11151c00 | 65 | %patch2 -p1 |
46bf6096 | 66 | |
11151c00 | 67 | %undos -f php,html,txt README LICENSE |
46bf6096 | 68 | |
7605f8f0 ER |
69 | mv docs/5.0-phpdocs phpdoc |
70 | ||
46bf6096 ER |
71 | %install |
72 | rm -rf $RPM_BUILD_ROOT | |
19f5ccc5 | 73 | install -d $RPM_BUILD_ROOT%{_appdir}/language |
fd66e3cc | 74 | |
11151c00 | 75 | cp -p class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir} |
19f5ccc5 | 76 | # plugins: for smtp and pop before smtp auth |
11151c00 | 77 | cp -p class.{smtp,pop3}.php $RPM_BUILD_ROOT%{_appdir} |
19f5ccc5 | 78 | # language: translations of error messages |
11151c00 | 79 | cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language |
19f5ccc5 | 80 | |
26058974 ER |
81 | # extras: htmlfilter.php |
82 | cp -a extras $RPM_BUILD_ROOT%{_appdir} | |
83 | ||
19f5ccc5 | 84 | # examples |
13bc6b87 ER |
85 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
86 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
46bf6096 | 87 | |
7605f8f0 ER |
88 | # api doc |
89 | install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
90 | cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
91 | ||
46bf6096 ER |
92 | %clean |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
6a698734 | 97 | %doc changelog.txt README docs/* |
19f5ccc5 ER |
98 | %{php_data_dir}/class.phpmailer.php |
99 | ||
13bc6b87 | 100 | %dir %{_appdir} |
13bc6b87 ER |
101 | %{_appdir}/class.pop3.php |
102 | %{_appdir}/class.smtp.php | |
13bc6b87 | 103 | %dir %{_appdir}/language |
19f5ccc5 | 104 | %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php |
13bc6b87 | 105 | %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php |
6a698734 | 106 | %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php |
f4cd874b | 107 | %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php |
f4cd874b | 108 | %lang(da) %{_appdir}/language/phpmailer.lang-dk.php |
19f5ccc5 | 109 | %lang(de) %{_appdir}/language/phpmailer.lang-de.php |
13bc6b87 ER |
110 | %lang(es) %{_appdir}/language/phpmailer.lang-es.php |
111 | %lang(et) %{_appdir}/language/phpmailer.lang-et.php | |
112 | %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php | |
113 | %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php | |
114 | %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php | |
115 | %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php | |
116 | %lang(it) %{_appdir}/language/phpmailer.lang-it.php | |
117 | %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php | |
f6089298 | 118 | %lang(nb) %{_appdir}/language/phpmailer.lang-no.php |
19f5ccc5 | 119 | %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php |
13bc6b87 | 120 | %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php |
19f5ccc5 | 121 | %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php |
13bc6b87 ER |
122 | %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php |
123 | %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php | |
f4cd874b | 124 | %lang(sv) %{_appdir}/language/phpmailer.lang-se.php |
13bc6b87 | 125 | %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php |
6a698734 ER |
126 | %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php |
127 | %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php | |
13bc6b87 | 128 | |
26058974 ER |
129 | %dir %{_appdir}/extras |
130 | %{_appdir}/extras/htmlfilter.php | |
131 | ||
13bc6b87 | 132 | %{_examplesdir}/%{name}-%{version} |
7605f8f0 ER |
133 | |
134 | %files phpdoc | |
135 | %defattr(644,root,root,755) | |
136 | %{_phpdocdir}/%{pkgname} |