]> git.pld-linux.org Git - packages/php-phpmailer.git/blob - php-phpmailer.spec
up to 5.2.7 (September 12th 2013)
[packages/php-phpmailer.git] / php-phpmailer.spec
1 %define         pkgname phpmailer
2 %define         php_min_version 5.2.4
3 %include        /usr/lib/rpm/macros.php
4 Summary:        Full featured email transfer class for PHP
5 Summary(pl.UTF-8):      W pełni funkcjonalna klasa PHP do przesyłania e-maili
6 Name:           php-%{pkgname}
7 Version:        5.2.7
8 Release:        1
9 License:        LGPL v2.1
10 Group:          Development/Languages/PHP
11 Source0:        https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz
12 # Source0-md5:  b07621694679cd625af3f53771502677
13 Patch0:         paths.patch
14 URL:            https://github.com/PHPMailer/PHPMailer
15 BuildRequires:  php-pear-PhpDocumentor
16 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
17 BuildRequires:  rpmbuild(macros) >= 1.663
18 Requires:       php(core) >= %{php_min_version}
19 Requires:       php(date)
20 Requires:       php(pcre)
21 Suggests:       php(hash)
22 Suggests:       php(mbstring)
23 Suggests:       php(openssl)
24 Obsoletes:      phpmailer
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _appdir         %{php_data_dir}/%{pkgname}
29 %define         _phpdocdir      %{_docdir}/phpdoc
30
31 # exclude optional php dependencies
32 %define         _noautophp      php-openssl php-mbstring php-filter php-hash
33
34 # bad depsolver
35 %define         _noautoreq_pear extras/ntlm_sasl_client.php extras/class.html2text.php
36
37 # put it together for rpmbuild
38 %define         _noautoreq      %{?_noautophp}
39
40 %description
41 PHP email transport class featuring multiple file attachments, SMTP
42 servers, CCs, BCCs, HTML messages, and word wrap, and more. It can
43 send email via sendmail, PHP mail(), or with SMTP. Methods are based
44 on the popular AspEmail active server component.
45
46 %description -l pl.UTF-8
47 Klasa PHP do przesyłania e-mail obsługująca wiele załączników
48 plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii
49 itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo
50 poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail.
51
52 %package phpdoc
53 Summary:        Online manual for %{name}
54 Summary(pl.UTF-8):      Dokumentacja online do %{name}
55 Group:          Documentation
56 Requires:       php-dirs
57
58 %description phpdoc
59 Documentation for %{name}.
60
61 %description phpdoc -l pl.UTF-8
62 Dokumentacja do %{name}.
63
64 %prep
65 %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}}
66 %patch0 -p1
67
68 %build
69 phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer -f 'class.*.php'
70 # nuke smarty cache
71 rm -rf phpdoc/????????????????????????????????
72 rm -rf phpdoc/*/????????????????????????????????
73
74 # copy images, phpdoc is likely buggy not doing itself
75 sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images
76 install -d phpdoc/media/images
77 cp -a $sdir/Constant.png phpdoc/media/images
78 cp -a $sdir/Variable.png phpdoc/media/images
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT%{_appdir}/language
83
84 cp -p class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir}
85 # plugins: for smtp and pop before smtp auth
86 cp -p class.{smtp,pop3}.php  $RPM_BUILD_ROOT%{_appdir}
87 # language: translations of error messages
88 cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language
89
90 # extras: htmlfilter.php, ntlm_sasl_client.php
91 cp -a extras $RPM_BUILD_ROOT%{_appdir}
92
93 # examples
94 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
96
97 # api doc
98 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
99 cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %files
105 %defattr(644,root,root,755)
106 %doc README.md changelog.md docs/*
107 %{php_data_dir}/class.phpmailer.php
108
109 %dir %{_appdir}
110 %{_appdir}/class.pop3.php
111 %{_appdir}/class.smtp.php
112 %dir %{_appdir}/language
113 %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php
114 %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php
115 %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php
116 %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php
117 %lang(da) %{_appdir}/language/phpmailer.lang-dk.php
118 %lang(de) %{_appdir}/language/phpmailer.lang-de.php
119 %lang(eo) %{_appdir}/language/phpmailer.lang-eo.php
120 %lang(es) %{_appdir}/language/phpmailer.lang-es.php
121 %lang(et) %{_appdir}/language/phpmailer.lang-et.php
122 %lang(fa) %{_appdir}/language/phpmailer.lang-fa.php
123 %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php
124 %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php
125 %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php
126 %lang(he) %{_appdir}/language/phpmailer.lang-he.php
127 %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php
128 %lang(it) %{_appdir}/language/phpmailer.lang-it.php
129 %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php
130 %lang(lt) %{_appdir}/language/phpmailer.lang-lt.php
131 %lang(nb) %{_appdir}/language/phpmailer.lang-no.php
132 %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php
133 %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php
134 %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php
135 %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php
136 %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php
137 %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php
138 %lang(sv) %{_appdir}/language/phpmailer.lang-se.php
139 %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php
140 %lang(uk) %{_appdir}/language/phpmailer.lang-uk.php
141 %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php
142 %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php
143
144 %dir %{_appdir}/extras
145 %{_appdir}/extras/EasyPeasyICS.php
146 %{_appdir}/extras/class.html2text.php
147 %{_appdir}/extras/htmlfilter.php
148 %{_appdir}/extras/ntlm_sasl_client.php
149
150 %{_examplesdir}/%{name}-%{version}
151
152 %files phpdoc
153 %defattr(644,root,root,755)
154 %{_phpdocdir}/%{pkgname}
This page took 0.495219 seconds and 4 git commands to generate.