summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-phpmailer6-layout.patch12
-rw-r--r--php-phpmailer6.spec14
2 files changed, 23 insertions, 3 deletions
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..b9548d6 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
@@ -121,6 +123,8 @@ 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 +198,10 @@ exit $ret
%changelog
+* Tue Mar 27 2018 Remi Collet <remi@remirepo.net> - 6.0.4-1
+- update to 6.0.4
+- add patch to fix lang_path with RPM layout
+
* Sun Jan 7 2018 Remi Collet <remi@remirepo.net> - 6.0.3-1
- Update to 6.0.3