]>
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} |
d3732919 | 7 | Version: 5.2.12 |
12c10122 | 8 | Release: 1 |
6a698734 | 9 | License: LGPL v2.1 |
46bf6096 | 10 | Group: Development/Languages/PHP |
1e429e6f | 11 | Source0: https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz |
d3732919 | 12 | # Source0-md5: 5c2d02e6fc4a61c9ba8b20810b564b1c |
2765a7e5 | 13 | URL: https://github.com/PHPMailer/PHPMailer |
bcf627f4 | 14 | %{?with_tests:BuildRequires: %{php_name}-cli} |
2765a7e5 | 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 |
d3732919 ER |
25 | # Gmail XOAUTH2 authentication |
26 | #Suggests: php-league-oauth2-client | |
46bf6096 ER |
27 | BuildArch: noarch |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
7605f8f0 ER |
30 | %define _appdir %{php_data_dir}/%{pkgname} |
31 | %define _phpdocdir %{_docdir}/phpdoc | |
46bf6096 | 32 | |
6a698734 | 33 | # exclude optional php dependencies |
2765a7e5 | 34 | %define _noautophp php-openssl php-mbstring php-filter php-hash |
6a698734 | 35 | |
b15df9b0 | 36 | # bad depsolver |
d3732919 | 37 | %define _noautoreq_pear extras/ntlm_sasl_client.php PHPMailerAutoload.php |
b15df9b0 | 38 | |
6a698734 | 39 | # put it together for rpmbuild |
84952f85 | 40 | %define _noautoreq %{?_noautophp} |
a991a9b9 | 41 | |
46bf6096 ER |
42 | %description |
43 | PHP email transport class featuring multiple file attachments, SMTP | |
44 | servers, CCs, BCCs, HTML messages, and word wrap, and more. It can | |
45 | send email via sendmail, PHP mail(), or with SMTP. Methods are based | |
46 | on the popular AspEmail active server component. | |
47 | ||
423f17e4 JB |
48 | %description -l pl.UTF-8 |
49 | Klasa PHP do przesyłania e-mail obsługująca wiele załączników | |
50 | plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii | |
51 | itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo | |
52 | poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail. | |
53 | ||
7605f8f0 ER |
54 | %package phpdoc |
55 | Summary: Online manual for %{name} | |
56 | Summary(pl.UTF-8): Dokumentacja online do %{name} | |
57 | Group: Documentation | |
58 | Requires: php-dirs | |
59 | ||
60 | %description phpdoc | |
61 | Documentation for %{name}. | |
62 | ||
63 | %description phpdoc -l pl.UTF-8 | |
64 | Dokumentacja do %{name}. | |
65 | ||
46bf6096 | 66 | %prep |
2765a7e5 | 67 | %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}} |
46bf6096 | 68 | |
124dc362 ER |
69 | %if "%{pld_release}" == "ac" |
70 | # requires php5.3 | |
71 | rm test/bootstrap.php | |
72 | %endif | |
73 | ||
ebab167b | 74 | %build |
bcf627f4 ER |
75 | # syntax lint |
76 | for a in $(find -name '*.php' -o -name '*.inc'); do | |
77 | php -n -l $a | |
78 | done | |
79 | ||
7fc5b62b ER |
80 | rm -rf phpdoc |
81 | phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer \ | |
82 | --directory . --ignore test/,examples/,extras/,test_script/,language/,phpdoc/ --sourcecode | |
ebab167b ER |
83 | |
84 | # copy images, phpdoc is likely buggy not doing itself | |
85 | sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images | |
86 | install -d phpdoc/media/images | |
7fc5b62b ER |
87 | cp -p $sdir/Constant.png phpdoc/media/images |
88 | cp -p $sdir/Variable.png phpdoc/media/images | |
7605f8f0 | 89 | |
46bf6096 ER |
90 | %install |
91 | rm -rf $RPM_BUILD_ROOT | |
f960917e | 92 | install -d $RPM_BUILD_ROOT{%{php_data_dir},%{_appdir}/language} |
fd66e3cc | 93 | |
f960917e ER |
94 | ln -s %{_appdir}/class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir} |
95 | ln -s %{_appdir}/PHPMailerAutoload.php $RPM_BUILD_ROOT%{php_data_dir} | |
96 | ||
d3732919 | 97 | cp -p class.*.php PHPMailerAutoload.php $RPM_BUILD_ROOT%{_appdir} |
19f5ccc5 | 98 | # language: translations of error messages |
11151c00 | 99 | cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language |
19f5ccc5 | 100 | |
d3732919 | 101 | # extras: htmlfilter.php, ntlm_sasl_client.php, EasyPeasyICS.php |
26058974 ER |
102 | cp -a extras $RPM_BUILD_ROOT%{_appdir} |
103 | ||
19f5ccc5 | 104 | # examples |
13bc6b87 ER |
105 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
106 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
46bf6096 | 107 | |
7605f8f0 ER |
108 | # api doc |
109 | install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
110 | cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
111 | ||
46bf6096 ER |
112 | %clean |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
2765a7e5 | 117 | %doc README.md changelog.md docs/* |
f960917e | 118 | # public interfaces |
f960917e | 119 | %{php_data_dir}/PHPMailerAutoload.php |
2e2daa29 | 120 | %{php_data_dir}/class.phpmailer.php |
19f5ccc5 | 121 | |
13bc6b87 | 122 | %dir %{_appdir} |
2e2daa29 | 123 | %{_appdir}/PHPMailerAutoload.php |
d3732919 | 124 | %{_appdir}/class.oauth.php |
f960917e | 125 | %{_appdir}/class.phpmailer.php |
d3732919 | 126 | %{_appdir}/class.phpmaileroauth.php |
13bc6b87 ER |
127 | %{_appdir}/class.pop3.php |
128 | %{_appdir}/class.smtp.php | |
13bc6b87 | 129 | %dir %{_appdir}/language |
d3732919 | 130 | %lang(am) %{_appdir}/language/phpmailer.lang-am.php |
19f5ccc5 | 131 | %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php |
d3732919 | 132 | %lang(az) %{_appdir}/language/phpmailer.lang-az.php |
c5893738 | 133 | %lang(be) %{_appdir}/language/phpmailer.lang-be.php |
d3732919 | 134 | %lang(bg) %{_appdir}/language/phpmailer.lang-bg.php |
13bc6b87 | 135 | %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php |
6a698734 | 136 | %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php |
f4cd874b | 137 | %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php |
f4cd874b | 138 | %lang(da) %{_appdir}/language/phpmailer.lang-dk.php |
19f5ccc5 | 139 | %lang(de) %{_appdir}/language/phpmailer.lang-de.php |
c5893738 | 140 | %lang(el) %{_appdir}/language/phpmailer.lang-el.php |
2765a7e5 | 141 | %lang(eo) %{_appdir}/language/phpmailer.lang-eo.php |
13bc6b87 ER |
142 | %lang(es) %{_appdir}/language/phpmailer.lang-es.php |
143 | %lang(et) %{_appdir}/language/phpmailer.lang-et.php | |
1e429e6f | 144 | %lang(fa) %{_appdir}/language/phpmailer.lang-fa.php |
13bc6b87 ER |
145 | %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php |
146 | %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php | |
147 | %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php | |
c5893738 | 148 | %lang(gl) %{_appdir}/language/phpmailer.lang-gl.php |
2765a7e5 | 149 | %lang(he) %{_appdir}/language/phpmailer.lang-he.php |
c5893738 | 150 | %lang(hr) %{_appdir}/language/phpmailer.lang-hr.php |
13bc6b87 | 151 | %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php |
d3732919 | 152 | %lang(id) %{_appdir}/language/phpmailer.lang-id.php |
13bc6b87 ER |
153 | %lang(it) %{_appdir}/language/phpmailer.lang-it.php |
154 | %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php | |
c5893738 | 155 | %lang(ka) %{_appdir}/language/phpmailer.lang-ka.php |
d3732919 | 156 | %lang(ko) %{_appdir}/language/phpmailer.lang-ko.php |
1e429e6f | 157 | %lang(lt) %{_appdir}/language/phpmailer.lang-lt.php |
c5893738 | 158 | %lang(lv) %{_appdir}/language/phpmailer.lang-lv.php |
d3732919 | 159 | %lang(ms) %{_appdir}/language/phpmailer.lang-ms.php |
f6089298 | 160 | %lang(nb) %{_appdir}/language/phpmailer.lang-no.php |
19f5ccc5 | 161 | %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php |
13bc6b87 | 162 | %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php |
c5893738 | 163 | %lang(pt) %{_appdir}/language/phpmailer.lang-pt.php |
19f5ccc5 | 164 | %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php |
13bc6b87 ER |
165 | %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php |
166 | %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php | |
b904c15d | 167 | %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php |
d3732919 | 168 | %lang(sl) %{_appdir}/language/phpmailer.lang-sl.php |
c5893738 | 169 | %lang(sr) %{_appdir}/language/phpmailer.lang-sr.php |
f4cd874b | 170 | %lang(sv) %{_appdir}/language/phpmailer.lang-se.php |
13bc6b87 | 171 | %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php |
1e429e6f | 172 | %lang(uk) %{_appdir}/language/phpmailer.lang-uk.php |
c5893738 | 173 | %lang(vi) %{_appdir}/language/phpmailer.lang-vi.php |
6a698734 ER |
174 | %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php |
175 | %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php | |
13bc6b87 | 176 | |
26058974 | 177 | %dir %{_appdir}/extras |
1c7e4594 | 178 | %{_appdir}/extras/README.md |
1e429e6f | 179 | %{_appdir}/extras/EasyPeasyICS.php |
26058974 | 180 | %{_appdir}/extras/htmlfilter.php |
b15df9b0 | 181 | %{_appdir}/extras/ntlm_sasl_client.php |
26058974 | 182 | |
13bc6b87 | 183 | %{_examplesdir}/%{name}-%{version} |
7605f8f0 ER |
184 | |
185 | %files phpdoc | |
186 | %defattr(644,root,root,755) | |
187 | %{_phpdocdir}/%{pkgname} |