/[packages]/cauldron/php-esmtp/current/SPECS/php-esmtp.spec
ViewVC logotype

Contents of /cauldron/php-esmtp/current/SPECS/php-esmtp.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 47831 - (show annotations) (download)
Sun Feb 6 18:50:57 2011 UTC (10 years, 7 months ago) by spuhler
File size: 1678 byte(s)
removed buildroot definition from .spec

1 %define modname esmtp
2 %define dirname %{modname}
3 %define soname %{modname}.so
4 %define inifile A34_%{modname}.ini
5
6 Summary: ESMTP client extension for PHP
7 Name: php-%{modname}
8 Version: 0.3.1
9 Release: %mkrel 30
10 Group: Development/PHP
11 License: PHP License
12 URL: http://pecl.php.net/package/esmtp
13 Source0: esmtp-%{version}.tar.bz2
14 Patch0: esmtp-0.3.1-compile_fix.diff
15 BuildRequires: php-devel >= 3:5.2.0
16 BuildRequires: libesmtp-devel >= 1.0.3r1-1mdk
17 BuildRequires: openssl-devel
18 Epoch: 1
19
20 %description
21 Esmtp is a wrapper for SMTP client library based on the libESMTP library. You
22 can use it to send messages using internal SASL, and external/openssl SSL
23 support.
24
25 %prep
26
27 %setup -q -n esmtp-%{version}
28 %patch0 -p0
29
30 %build
31 %serverbuild
32
33 phpize
34 %configure2_5x --with-libdir=%{_lib} \
35 --with-%{modname}=shared,%{_prefix}
36
37 %make
38 mv modules/*.so .
39
40 %install
41 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
42
43 install -d %{buildroot}%{_libdir}/php/extensions
44 install -d %{buildroot}%{_sysconfdir}/php.d
45
46 install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/
47
48 cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
49 extension = %{soname}
50 EOF
51
52 %post
53 if [ -f /var/lock/subsys/httpd ]; then
54 %{_initrddir}/httpd restart >/dev/null || :
55 fi
56
57 %postun
58 if [ "$1" = "0" ]; then
59 if [ -f /var/lock/subsys/httpd ]; then
60 %{_initrddir}/httpd restart >/dev/null || :
61 fi
62 fi
63
64 %clean
65 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
66 [ "../package.xml" != "/" ] && rm -f ../package.xml
67
68 %files
69 %defattr(-,root,root)
70 %doc tests CREDITS NOTES TODO
71 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
72 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
73
74

  ViewVC Help
Powered by ViewVC 1.1.28