Logoj0ke.net Open Build Service > Projects > internetx:php5:EL5:extensions > php-pecl-xhprof > Changes
Sign Up | Log In

Changes of Revision 2

[+] Deleted php-pecl-xdebug.spec
[-] Added php-pecl-xhprof.spec ^
x
 
1
@@ -0,0 +1,103 @@
2
+%global php_apiver  %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
3
+%{!?__pecl:     %{expand: %%global __pecl     %{_bindir}/pecl}}
4
+%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}
5
+
6
+%define pecl_name xhprof
7
+
8
+Name:           php-pecl-xhprof
9
+Version:        0.9.2
10
+Release:        1
11
+Summary:        PECL package for debugging PHP scripts
12
+
13
+License:        BSD
14
+Group:          Development/Languages
15
+URL:            http://pecl.php.net/package/xhprof
16
+Source0:        http://pecl.php.net/get/xhprof-%{version}.tgz
17
+
18
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19
+BuildRequires:  automake php-devel php-pear >= 1:1.4.9-1.2
20
+
21
+#BuildRequires:  libedit-devel
22
+%define config_flags --without-libedit
23
+
24
+Requires(post): %{__pecl}
25
+Requires(postun): %{__pecl}
26
+Provides:       php-pecl(Xhprof) = %{version}
27
+
28
+%if 0%{?php_zend_api}
29
+Requires:       php(zend-abi) = %{php_zend_api}
30
+Requires:       php(api) = %{php_core_api}
31
+%else
32
+Requires:       php-api = %{php_apiver}
33
+%endif
34
+
35
+%description
36
+
37
+
38
+%prep
39
+%setup -qcn xhprof-%{version}
40
+[ -f package2.xml ] || mv package.xml package2.xml
41
+mv package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml
42
+cd xhprof-%{version}
43
+
44
+# fix rpmlint warnings
45
+iconv -f iso8859-1 -t utf-8 Changelog > Changelog.conv && mv -f Changelog.conv Changelog
46
+chmod -x *.[ch]
47
+
48
+
49
+%build
50
+cd extension
51
+phpize
52
+%configure --enable-xhprof
53
+CFLAGS="$RPM_OPT_FLAGS" make
54
+
55
+%install
56
+cd extension
57
+rm -rf $RPM_BUILD_ROOT
58
+%__make install DESTDIR=$RPM_BUILD_ROOT
59
+
60
+# install config file
61
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
62
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/xhprof.ini << 'EOF'
63
+; Enable xhprof extension module
64
+zend_extension=%{php_extdir}/xhprof.so
65
+EOF
66
+
67
+# install doc files
68
+install -d docs
69
+install -pm 644 CHANGELOG CREDITS LICENSE README docs
70
+
71
+# Install XML package description
72
+install -d $RPM_BUILD_ROOT%{pecl_xmldir}
73
+install -pm 644 %{pecl_name}.xml $RPM_BUILD_ROOT%{pecl_xmldir}/%{name}.xml
74
+
75
+
76
+%if 0%{?pecl_install:1}
77
+%post
78
+%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
79
+%endif
80
+
81
+
82
+%if 0%{?pecl_uninstall:1}
83
+%postun
84
+if [ $1 -eq 0 ] ; then
85
+    %{pecl_uninstall} %{pecl_name} >/dev/null || :
86
+fi
87
+%endif
88
+
89
+
90
+%clean
91
+rm -rf $RPM_BUILD_ROOT
92
+
93
+
94
+%files
95
+%defattr(-,root,root,-)
96
+%doc xhprof-%{version}/docs/*
97
+%config(noreplace) %{_sysconfdir}/php.d/xhprof.ini
98
+%{php_extdir}/xhprof.so
99
+%{pecl_xmldir}/%{name}.xml
100
+
101
+
102
+%changelog
103
+* Thu Apr 14 2011 Carsten Schoene <cs@linux-administrator.com> - 0.9.2-1
104
+- initial bs import
105
[+] Deleted xdebug-2.0.3-codecoverage.patch ^
Deleted xdebug-2.0.5.tgz ^
Added xhprof-0.9.2.tgz ^