summaryrefslogtreecommitdiffstats
path: root/php-pecl-pq.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-pq.spec')
-rw-r--r--php-pecl-pq.spec89
1 files changed, 27 insertions, 62 deletions
diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec
index 01de213..d97e4d9 100644
--- a/php-pecl-pq.spec
+++ b/php-pecl-pq.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-pecl-pq
+# without SCL compatibility, from
+#
# remirepo spec file for php-pecl-pq
#
# Copyright (c) 2014-2016 Remi Collet
@@ -6,29 +9,11 @@
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%if "%{scl}" == "rh-php56"
-%global sub_prefix more-php56-
-%else
-%global sub_prefix %{scl_prefix}
-%endif
-%endif
-
-%{?scl: %scl_package php-pecl-pq}
-%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
-%{!?__pecl: %global __pecl %{_bindir}/pecl}
-%{!?__php: %global __php %{_bindir}/php}
%global with_zts 0%{?__ztsphp:1}
%global pecl_name pq
-#global rcver RC1
-%if %{?runselftest}%{!?runselftest:1}
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
-%else
-# Build using "--with tests" to enable tests
-%global with_tests 0%{?_with_tests:1}
-%endif
%if "%{php_version}" < "5.6"
# After raph, json
%global ini_name z-%{pecl_name}.ini
@@ -38,13 +23,9 @@
%endif
Summary: PostgreSQL client library (libpq) binding
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
+Name: php-pecl-%{pecl_name}
Version: 1.0.0
-%if 0%{?rcver:1}
-Release: 0.1.%{rcver}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-%endif
+Release: 1%{?dist}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -52,41 +33,24 @@ Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?rcver}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: postgresql-devel > 9
-BuildRequires: %{?scl_prefix}php-devel > 5.4
-BuildRequires: %{?scl_prefix}php-pear
-BuildRequires: %{?scl_prefix}php-json
-BuildRequires: %{?sub_prefix}php-pecl-raphf-devel >= 1.1.0
+BuildRequires: php-devel > 5.4
+BuildRequires: php-pear
+BuildRequires: php-json
+BuildRequires: php-pecl-raphf-devel >= 1.1.0
%if %{with_tests}
BuildRequires: postgresql-server
BuildRequires: postgresql-contrib
%endif
-Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
-Requires: %{?scl_prefix}php(api) = %{php_core_api}
-Requires: %{?scl_prefix}php-json%{?_isa}
-Requires: %{?sub_prefix}php-raphf%{?_isa} >= 1.1.0
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
-# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: php(api) = %{php_core_api}
+Requires: php-json%{?_isa}
+Requires: php-pecl(raphf)%{?_isa} >= 1.1.0
+
+Provides: php-%{pecl_name} = %{version}
+Provides: php-%{pecl_name}%{?_isa} = %{version}
+Provides: php-pecl(%{pecl_name}) = %{version}
+Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
@@ -106,18 +70,17 @@ Highlights:
* Fetching simple multi-dimensional array maps
* Working Gateway implementation
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
-
%prep
%setup -q -c
mv %{pecl_name}-%{version}%{?rcver} NTS
-# Don't install tests
-sed -e '/role="test"/d' -i package.xml
+# Don't install tests nor LICENSE
+sed -e '/role="test"/d' \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
+ -i package.xml
cd NTS
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h)
if test "x${extver}" != "x%{version}%{?rcver}"; then
@@ -180,7 +143,7 @@ done
# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
+%triggerin -- php-pear
if [ -x %{__pecl} ] ; then
%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
fi
@@ -271,9 +234,8 @@ rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
%doc %{pecl_docdir}/%{pecl_name}
-%{?_licensedir:%license NTS/LICENSE}
+%license NTS/LICENSE
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -287,6 +249,9 @@ rm -rf %{buildroot}
%changelog
* Tue Jan 19 2016 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
+- cleanup for Fedora review
+
+* Tue Jan 19 2016 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
- Update to 1.0.0 (stable)
* Mon Dec 7 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.1.RC1