]>
Commit | Line | Data |
---|---|---|
7605f8f0 | 1 | %define pkgname phpmailer |
2765a7e5 | 2 | %define php_min_version 5.2.4 |
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} |
1e429e6f | 7 | Version: 5.2.7 |
a82ca784 | 8 | Release: 1 |
6a698734 | 9 | License: LGPL v2.1 |
46bf6096 | 10 | Group: Development/Languages/PHP |
1e429e6f ER |
11 | Source0: https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz |
12 | # Source0-md5: b07621694679cd625af3f53771502677 | |
a991a9b9 | 13 | Patch0: paths.patch |
2765a7e5 ER |
14 | URL: https://github.com/PHPMailer/PHPMailer |
15 | BuildRequires: php-pear-PhpDocumentor | |
a991a9b9 | 16 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
2765a7e5 | 17 | BuildRequires: rpmbuild(macros) >= 1.663 |
ac451b44 | 18 | Requires: php(core) >= %{php_min_version} |
d92be810 | 19 | Requires: php(date) |
27af8029 | 20 | Requires: php(pcre) |
2765a7e5 | 21 | Suggests: php(hash) |
d92be810 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 | 31 | # exclude optional php dependencies |
2765a7e5 | 32 | %define _noautophp php-openssl php-mbstring php-filter php-hash |
6a698734 | 33 | |
b15df9b0 | 34 | # bad depsolver |
2765a7e5 | 35 | %define _noautoreq_pear extras/ntlm_sasl_client.php extras/class.html2text.php |
b15df9b0 | 36 | |
6a698734 | 37 | # put it together for rpmbuild |
84952f85 | 38 | %define _noautoreq %{?_noautophp} |
a991a9b9 | 39 | |
46bf6096 ER |
40 | %description |
41 | PHP email transport class featuring multiple file attachments, SMTP | |
42 | servers, CCs, BCCs, HTML messages, and word wrap, and more. It can | |
43 | send email via sendmail, PHP mail(), or with SMTP. Methods are based | |
44 | on the popular AspEmail active server component. | |
45 | ||
423f17e4 JB |
46 | %description -l pl.UTF-8 |
47 | Klasa PHP do przesyłania e-mail obsługująca wiele załączników | |
48 | plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii | |
49 | itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo | |
50 | poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail. | |
51 | ||
7605f8f0 ER |
52 | %package phpdoc |
53 | Summary: Online manual for %{name} | |
54 | Summary(pl.UTF-8): Dokumentacja online do %{name} | |
55 | Group: Documentation | |
56 | Requires: php-dirs | |
57 | ||
58 | %description phpdoc | |
59 | Documentation for %{name}. | |
60 | ||
61 | %description phpdoc -l pl.UTF-8 | |
62 | Dokumentacja do %{name}. | |
63 | ||
46bf6096 | 64 | %prep |
2765a7e5 | 65 | %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}} |
19f5ccc5 | 66 | %patch0 -p1 |
46bf6096 | 67 | |
ebab167b ER |
68 | %build |
69 | phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer -f 'class.*.php' | |
70 | # nuke smarty cache | |
71 | rm -rf phpdoc/???????????????????????????????? | |
72 | rm -rf phpdoc/*/???????????????????????????????? | |
73 | ||
74 | # copy images, phpdoc is likely buggy not doing itself | |
75 | sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images | |
76 | install -d phpdoc/media/images | |
77 | cp -a $sdir/Constant.png phpdoc/media/images | |
78 | cp -a $sdir/Variable.png phpdoc/media/images | |
7605f8f0 | 79 | |
46bf6096 ER |
80 | %install |
81 | rm -rf $RPM_BUILD_ROOT | |
19f5ccc5 | 82 | install -d $RPM_BUILD_ROOT%{_appdir}/language |
fd66e3cc | 83 | |
11151c00 | 84 | cp -p class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir} |
19f5ccc5 | 85 | # plugins: for smtp and pop before smtp auth |
11151c00 | 86 | cp -p class.{smtp,pop3}.php $RPM_BUILD_ROOT%{_appdir} |
19f5ccc5 | 87 | # language: translations of error messages |
11151c00 | 88 | cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language |
19f5ccc5 | 89 | |
b15df9b0 | 90 | # extras: htmlfilter.php, ntlm_sasl_client.php |
26058974 ER |
91 | cp -a extras $RPM_BUILD_ROOT%{_appdir} |
92 | ||
19f5ccc5 | 93 | # examples |
13bc6b87 ER |
94 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
95 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
46bf6096 | 96 | |
7605f8f0 ER |
97 | # api doc |
98 | install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
99 | cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
100 | ||
46bf6096 ER |
101 | %clean |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %files | |
105 | %defattr(644,root,root,755) | |
2765a7e5 | 106 | %doc README.md changelog.md docs/* |
19f5ccc5 ER |
107 | %{php_data_dir}/class.phpmailer.php |
108 | ||
13bc6b87 | 109 | %dir %{_appdir} |
13bc6b87 ER |
110 | %{_appdir}/class.pop3.php |
111 | %{_appdir}/class.smtp.php | |
13bc6b87 | 112 | %dir %{_appdir}/language |
19f5ccc5 | 113 | %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php |
13bc6b87 | 114 | %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php |
6a698734 | 115 | %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php |
f4cd874b | 116 | %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php |
f4cd874b | 117 | %lang(da) %{_appdir}/language/phpmailer.lang-dk.php |
19f5ccc5 | 118 | %lang(de) %{_appdir}/language/phpmailer.lang-de.php |
2765a7e5 | 119 | %lang(eo) %{_appdir}/language/phpmailer.lang-eo.php |
13bc6b87 ER |
120 | %lang(es) %{_appdir}/language/phpmailer.lang-es.php |
121 | %lang(et) %{_appdir}/language/phpmailer.lang-et.php | |
1e429e6f | 122 | %lang(fa) %{_appdir}/language/phpmailer.lang-fa.php |
13bc6b87 ER |
123 | %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php |
124 | %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php | |
125 | %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php | |
2765a7e5 | 126 | %lang(he) %{_appdir}/language/phpmailer.lang-he.php |
13bc6b87 ER |
127 | %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php |
128 | %lang(it) %{_appdir}/language/phpmailer.lang-it.php | |
129 | %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php | |
1e429e6f | 130 | %lang(lt) %{_appdir}/language/phpmailer.lang-lt.php |
f6089298 | 131 | %lang(nb) %{_appdir}/language/phpmailer.lang-no.php |
19f5ccc5 | 132 | %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php |
13bc6b87 | 133 | %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php |
19f5ccc5 | 134 | %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php |
13bc6b87 ER |
135 | %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php |
136 | %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php | |
b904c15d | 137 | %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php |
f4cd874b | 138 | %lang(sv) %{_appdir}/language/phpmailer.lang-se.php |
13bc6b87 | 139 | %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php |
1e429e6f | 140 | %lang(uk) %{_appdir}/language/phpmailer.lang-uk.php |
6a698734 ER |
141 | %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php |
142 | %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php | |
13bc6b87 | 143 | |
26058974 | 144 | %dir %{_appdir}/extras |
1e429e6f | 145 | %{_appdir}/extras/EasyPeasyICS.php |
2765a7e5 | 146 | %{_appdir}/extras/class.html2text.php |
26058974 | 147 | %{_appdir}/extras/htmlfilter.php |
b15df9b0 | 148 | %{_appdir}/extras/ntlm_sasl_client.php |
26058974 | 149 | |
13bc6b87 | 150 | %{_examplesdir}/%{name}-%{version} |
7605f8f0 ER |
151 | |
152 | %files phpdoc | |
153 | %defattr(644,root,root,755) | |
154 | %{_phpdocdir}/%{pkgname} |