summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-03-26 17:00:20 +0100
committerRemi Collet <fedora@famillecollet.com>2014-03-26 17:00:20 +0100
commitdb0a4dcddade3b1220c84721c5d02f04b2f9d35f (patch)
treef816f9a8730ff9f1bde53ac2ad465be192248f1d
parentcd955610db69c963d7424cb21bd10e9757a85e06 (diff)
php-pecl-krb5: cleanups
-rw-r--r--php-pecl-krb5.spec13
1 files changed, 7 insertions, 6 deletions
diff --git a/php-pecl-krb5.spec b/php-pecl-krb5.spec
index 76a1456..43a2601 100644
--- a/php-pecl-krb5.spec
+++ b/php-pecl-krb5.spec
@@ -28,7 +28,7 @@ Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: krb5-devel >= 1.8
-BuildRequires: libcom_err-devel
+BuildRequires: pkgconfig(com_err)
BuildRequires: %{?scl_prefix}php-devel > 5.2
BuildRequires: %{?scl_prefix}php-pear
@@ -86,11 +86,6 @@ These are the files needed to compile programs using the Kerberos extension.
mv %{pecl_name}-%{version} NTS
cd NTS
-# Workaroud for old libcom_err
-if [ -f %{_root_includedir}/et/com_err.h ]
-then cp %{_root_includedir}/et/com_err.h .
-fi
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_KRB5_EXT_VERSION/{s/.* "//;s/".*$//;p}' php_krb5.h)
if test "x${extver}" != "x%{version}"; then
@@ -112,6 +107,8 @@ EOF
%build
+export CFLAGS="%{optflags} $(pkg-config --cflags com_err)"
+
peclbuild() {
%configure \
--with-krb5 \
@@ -196,8 +193,10 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
+
%config(noreplace) %{php_inidir}/%{pecl_name}.ini
%{php_extdir}/%{pecl_name}.so
+
%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini
%{php_ztsextdir}/%{pecl_name}.so
@@ -207,7 +206,9 @@ rm -rf %{buildroot}
%files devel
%defattr(-,root,root,-)
%doc %{pecl_testdir}/%{pecl_name}
+
%{php_incldir}/ext/%{pecl_name}
+
%if %{with_zts}
%{php_ztsincldir}/ext/%{pecl_name}
%endif