]> git.pld-linux.org Git - packages/php-phpmailer.git/blobdiff - php-phpmailer.spec
Version 5.2.18 (December 24th 2016); SECURITY
[packages/php-phpmailer.git] / php-phpmailer.spec
index 30eb295cc7d740b55771a37ebcbdd52ccd5ad0ab..feb38c17847c5dfae224dcfbb15fddbada378635 100644 (file)
@@ -1,20 +1,30 @@
+#
+# Conditional build:
+%bcond_with    tests           # build without tests
+
 %define                pkgname phpmailer
 %define                php_min_version 5.2.4
 %include       /usr/lib/rpm/macros.php
 Summary:       Full featured email transfer class for PHP
 Summary(pl.UTF-8):     W pełni funkcjonalna klasa PHP do przesyłania e-maili
 Name:          php-%{pkgname}
-Version:       5.2.8
+Version:       5.2.18
 Release:       1
 License:       LGPL v2.1
 Group:         Development/Languages/PHP
 Source0:       https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz
-# Source0-md5: e1898f3239ac271315cc70a8fe6467e5
+# Source0-md5: 68e05bbdd4196920ba6342cc63628ca2
 URL:           https://github.com/PHPMailer/PHPMailer
-%{?with_tests:BuildRequires:    %{php_name}-cli}
+BuildRequires: php-devel
 BuildRequires: php-pear-PhpDocumentor
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: rpmbuild(macros) >= 1.663
+%if %{with tests}
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-mbstring
+BuildRequires: phpunit
+BuildRequires: which
+%endif
 Requires:      php(core) >= %{php_min_version}
 Requires:      php(date)
 Requires:      php(pcre)
@@ -22,6 +32,8 @@ Suggests:     php(hash)
 Suggests:      php(mbstring)
 Suggests:      php(openssl)
 Obsoletes:     phpmailer
+# Gmail XOAUTH2 authentication
+#Suggests:     php-league-oauth2-client
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -32,7 +44,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _noautophp      php-openssl php-mbstring php-filter php-hash
 
 # bad depsolver
-%define                _noautoreq_pear extras/ntlm_sasl_client.php extras/class.html2text.php PHPMailerAutoload.php
+%define                _noautoreq_pear extras/ntlm_sasl_client.php PHPMailerAutoload.php extras/.*
 
 # put it together for rpmbuild
 %define                _noautoreq      %{?_noautophp}
@@ -66,10 +78,35 @@ Dokumentacja do %{name}.
 
 %build
 # syntax lint
-for a in $(find -name '*.php' -o -name '*.inc'); do
-       php -n -l $a
+for f in $(find -name '*.php' -o -name '*.inc'); do
+
+%if "%{php_major_version}.%{php_minor_version}" < "5.4"
+       case $(basename $f) in
+       class.phpmaileroauthgoogle.php|get_oauth_token.php)
+               # needs php 5.4
+               continue
+       ;;
+       esac
+%endif
+
+%if "%{php_major_version}.%{php_minor_version}" < "5.3"
+       case $(basename $f) in
+       bootstrap.php|phpmailerTest.php)
+               # needs php 5.3
+               continue
+       ;;
+       esac
+%endif
+
+       %{__php} -n -l $f
 done
 
+%if %{with tests}
+cd test
+%{__php} $(which phpunit) .
+cd -
+%endif
+
 rm -rf phpdoc
 phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer \
        --directory . --ignore test/,examples/,extras/,test_script/,language/,phpdoc/ --sourcecode
@@ -87,13 +124,11 @@ install -d $RPM_BUILD_ROOT{%{php_data_dir},%{_appdir}/language}
 ln -s %{_appdir}/class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir}
 ln -s %{_appdir}/PHPMailerAutoload.php $RPM_BUILD_ROOT%{php_data_dir}
 
-cp -p class.phpmailer.php PHPMailerAutoload.php $RPM_BUILD_ROOT%{_appdir}
-# plugins: for smtp and pop before smtp auth
-cp -p class.{smtp,pop3}.php  $RPM_BUILD_ROOT%{_appdir}
+cp -p class.*.php PHPMailerAutoload.php $RPM_BUILD_ROOT%{_appdir}
 # language: translations of error messages
 cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language
 
-# extras: htmlfilter.php, ntlm_sasl_client.php
+# extras: htmlfilter.php, ntlm_sasl_client.php, EasyPeasyICS.php
 cp -a extras $RPM_BUILD_ROOT%{_appdir}
 
 # examples
@@ -117,11 +152,16 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_appdir}
 %{_appdir}/PHPMailerAutoload.php
 %{_appdir}/class.phpmailer.php
+%{_appdir}/class.phpmaileroauth.php
+%{_appdir}/class.phpmaileroauthgoogle.php
 %{_appdir}/class.pop3.php
 %{_appdir}/class.smtp.php
 %dir %{_appdir}/language
+%lang(am) %{_appdir}/language/phpmailer.lang-am.php
 %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php
+%lang(az) %{_appdir}/language/phpmailer.lang-az.php
 %lang(be) %{_appdir}/language/phpmailer.lang-be.php
+%lang(bg) %{_appdir}/language/phpmailer.lang-bg.php
 %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php
 %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php
 %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php
@@ -139,11 +179,14 @@ rm -rf $RPM_BUILD_ROOT
 %lang(he) %{_appdir}/language/phpmailer.lang-he.php
 %lang(hr) %{_appdir}/language/phpmailer.lang-hr.php
 %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php
+%lang(id) %{_appdir}/language/phpmailer.lang-id.php
 %lang(it) %{_appdir}/language/phpmailer.lang-it.php
 %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php
 %lang(ka) %{_appdir}/language/phpmailer.lang-ka.php
+%lang(ko) %{_appdir}/language/phpmailer.lang-ko.php
 %lang(lt) %{_appdir}/language/phpmailer.lang-lt.php
 %lang(lv) %{_appdir}/language/phpmailer.lang-lv.php
+%lang(ms) %{_appdir}/language/phpmailer.lang-ms.php
 %lang(nb) %{_appdir}/language/phpmailer.lang-no.php
 %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php
 %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php
@@ -152,6 +195,7 @@ rm -rf $RPM_BUILD_ROOT
 %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php
 %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php
 %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php
+%lang(sl) %{_appdir}/language/phpmailer.lang-sl.php
 %lang(sr) %{_appdir}/language/phpmailer.lang-sr.php
 %lang(sv) %{_appdir}/language/phpmailer.lang-se.php
 %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php
@@ -161,8 +205,8 @@ rm -rf $RPM_BUILD_ROOT
 %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php
 
 %dir %{_appdir}/extras
+%{_appdir}/extras/README.md
 %{_appdir}/extras/EasyPeasyICS.php
-%{_appdir}/extras/class.html2text.php
 %{_appdir}/extras/htmlfilter.php
 %{_appdir}/extras/ntlm_sasl_client.php
 
This page took 0.041173 seconds and 4 git commands to generate.