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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44590 - (show annotations) (download)
Sat Jan 29 23:52:13 2011 UTC (13 years, 8 months ago) by spuhler
File size: 1659 byte(s)
imported package php-zookeeper
1 %define modname zookeeper
2 %define dirname %{modname}
3 %define soname %{modname}.so
4 %define inifile B09_%{modname}.ini
5
6 Summary: PHP extension for interfacing with Apache ZooKeeper
7 Name: php-%{modname}
8 Version: 0.1.0
9 Release: %mkrel 8
10 Group: Development/PHP
11 License: PHP License
12 URL: http://pecl.php.net/package/zookeeper/
13 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
14 BuildRequires: php-devel >= 3:5.2.0
15 BuildRequires: zookeeper-devel >= 3
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
17
18 %description
19 This extension provides API for communicating with ZooKeeper service.
20
21 %prep
22
23 %setup -q -n %{modname}-%{version}
24 [ "../package*.xml" != "/" ] && mv ../package*.xml .
25
26 # lib64 fix
27 perl -pi -e "s|/lib\b|/%{_lib}|g" config.m4
28
29 %build
30 %serverbuild
31
32 phpize
33 %configure2_5x --with-libdir=%{_lib} \
34 --with-%{modname}=shared,%{_prefix}
35 %make
36 mv modules/*.so .
37
38 %install
39 rm -rf %{buildroot}
40
41 install -d %{buildroot}%{_libdir}/php/extensions
42 install -d %{buildroot}%{_sysconfdir}/php.d
43
44 install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/
45
46 cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
47 extension = %{soname}
48 EOF
49
50 %post
51 if [ -f /var/lock/subsys/httpd ]; then
52 %{_initrddir}/httpd restart >/dev/null || :
53 fi
54
55 %postun
56 if [ "$1" = "0" ]; then
57 if [ -f /var/lock/subsys/httpd ]; then
58 %{_initrddir}/httpd restart >/dev/null || :
59 fi
60 fi
61
62 %clean
63 rm -rf %{buildroot}
64
65 %files
66 %defattr(-,root,root)
67 %doc CREDITS ChangeLog LICENSE README.markdown zookeeper-api.php package*.xml
68 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php.d/%{inifile}
69 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
70
71
72

  ViewVC Help
Powered by ViewVC 1.1.30