summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-06-10 07:14:25 +0200
committerRemi Collet <fedora@famillecollet.com>2012-06-10 07:14:25 +0200
commit1cefe9747b37a0b6300490780be2cdeced559e5e (patch)
tree8738fd46fb5b0257cd41493a0a2d04290c228620
repo reorg
-rw-r--r--Makefile4
-rw-r--r--PHPMailer-5.2.1-php53.patch105
-rw-r--r--PHPMailer_5.2.1.tgzbin0 -> 192045 bytes
-rw-r--r--php-PHPMailer.spec156
4 files changed, 265 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/PHPMailer-5.2.1-php53.patch b/PHPMailer-5.2.1-php53.patch
new file mode 100644
index 0000000..2a0d339
--- /dev/null
+++ b/PHPMailer-5.2.1-php53.patch
@@ -0,0 +1,105 @@
+diff -up PHPMailer_5.2.1/docs/use_gmail.txt.orig PHPMailer_5.2.1/docs/use_gmail.txt
+--- PHPMailer_5.2.1/docs/use_gmail.txt.orig 2012-03-20 18:59:04.665629722 +0100
++++ PHPMailer_5.2.1/docs/use_gmail.txt 2012-03-20 19:00:29.325624132 +0100
+@@ -8,7 +8,7 @@ include("class.smtp.php"); // note, this
+ $mail = new PHPMailer();
+
+ $body = $mail->getFile('contents.html');
+-$body = eregi_replace("[\]",'',$body);
++$body = preg_replace("[\]",'',$body);
+
+ $mail->IsSMTP();
+ $mail->SMTPAuth = true; // enable SMTP authentication
+diff -up PHPMailer_5.2.1/examples/test_mail_basic.php.orig PHPMailer_5.2.1/examples/test_mail_basic.php
+--- PHPMailer_5.2.1/examples/test_mail_basic.php.orig 2012-03-20 18:59:33.545627815 +0100
++++ PHPMailer_5.2.1/examples/test_mail_basic.php 2012-03-20 19:00:29.341624132 +0100
+@@ -11,7 +11,7 @@ require_once('../class.phpmailer.php');
+ $mail = new PHPMailer(); // defaults to using php "mail()"
+
+ $body = file_get_contents('contents.html');
+-$body = eregi_replace("[\]",'',$body);
++$body = preg_replace("[\]",'',$body);
+
+ $mail->AddReplyTo("name@yourdomain.com","First Last");
+
+diff -up PHPMailer_5.2.1/examples/test_pop_before_smtp_basic.php.orig PHPMailer_5.2.1/examples/test_pop_before_smtp_basic.php
+--- PHPMailer_5.2.1/examples/test_pop_before_smtp_basic.php.orig 2012-03-20 18:59:12.433629208 +0100
++++ PHPMailer_5.2.1/examples/test_pop_before_smtp_basic.php 2012-03-20 19:00:29.334624132 +0100
+@@ -14,7 +14,7 @@ $pop->Authorise('pop3.yourdomain.com', 1
+ $mail = new PHPMailer();
+
+ $body = file_get_contents('contents.html');
+-$body = eregi_replace("[\]",'',$body);
++$body = preg_replace("[\]",'',$body);
+
+ $mail->IsSMTP();
+ $mail->SMTPDebug = 2;
+diff -up PHPMailer_5.2.1/examples/test_sendmail_basic.php.orig PHPMailer_5.2.1/examples/test_sendmail_basic.php
+--- PHPMailer_5.2.1/examples/test_sendmail_basic.php.orig 2012-03-20 18:59:26.719628266 +0100
++++ PHPMailer_5.2.1/examples/test_sendmail_basic.php 2012-03-20 19:00:29.341624132 +0100
+@@ -13,7 +13,7 @@ $mail = new PHPMailer(); //
+ $mail->IsSendmail(); // telling the class to use SendMail transport
+
+ $body = file_get_contents('contents.html');
+-$body = eregi_replace("[\]",'',$body);
++$body = preg_replace("[\]",'',$body);
+
+ $mail->AddReplyTo("name@yourdomain.com","First Last");
+
+diff -up PHPMailer_5.2.1/examples/test_smtp_basic_no_auth.php.orig PHPMailer_5.2.1/examples/test_smtp_basic_no_auth.php
+--- PHPMailer_5.2.1/examples/test_smtp_basic_no_auth.php.orig 2012-03-20 18:59:48.193626848 +0100
++++ PHPMailer_5.2.1/examples/test_smtp_basic_no_auth.php 2012-03-20 19:00:29.342624132 +0100
+@@ -17,7 +17,7 @@ require_once('../class.phpmailer.php');
+ $mail = new PHPMailer();
+
+ $body = file_get_contents('contents.html');
+-$body = eregi_replace("[\]",'',$body);
++$body = preg_replace("[\]",'',$body);
+
+ $mail->IsSMTP(); // telling the class to use SMTP
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
+diff -up PHPMailer_5.2.1/examples/test_smtp_basic.php.orig PHPMailer_5.2.1/examples/test_smtp_basic.php
+--- PHPMailer_5.2.1/examples/test_smtp_basic.php.orig 2012-03-20 18:59:41.282627305 +0100
++++ PHPMailer_5.2.1/examples/test_smtp_basic.php 2012-03-20 19:00:29.342624132 +0100
+@@ -17,7 +17,7 @@ require_once('../class.phpmailer.php');
+ $mail = new PHPMailer();
+
+ $body = file_get_contents('contents.html');
+-$body = eregi_replace("[\]",'',$body);
++$body = preg_replace("[\]",'',$body);
+
+ $mail->IsSMTP(); // telling the class to use SMTP
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
+diff -up PHPMailer_5.2.1/examples/test_smtp_gmail_basic.php.orig PHPMailer_5.2.1/examples/test_smtp_gmail_basic.php
+--- PHPMailer_5.2.1/examples/test_smtp_gmail_basic.php.orig 2012-03-20 18:59:19.688628730 +0100
++++ PHPMailer_5.2.1/examples/test_smtp_gmail_basic.php 2012-03-20 19:00:29.341624132 +0100
+@@ -17,7 +17,7 @@ require_once('../class.phpmailer.php');
+ $mail = new PHPMailer();
+
+ $body = file_get_contents('contents.html');
+-$body = eregi_replace("[\]",'',$body);
++$body = preg_replace("[\]",'',$body);
+
+ $mail->IsSMTP(); // telling the class to use SMTP
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
+diff -up PHPMailer_5.2.1/test_script/index.php.orig PHPMailer_5.2.1/test_script/index.php
+--- PHPMailer_5.2.1/test_script/index.php.orig 2012-03-20 19:00:03.270625851 +0100
++++ PHPMailer_5.2.1/test_script/index.php 2012-03-20 19:00:29.343624132 +0100
+@@ -51,7 +51,7 @@ if ( $_POST['submit'] == "Submit" ) {
+
+ if ( $_POST['Message'] == '' ) {
+ $body = $mail->getFile('contents.html');
+- $body = eregi_replace("[\]",'',$body);
++ $body = preg_replace("[\]",'',$body);
+ } else {
+ $body = $_POST['Message'];
+ }
+@@ -196,7 +196,7 @@ $mail = new PHPMailer();
+ <?php
+ if ( $_POST['Message'] == '' ) {
+ echo '$body = $mail->getFile(\'contents.html\');' . "\n";
+- echo '$body = eregi_replace("[\]",\'\',$body);' . "\n";
++ echo '$body = preg_replace("[\]",\'\',$body);' . "\n";
+ } else {
+ echo '$body = ' . $_POST['Message'] . "\n";
+ }
diff --git a/PHPMailer_5.2.1.tgz b/PHPMailer_5.2.1.tgz
new file mode 100644
index 0000000..bdcdba1
--- /dev/null
+++ b/PHPMailer_5.2.1.tgz
Binary files differ
diff --git a/php-PHPMailer.spec b/php-PHPMailer.spec
new file mode 100644
index 0000000..e956ccb
--- /dev/null
+++ b/php-PHPMailer.spec
@@ -0,0 +1,156 @@
+Name: php-PHPMailer
+Summary: PHP email transport class with a lot of features
+Version: 5.2.1
+Release: 1%{?dist}
+License: LGPLv2+
+Group: System Environment/Libraries
+Source0: http://phpmailer.apache-extras.org.codespot.com/files/PHPMailer_%{version}.tgz
+Patch1: PHPMailer-5.2.1-php53.patch
+URL: http://phpmailer.worxware.com/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: php-mbstring >= 5.1.0
+Buildarch: noarch
+
+%description
+Full Featured Email Transfer Class for PHP. PHPMailer features:
+
+ * Supports emails digitally signed with S/MIME encryption!
+ * Supports emails with multiple TOs, CCs, BCCs and REPLY-TOs
+ * Works on any platform.
+ * Supports Text & HTML emails.
+ * Embedded image support.
+ * Multipart/alternative emails for mail clients that do not read
+ HTML email.
+ * Flexible debugging.
+ * Custom mail headers.
+ * Redundant SMTP servers.
+ * Support for 8bit, base64, binary, and quoted-printable encoding.
+ * Word wrap.
+ * Multiple fs, string, and binary attachments (those from database,
+ string, etc).
+ * SMTP authentication.
+ * Tested on multiple SMTP servers: Sendmail, qmail, Postfix, Gmail,
+ Imail, Exchange, etc.
+ * Good documentation, many examples included in download.
+ * It's swift, small, and simple.
+
+
+#-------------------------------------------------------------------------------
+%prep
+#-------------------------------------------------------------------------------
+
+%setup -q -n PHPMailer_%{version}
+
+%patch1 -p 1
+
+
+#-------------------------------------------------------------------------------
+%build
+#-------------------------------------------------------------------------------
+
+# Make sure all file lines are \n terminated.
+
+find . -type f -exec sed -i -e 's/[\r\t ]*$//' '{}' ';'
+
+# Change default language path.
+
+sed -i -e \
+ "/function SetLanguage/s#'language/'#'%{_datadir}/PHPMailer/language/'#" \
+ class.phpmailer.php
+
+
+#-------------------------------------------------------------------------------
+%install
+#-------------------------------------------------------------------------------
+
+rm -rf "${RPM_BUILD_ROOT}"
+
+# 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 -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"
+
+# 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) &#'
+) > files.list
+
+
+#-------------------------------------------------------------------------------
+%clean
+#-------------------------------------------------------------------------------
+
+rm -rf "${RPM_BUILD_ROOT}"
+
+
+#-------------------------------------------------------------------------------
+%files -f files.list
+#-------------------------------------------------------------------------------
+
+%defattr(-, root, root, -)
+%doc docs/* README LICENSE changelog.txt
+%doc examples
+%{_datadir}/php/PHPMailer
+%dir %{_datadir}/PHPMailer
+%dir %{_datadir}/PHPMailer/language
+
+
+#-------------------------------------------------------------------------------
+%changelog
+#-------------------------------------------------------------------------------
+* Thu Mar 22 2012 Remi Collet <RPMS@FamilleCollet.com> - 5.2.1-1
+- Update to 5.2.1, rebuild for remi repository
+
+* Tue Mar 20 2012 Johan Cwiklinski <johan AT x-tnd DOT be> - 5.2.1-1
+- Latest upstream release
+
+* Thu Jul 21 2011 Remi Collet <RPMS@FamilleCollet.com> - 5.1.4
+- rebuild for remi repository
+- add BuildRoot for old version
+
+* Mon Jul 18 2011 Patrick Monnerat <pm@datasphere.ch> 5.1-4
+- Patch "sign" to fix mail signing.
+ https://sourceforge.net/tracker/?func=detail&aid=3370322&group_id=26031&atid=385709
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Thu Jul 8 2010 Patrick Monnerat <pm@datasphere.ch> 5.1-2
+- Get rid of dos2unix build requirement and of BuildRoot rpm tag.
+
+* Fri Jan 15 2010 Patrick Monnerat <pm@datasphere.ch> 5.1-1
+- New upstream release.
+- Moved endline conversion and default language path update from prep to
+ build section.
+- Patch "php53" to remove PHP 5.3 deprecated features.
+
+* Mon Aug 3 2009 Patrick Monnerat <pm@datasphere.ch> 5.0.2-3
+- Home page change.
+- Package description from new home page.
+- Requires php-mbstring.
+
+* Fri Jun 19 2009 Patrick Monnerat <pm@datasphere.ch> 5.0.2-2
+- Suppress "ed" build requirement.
+- Tag language files.
+- Move class files to a package-specific directory.
+
+* Tue Jun 2 2009 Patrick Monnerat <pm@datasphere.ch> 5.0.2-1
+- Initial RPM spec file.