summaryrefslogtreecommitdiffstats
path: root/php-PHPMailer.spec
blob: f9f599b0ef93902fb12f8ab18c99c7ccc50774a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
%global		github_user	PHPMailer
%global		github_app	PHPMailer
%global		github_tag	b56c9b684923153112e5b72d23182b469aa44070

%global		arch_name	%{github_app}-%{github_tag}

Name:		php-PHPMailer
Summary:	PHP email transport class with a lot of features
Version:	5.2.9
Release:	1%{?dist}
License:	LGPLv2+
Group:		System Environment/Libraries
URL:		http://phpmailer.worxware.com/

Source0:	https://github.com/%{github_user}/%{github_app}/archive/%{github_tag}/%{github_app}-%{version}.tar.gz

# Fix language default path
# Don't rely on autoloader (for app which overides __construct)
Patch0:		%{github_app}-path.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Buildarch:	noarch

Requires:	php-mbstring >= 5.1.0

Provides:	php-composer(phpmailer/phpmailer) = %{version}


%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 %{arch_name}

%patch0 -p1 -b .rpm

rm docs/generatedocs.sh


#-------------------------------------------------------------------------------
%build
#-------------------------------------------------------------------------------

#	Make sure all file lines are \n terminated.

find . -type f -exec sed -i -e 's/[\r\t ]*$//' '{}' ';'


#-------------------------------------------------------------------------------
%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.*.php PHPMailerAutoload.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, -)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc docs/* README.md changelog.md
%doc examples
%{_datadir}/php/PHPMailer
%dir %{_datadir}/PHPMailer
%dir %{_datadir}/PHPMailer/language


%changelog
* Fri Sep 26 2014 Remi Collet <remi@fedoraproject.org> - 5.2.9-1
- update to 5.2.9

* Mon Aug 11 2014 Remi Collet <remi@fedoraproject.org> - 5.2.8-1
- update to 5.2.8
- provide php-composer(phpmailer/phpmailer)
- explicit dependencies
- fix license handling
- fix language dir using a patch instead of sed
- provide upstream autoloader

* 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

* Mon Dec 24 2012 Remi Collet <RPMS@FamilleCollet.com> - 5.2.2-1
- Update to 5.2.2, rebuild for remi repository

* Sun Dec 23 2012 Johan Cwiklinski <johan AT x-tnd DOT be> - 5.2.2-1
- Latest upstream release

* 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.