]>
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} |
1c7e4594 | 7 | Version: 5.2.9 |
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 |
1c7e4594 | 12 | # Source0-md5: 930220b4a2f2a8a33ff10c6d4ad4d31e |
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 |
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 |
b6834749 | 35 | %define _noautoreq_pear extras/ntlm_sasl_client.php extras/class.html2text.php PHPMailerAutoload.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}} |
46bf6096 | 66 | |
124dc362 ER |
67 | %if "%{pld_release}" == "ac" |
68 | # requires php5.3 | |
69 | rm test/bootstrap.php | |
70 | %endif | |
71 | ||
ebab167b | 72 | %build |
bcf627f4 ER |
73 | # syntax lint |
74 | for a in $(find -name '*.php' -o -name '*.inc'); do | |
75 | php -n -l $a | |
76 | done | |
77 | ||
7fc5b62b ER |
78 | rm -rf phpdoc |
79 | phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer \ | |
80 | --directory . --ignore test/,examples/,extras/,test_script/,language/,phpdoc/ --sourcecode | |
ebab167b ER |
81 | |
82 | # copy images, phpdoc is likely buggy not doing itself | |
83 | sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images | |
84 | install -d phpdoc/media/images | |
7fc5b62b ER |
85 | cp -p $sdir/Constant.png phpdoc/media/images |
86 | cp -p $sdir/Variable.png phpdoc/media/images | |
7605f8f0 | 87 | |
46bf6096 ER |
88 | %install |
89 | rm -rf $RPM_BUILD_ROOT | |
f960917e | 90 | install -d $RPM_BUILD_ROOT{%{php_data_dir},%{_appdir}/language} |
fd66e3cc | 91 | |
f960917e ER |
92 | ln -s %{_appdir}/class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir} |
93 | ln -s %{_appdir}/PHPMailerAutoload.php $RPM_BUILD_ROOT%{php_data_dir} | |
94 | ||
2e2daa29 | 95 | cp -p class.phpmailer.php PHPMailerAutoload.php $RPM_BUILD_ROOT%{_appdir} |
19f5ccc5 | 96 | # plugins: for smtp and pop before smtp auth |
11151c00 | 97 | cp -p class.{smtp,pop3}.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 | |
b15df9b0 | 101 | # extras: htmlfilter.php, ntlm_sasl_client.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 |
f960917e | 124 | %{_appdir}/class.phpmailer.php |
13bc6b87 ER |
125 | %{_appdir}/class.pop3.php |
126 | %{_appdir}/class.smtp.php | |
13bc6b87 | 127 | %dir %{_appdir}/language |
19f5ccc5 | 128 | %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php |
c5893738 | 129 | %lang(be) %{_appdir}/language/phpmailer.lang-be.php |
13bc6b87 | 130 | %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php |
6a698734 | 131 | %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php |
f4cd874b | 132 | %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php |
f4cd874b | 133 | %lang(da) %{_appdir}/language/phpmailer.lang-dk.php |
19f5ccc5 | 134 | %lang(de) %{_appdir}/language/phpmailer.lang-de.php |
c5893738 | 135 | %lang(el) %{_appdir}/language/phpmailer.lang-el.php |
2765a7e5 | 136 | %lang(eo) %{_appdir}/language/phpmailer.lang-eo.php |
13bc6b87 ER |
137 | %lang(es) %{_appdir}/language/phpmailer.lang-es.php |
138 | %lang(et) %{_appdir}/language/phpmailer.lang-et.php | |
1e429e6f | 139 | %lang(fa) %{_appdir}/language/phpmailer.lang-fa.php |
13bc6b87 ER |
140 | %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php |
141 | %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php | |
142 | %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php | |
c5893738 | 143 | %lang(gl) %{_appdir}/language/phpmailer.lang-gl.php |
2765a7e5 | 144 | %lang(he) %{_appdir}/language/phpmailer.lang-he.php |
c5893738 | 145 | %lang(hr) %{_appdir}/language/phpmailer.lang-hr.php |
13bc6b87 ER |
146 | %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php |
147 | %lang(it) %{_appdir}/language/phpmailer.lang-it.php | |
148 | %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php | |
c5893738 | 149 | %lang(ka) %{_appdir}/language/phpmailer.lang-ka.php |
1e429e6f | 150 | %lang(lt) %{_appdir}/language/phpmailer.lang-lt.php |
c5893738 | 151 | %lang(lv) %{_appdir}/language/phpmailer.lang-lv.php |
f6089298 | 152 | %lang(nb) %{_appdir}/language/phpmailer.lang-no.php |
19f5ccc5 | 153 | %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php |
13bc6b87 | 154 | %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php |
c5893738 | 155 | %lang(pt) %{_appdir}/language/phpmailer.lang-pt.php |
19f5ccc5 | 156 | %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php |
13bc6b87 ER |
157 | %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php |
158 | %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php | |
b904c15d | 159 | %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php |
c5893738 | 160 | %lang(sr) %{_appdir}/language/phpmailer.lang-sr.php |
f4cd874b | 161 | %lang(sv) %{_appdir}/language/phpmailer.lang-se.php |
13bc6b87 | 162 | %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php |
1e429e6f | 163 | %lang(uk) %{_appdir}/language/phpmailer.lang-uk.php |
c5893738 | 164 | %lang(vi) %{_appdir}/language/phpmailer.lang-vi.php |
6a698734 ER |
165 | %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php |
166 | %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php | |
13bc6b87 | 167 | |
26058974 | 168 | %dir %{_appdir}/extras |
1c7e4594 | 169 | %{_appdir}/extras/README.md |
1e429e6f | 170 | %{_appdir}/extras/EasyPeasyICS.php |
2765a7e5 | 171 | %{_appdir}/extras/class.html2text.php |
26058974 | 172 | %{_appdir}/extras/htmlfilter.php |
b15df9b0 | 173 | %{_appdir}/extras/ntlm_sasl_client.php |
26058974 | 174 | |
13bc6b87 | 175 | %{_examplesdir}/%{name}-%{version} |
7605f8f0 ER |
176 | |
177 | %files phpdoc | |
178 | %defattr(644,root,root,755) | |
179 | %{_phpdocdir}/%{pkgname} |