]> git.pld-linux.org Git - packages/php-phpmailer.git/commitdiff
fix syntax linting for various php versions
authorElan Ruusamäe <glen@delfi.ee>
Fri, 4 Sep 2015 09:39:36 +0000 (12:39 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 4 Sep 2015 09:39:36 +0000 (12:39 +0300)
php-phpmailer.spec

index 451c3ef84dc885f2b512037c2f32308559ad0fe0..4944cef0298119208b6be4d167619e4581ee0afe 100644 (file)
@@ -75,15 +75,29 @@ Dokumentacja do %{name}.
 %prep
 %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}}
 
-%if "%{pld_release}" == "ac"
-# requires php5.3
-rm test/bootstrap.php
-%endif
-
 %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.oauth.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}
This page took 0.083385 seconds and 4 git commands to generate.