]> git.pld-linux.org Git - packages/php-phpmailer.git/blob - php-phpmailer.spec
Version 5.2.18 (December 24th 2016); SECURITY
[packages/php-phpmailer.git] / php-phpmailer.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 %define         pkgname phpmailer
6 %define         php_min_version 5.2.4
7 %include        /usr/lib/rpm/macros.php
8 Summary:        Full featured email transfer class for PHP
9 Summary(pl.UTF-8):      W pełni funkcjonalna klasa PHP do przesyłania e-maili
10 Name:           php-%{pkgname}
11 Version:        5.2.18
12 Release:        1
13 License:        LGPL v2.1
14 Group:          Development/Languages/PHP
15 Source0:        https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz
16 # Source0-md5:  68e05bbdd4196920ba6342cc63628ca2
17 URL:            https://github.com/PHPMailer/PHPMailer
18 BuildRequires:  php-devel
19 BuildRequires:  php-pear-PhpDocumentor
20 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
21 BuildRequires:  rpmbuild(macros) >= 1.663
22 %if %{with tests}
23 BuildRequires:  %{php_name}-cli
24 BuildRequires:  %{php_name}-mbstring
25 BuildRequires:  phpunit
26 BuildRequires:  which
27 %endif
28 Requires:       php(core) >= %{php_min_version}
29 Requires:       php(date)
30 Requires:       php(pcre)
31 Suggests:       php(hash)
32 Suggests:       php(mbstring)
33 Suggests:       php(openssl)
34 Obsoletes:      phpmailer
35 # Gmail XOAUTH2 authentication
36 #Suggests:      php-league-oauth2-client
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _appdir         %{php_data_dir}/%{pkgname}
41 %define         _phpdocdir      %{_docdir}/phpdoc
42
43 # exclude optional php dependencies
44 %define         _noautophp      php-openssl php-mbstring php-filter php-hash
45
46 # bad depsolver
47 %define         _noautoreq_pear extras/ntlm_sasl_client.php PHPMailerAutoload.php extras/.*
48
49 # put it together for rpmbuild
50 %define         _noautoreq      %{?_noautophp}
51
52 %description
53 PHP email transport class featuring multiple file attachments, SMTP
54 servers, CCs, BCCs, HTML messages, and word wrap, and more. It can
55 send email via sendmail, PHP mail(), or with SMTP. Methods are based
56 on the popular AspEmail active server component.
57
58 %description -l pl.UTF-8
59 Klasa PHP do przesyłania e-mail obsługująca wiele załączników
60 plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii
61 itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo
62 poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail.
63
64 %package phpdoc
65 Summary:        Online manual for %{name}
66 Summary(pl.UTF-8):      Dokumentacja online do %{name}
67 Group:          Documentation
68 Requires:       php-dirs
69
70 %description phpdoc
71 Documentation for %{name}.
72
73 %description phpdoc -l pl.UTF-8
74 Dokumentacja do %{name}.
75
76 %prep
77 %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}}
78
79 %build
80 # syntax lint
81 for f in $(find -name '*.php' -o -name '*.inc'); do
82
83 %if "%{php_major_version}.%{php_minor_version}" < "5.4"
84         case $(basename $f) in
85         class.phpmaileroauthgoogle.php|get_oauth_token.php)
86                 # needs php 5.4
87                 continue
88         ;;
89         esac
90 %endif
91
92 %if "%{php_major_version}.%{php_minor_version}" < "5.3"
93         case $(basename $f) in
94         bootstrap.php|phpmailerTest.php)
95                 # needs php 5.3
96                 continue
97         ;;
98         esac
99 %endif
100
101         %{__php} -n -l $f
102 done
103
104 %if %{with tests}
105 cd test
106 %{__php} $(which phpunit) .
107 cd -
108 %endif
109
110 rm -rf phpdoc
111 phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer \
112         --directory . --ignore test/,examples/,extras/,test_script/,language/,phpdoc/ --sourcecode
113
114 # copy images, phpdoc is likely buggy not doing itself
115 sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images
116 install -d phpdoc/media/images
117 cp -p $sdir/Constant.png phpdoc/media/images
118 cp -p $sdir/Variable.png phpdoc/media/images
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122 install -d $RPM_BUILD_ROOT{%{php_data_dir},%{_appdir}/language}
123
124 ln -s %{_appdir}/class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir}
125 ln -s %{_appdir}/PHPMailerAutoload.php $RPM_BUILD_ROOT%{php_data_dir}
126
127 cp -p class.*.php PHPMailerAutoload.php $RPM_BUILD_ROOT%{_appdir}
128 # language: translations of error messages
129 cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language
130
131 # extras: htmlfilter.php, ntlm_sasl_client.php, EasyPeasyICS.php
132 cp -a extras $RPM_BUILD_ROOT%{_appdir}
133
134 # examples
135 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
136 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
137
138 # api doc
139 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
140 cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %files
146 %defattr(644,root,root,755)
147 %doc README.md changelog.md docs/*
148 # public interfaces
149 %{php_data_dir}/PHPMailerAutoload.php
150 %{php_data_dir}/class.phpmailer.php
151
152 %dir %{_appdir}
153 %{_appdir}/PHPMailerAutoload.php
154 %{_appdir}/class.phpmailer.php
155 %{_appdir}/class.phpmaileroauth.php
156 %{_appdir}/class.phpmaileroauthgoogle.php
157 %{_appdir}/class.pop3.php
158 %{_appdir}/class.smtp.php
159 %dir %{_appdir}/language
160 %lang(am) %{_appdir}/language/phpmailer.lang-am.php
161 %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php
162 %lang(az) %{_appdir}/language/phpmailer.lang-az.php
163 %lang(be) %{_appdir}/language/phpmailer.lang-be.php
164 %lang(bg) %{_appdir}/language/phpmailer.lang-bg.php
165 %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php
166 %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php
167 %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php
168 %lang(da) %{_appdir}/language/phpmailer.lang-dk.php
169 %lang(de) %{_appdir}/language/phpmailer.lang-de.php
170 %lang(el) %{_appdir}/language/phpmailer.lang-el.php
171 %lang(eo) %{_appdir}/language/phpmailer.lang-eo.php
172 %lang(es) %{_appdir}/language/phpmailer.lang-es.php
173 %lang(et) %{_appdir}/language/phpmailer.lang-et.php
174 %lang(fa) %{_appdir}/language/phpmailer.lang-fa.php
175 %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php
176 %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php
177 %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php
178 %lang(gl) %{_appdir}/language/phpmailer.lang-gl.php
179 %lang(he) %{_appdir}/language/phpmailer.lang-he.php
180 %lang(hr) %{_appdir}/language/phpmailer.lang-hr.php
181 %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php
182 %lang(id) %{_appdir}/language/phpmailer.lang-id.php
183 %lang(it) %{_appdir}/language/phpmailer.lang-it.php
184 %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php
185 %lang(ka) %{_appdir}/language/phpmailer.lang-ka.php
186 %lang(ko) %{_appdir}/language/phpmailer.lang-ko.php
187 %lang(lt) %{_appdir}/language/phpmailer.lang-lt.php
188 %lang(lv) %{_appdir}/language/phpmailer.lang-lv.php
189 %lang(ms) %{_appdir}/language/phpmailer.lang-ms.php
190 %lang(nb) %{_appdir}/language/phpmailer.lang-no.php
191 %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php
192 %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php
193 %lang(pt) %{_appdir}/language/phpmailer.lang-pt.php
194 %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php
195 %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php
196 %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php
197 %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php
198 %lang(sl) %{_appdir}/language/phpmailer.lang-sl.php
199 %lang(sr) %{_appdir}/language/phpmailer.lang-sr.php
200 %lang(sv) %{_appdir}/language/phpmailer.lang-se.php
201 %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php
202 %lang(uk) %{_appdir}/language/phpmailer.lang-uk.php
203 %lang(vi) %{_appdir}/language/phpmailer.lang-vi.php
204 %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php
205 %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php
206
207 %dir %{_appdir}/extras
208 %{_appdir}/extras/README.md
209 %{_appdir}/extras/EasyPeasyICS.php
210 %{_appdir}/extras/htmlfilter.php
211 %{_appdir}/extras/ntlm_sasl_client.php
212
213 %{_examplesdir}/%{name}-%{version}
214
215 %files phpdoc
216 %defattr(644,root,root,755)
217 %{_phpdocdir}/%{pkgname}
This page took 0.080643 seconds and 3 git commands to generate.