]>
Commit | Line | Data |
---|---|---|
20ea9748 ER |
1 | %include /usr/lib/rpm/macros.php |
2 | %define php_min_version 5.0.0 | |
3 | %define pkgname dkim | |
4 | Summary: PHP Implementation of DKIM | |
5 | Name: php-%{pkgname} | |
6 | Version: 1.0 | |
a61b25e5 | 7 | Release: 2 |
20ea9748 ER |
8 | License: GPL v2 |
9 | Group: Development/Languages/PHP | |
a61b25e5 | 10 | Source0: http://downloads.sourceforge.net/php-dkim/php-dkim.zip |
20ea9748 | 11 | # Source0-md5: 6d7e89b035f76c83ad93e597ffe9f06c |
f1e0dca3 | 12 | Patch0: library.patch |
20ea9748 ER |
13 | URL: http://php-dkim.sourceforge.net/ |
14 | BuildRequires: lynx | |
15 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
16 | BuildRequires: rpmbuild(macros) >= 1.533 | |
f127d391 | 17 | BuildRequires: unzip |
a61b25e5 ER |
18 | Requires: php(core) >= %{php_min_version} |
19 | Requires: php(date) | |
20 | Requires: php(openssl) | |
21 | Requires: php(pcre) | |
20ea9748 ER |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | # bad depsolver | |
26 | %define _noautopear pear | |
27 | ||
28 | # put it together for rpmbuild | |
29 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
30 | ||
31 | %description | |
32 | PHP-DKIM add a Domain Key Identified Mail (DKIM RFC 4871) signatures | |
33 | to emails sent by PHP. | |
34 | ||
35 | It is based on the openssl extensions of PHP. It can generate DKIM | |
36 | signature but cannot verify them. Php-dkim supports RSA signature and | |
37 | SHA-1 hash for DKIM. The relaxed header canonicalization is supported | |
38 | (only simple body canonicalization). | |
39 | ||
40 | Php-dkim allows any PHP application to send email with a DKIM | |
41 | signature this should decrease the probability of getting this email | |
42 | tagged as spam. | |
43 | ||
44 | %prep | |
45 | %setup -qc | |
46 | %undos README.html *.php | |
f1e0dca3 | 47 | %patch0 -p1 |
20ea9748 ER |
48 | |
49 | mv dkim-cfg-dist.php dkim-cfg.php | |
50 | ||
51 | %build | |
52 | lynx -dump --nolist README.html > README | |
53 | ||
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | install -d $RPM_BUILD_ROOT%{php_data_dir} | |
57 | cp -a dkim.php $RPM_BUILD_ROOT%{php_data_dir} | |
58 | ||
59 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
60 | cp -a dkim-cfg.php dkim-test.php $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %{php_data_dir}/dkim.php | |
68 | %{_examplesdir}/%{name}-%{version} |