]> git.pld-linux.org Git - packages/php-phpmailer.git/blame_incremental - php-phpmailer.spec
no more documentation in source tarball
[packages/php-phpmailer.git] / php-phpmailer.spec
... / ...
CommitLineData
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
8Summary: Full featured email transfer class for PHP
9Summary(pl.UTF-8): W pełni funkcjonalna klasa PHP do przesyłania e-maili
10Name: php-%{pkgname}
11Version: 5.2.19
12Release: 1
13License: LGPL v2.1
14Group: Development/Languages/PHP
15Source0: https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz
16# Source0-md5: e87015596431c395ab16e6533f9cb88a
17URL: https://github.com/PHPMailer/PHPMailer
18BuildRequires: php-devel
19BuildRequires: php-pear-PhpDocumentor
20BuildRequires: rpm-php-pearprov >= 4.4.2-11
21BuildRequires: rpmbuild(macros) >= 1.663
22%if %{with tests}
23BuildRequires: %{php_name}-cli
24BuildRequires: %{php_name}-mbstring
25BuildRequires: phpunit
26BuildRequires: which
27%endif
28Requires: php(core) >= %{php_min_version}
29Requires: php(date)
30Requires: php(pcre)
31Suggests: php(hash)
32Suggests: php(mbstring)
33Suggests: php(openssl)
34Obsoletes: phpmailer
35# Gmail XOAUTH2 authentication
36#Suggests: php-league-oauth2-client
37BuildArch: noarch
38BuildRoot: %{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
53PHP email transport class featuring multiple file attachments, SMTP
54servers, CCs, BCCs, HTML messages, and word wrap, and more. It can
55send email via sendmail, PHP mail(), or with SMTP. Methods are based
56on the popular AspEmail active server component.
57
58%description -l pl.UTF-8
59Klasa PHP do przesyłania e-mail obsługująca wiele załączników
60plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii
61itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo
62poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail.
63
64%package phpdoc
65Summary: Online manual for %{name}
66Summary(pl.UTF-8): Dokumentacja online do %{name}
67Group: Documentation
68Requires: php-dirs
69
70%description phpdoc
71Documentation for %{name}.
72
73%description phpdoc -l pl.UTF-8
74Dokumentacja do %{name}.
75
76%prep
77%setup -q -n PHPMailer-%{version}%{?subver:-%{subver}}
78
79%build
80# syntax lint
81for 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
102done
103
104%if %{with tests}
105cd test
106%{__php} $(which phpunit) .
107cd -
108%endif
109
110rm -rf phpdoc
111phpdoc --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
115sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images
116install -d phpdoc/media/images
117cp -p $sdir/Constant.png phpdoc/media/images
118cp -p $sdir/Variable.png phpdoc/media/images
119
120%install
121rm -rf $RPM_BUILD_ROOT
122install -d $RPM_BUILD_ROOT{%{php_data_dir},%{_appdir}/language}
123
124ln -s %{_appdir}/class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir}
125ln -s %{_appdir}/PHPMailerAutoload.php $RPM_BUILD_ROOT%{php_data_dir}
126
127cp -p class.*.php PHPMailerAutoload.php $RPM_BUILD_ROOT%{_appdir}
128# language: translations of error messages
129cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language
130
131# extras: htmlfilter.php, ntlm_sasl_client.php, EasyPeasyICS.php
132cp -a extras $RPM_BUILD_ROOT%{_appdir}
133
134# examples
135install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
136cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
137
138# api doc
139install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
140cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
141
142%clean
143rm -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-cs.php
168%lang(da) %{_appdir}/language/phpmailer.lang-da.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-nb.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-pt_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-sv.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.068612 seconds and 4 git commands to generate.