summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-PHPMailer.spec93
1 files changed, 41 insertions, 52 deletions
diff --git a/php-PHPMailer.spec b/php-PHPMailer.spec
index f7df75e..c3c6cd1 100644
--- a/php-PHPMailer.spec
+++ b/php-PHPMailer.spec
@@ -1,17 +1,19 @@
-Name: php-PHPMailer
-Summary: PHP email transport class with a lot of features
-Version: 5.2.4
-Release: 1%{?dist}
-License: LGPLv2+
-Group: System Environment/Libraries
-Source0: http://phpmailer.apache-extras.org.codespot.com/files/PHPMailer_%{version}.tgz
-URL: http://phpmailer.worxware.com/
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Buildarch: noarch
-
-Requires: php-mbstring
-
+%global github_user Synchro
+%global github_app PHPMailer
+%global github_tag 4d9434e
+
+%global arch_name %{github_user}-%{github_app}-%{github_tag}
+
+Name: php-PHPMailer
+Summary: PHP email transport class with a lot of features
+Version: 5.2.6
+Release: 3%{?dist}
+License: LGPLv2+
+Group: System Environment/Libraries
+Source0: https://github.com/Synchro/PHPMailer/tarball/%{github_tag}/%{arch_name}-%{version}.tar.gz
+URL: http://phpmailer.worxware.com/
+Requires: php-mbstring >= 5.1.0
+Buildarch: noarch
%description
Full Featured Email Transfer Class for PHP. PHPMailer features:
@@ -41,41 +43,22 @@ Full Featured Email Transfer Class for PHP. PHPMailer features:
%prep
#-------------------------------------------------------------------------------
-%setup -q -n PHPMailer_%{version}
-
-pushd docs/phpdoc/js/prettify
-
-NONUTF="lang-apollo.js
-lang-vb.js
-lang-tex.js
-lang-vhdl.js
-lang-scala.js
-lang-lua.js
-lang-ml.js
-lang-wiki.js
-lang-sql.js
-lang-go.js"
-
-for file in $NONUTF
-do
- iconv -f iso-8859-1 -t utf-8 $file > $file.utf
- mv $file.utf $file
-done
-popd
+%setup -q -n %{arch_name}
#-------------------------------------------------------------------------------
%build
#-------------------------------------------------------------------------------
-# Make sure all file lines are \n terminated.
+# Make sure all file lines are \n terminated.
find . -type f -exec sed -i -e 's/[\r\t ]*$//' '{}' ';'
-# Change default language path.
+# Change default language path.
-sed -e "/function SetLanguage/s#'language/'#'%{_datadir}/PHPMailer/language/'#" \
- -i class.phpmailer.php
+sed -i -e \
+ "/function SetLanguage/s#'language/'#'%{_datadir}/PHPMailer/language/'#" \
+ class.phpmailer.php
#-------------------------------------------------------------------------------
@@ -84,29 +67,32 @@ sed -e "/function SetLanguage/s#'language/'#'%{_datadir}/PHPMailer/language/'#"
rm -rf "${RPM_BUILD_ROOT}"
-# install directories.
+# install directories.
install -p -d -m 755 "${RPM_BUILD_ROOT}/%{_datadir}/php/PHPMailer/"
install -p -d -m 755 "${RPM_BUILD_ROOT}/%{_datadir}/PHPMailer/language/"
-# Install class files.
+# Install class files.
-install -p -m 644 class.phpmailer.php ${RPM_BUILD_ROOT}/%{_datadir}/php/PHPMailer/
-install -p -m 644 class.smtp.php ${RPM_BUILD_ROOT}/%{_datadir}/php/PHPMailer/
-install -p -m 644 class.pop3.php ${RPM_BUILD_ROOT}/%{_datadir}/php/PHPMailer/
+install -p -m 644 \
+ class.phpmailer.php "${RPM_BUILD_ROOT}/%{_datadir}/php/PHPMailer/"
+install -p -m 644 class.smtp.php "${RPM_BUILD_ROOT}/%{_datadir}/php/PHPMailer/"
+install -p -m 644 class.pop3.php "${RPM_BUILD_ROOT}/%{_datadir}/php/PHPMailer/"
-# Install language files (these are not gettextized).
-install -p -m 644 language/*.php ${RPM_BUILD_ROOT}/%{_datadir}/PHPMailer/language
+# Install language files (these are not gettextized).
-# Tag language files.
+install -p -m 644 language/*.php \
+ "${RPM_BUILD_ROOT}/%{_datadir}/PHPMailer/language"
+
+# Tag language files.
(
- cd "${RPM_BUILD_ROOT}"
- find ".%{_datadir}/PHPMailer/language" -name "phpmailer.lang-*.php" |
- sed -e 's/^\.//' \
- -e 's#^.*/phpmailer\.lang-\(.*\)\.php$#%lang(\1) &#'
+ cd "${RPM_BUILD_ROOT}"
+ find ".%{_datadir}/PHPMailer/language" -name "phpmailer.lang-*.php" |
+ sed -e 's/^\.//' \
+ -e 's#^.*/phpmailer\.lang-\(.*\)\.php$#%lang(\1) &#'
) > files.list
@@ -121,7 +107,7 @@ rm -rf "${RPM_BUILD_ROOT}"
%files -f files.list
#-------------------------------------------------------------------------------
%defattr(-, root, root, -)
-%doc docs/* README LICENSE changelog.txt
+%doc docs/* README.md LICENSE changelog.md
%doc examples
%{_datadir}/php/PHPMailer
%dir %{_datadir}/PHPMailer
@@ -129,6 +115,9 @@ rm -rf "${RPM_BUILD_ROOT}"
%changelog
+* Tue Apr 16 2013 Patrick Monnerat <pm@datasphere.ch> 5.2.6-1
+- New upstream release: source moved to github.
+
* Wed Mar 27 2013 Remi Collet <RPMS@FamilleCollet.com> - 5.2.4-1
- Update to 5.2.4