From 4dd1012f71c41ec9d4b92d33ca804636299391be Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mar 27 2018 12:10:47 +0000 Subject: update to 6.0.4 add patch to fix lang_path with RPM layout --- diff --git a/.gitignore b/.gitignore index abf4069..829ad8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /php-phpmailer6-6.0.3-44d49ba.tgz +/php-phpmailer6-6.0.4-3050a4a.tgz diff --git a/php-phpmailer6-layout.patch b/php-phpmailer6-layout.patch new file mode 100644 index 0000000..1d287f3 --- /dev/null +++ b/php-phpmailer6-layout.patch @@ -0,0 +1,12 @@ +diff -up ./src/PHPMailer.php.rpm ./src/PHPMailer.php +--- ./src/PHPMailer.php.rpm 2018-03-27 14:01:40.736223588 +0200 ++++ ./src/PHPMailer.php 2018-03-27 14:02:31.291471961 +0200 +@@ -1994,7 +1994,7 @@ class PHPMailer + ]; + if (empty($lang_path)) { + // Calculate an absolute path so it can work if CWD is not here +- $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; ++ $lang_path = __DIR__ . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; + } + //Validate $langcode + if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { diff --git a/php-phpmailer6.spec b/php-phpmailer6.spec index 8b414b4..97e5b4d 100644 --- a/php-phpmailer6.spec +++ b/php-phpmailer6.spec @@ -7,7 +7,7 @@ # Please preserve changelog entries # # Github -%global gh_commit 44d49bab5ab1fef721d3ee07e75dc0865ddf4cc6 +%global gh_commit 3050a4ae75dfe23cd8d24080bad654619d01c696 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner PHPMailer %global gh_project PHPMailer @@ -23,11 +23,10 @@ %global php_home %{_datadir}/php Name: php-%{pk_project}%{major} -Version: 6.0.3 +Version: 6.0.4 Release: 1%{?dist} Summary: Full-featured email creation and transfer class for PHP -Group: Development/Libraries License: LGPLv2+ URL: https://github.com/%{gh_owner}/%{gh_project} # git snapshot to get upstream test suite @@ -36,6 +35,9 @@ Source1: makesrc.sh # Simple unit test for packaging Source2: PHPMailerRpmTest.php +# Fix path to match RPM installation layout +Patch0: %{name}-layout.patch + BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.5 @@ -118,9 +120,10 @@ Class Features Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php - %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 + cp %{SOURCE2} test/PHPMailerRpmTest.php cat << 'EOF' | tee src/autoload.php @@ -194,6 +197,10 @@ exit $ret %changelog +* Tue Mar 27 2018 Remi Collet - 6.0.4-1 +- update to 6.0.4 +- add patch to fix lang_path with RPM layout + * Sun Jan 7 2018 Remi Collet - 6.0.3-1 - Update to 6.0.3 diff --git a/sources b/sources index 8582218..5f3a4e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpmailer6-6.0.3-44d49ba.tgz) = e2291f5edacdd4857196dd61f9aa7b74b171e1e3d88a263d54e0cde3d66790acab346cab870d1dcd1e55f2b3ee1b63bfbaa676416d680354ddee723f5485943b +SHA512 (php-phpmailer6-6.0.4-3050a4a.tgz) = 0ff62ced0787344b5f3dc906d962d085144fd341aaa30d66fcb15ec4875481184baae1a908303fb91aa60a5c2d78ec9ed371d9cbe6a3c605ff16ea909f3d01f3