summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-04-24 16:19:41 +0200
committerRemi Collet <remi@remirepo.net>2019-04-24 16:19:41 +0200
commite81839095c18a05323552c7ca8332c767d6ba2af (patch)
tree399c75768555a53f90070274aa71ae58853cc7b3
parentc74f263e513d208e4eea2f09d1b32ff5117c7bb7 (diff)
cleanup
-rwxr-xr-xmakesrc.sh27
-rw-r--r--php-zstd.spec101
2 files changed, 15 insertions, 113 deletions
diff --git a/makesrc.sh b/makesrc.sh
deleted file mode 100755
index ea1e7e8..0000000
--- a/makesrc.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-NAME=$(basename $PWD)
-OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
-PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
-VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
-COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
-SHORT=${COMMIT:0:7}
-
-echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
-
-echo "Cloning..."
-rm -rf $PROJECT-$COMMIT
-git clone --recursive https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
-
-echo "Getting commit..."
-pushd $PROJECT-$COMMIT
-git checkout $COMMIT
-popd
-
-echo "Archiving..."
-tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
-
-echo "Cleaning..."
-rm -rf $PROJECT-$COMMIT
-
-echo "Done."
diff --git a/php-zstd.spec b/php-zstd.spec
index 18809c0..19e9545 100644
--- a/php-zstd.spec
+++ b/php-zstd.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-zstd
+# without SCL compatibility from:
+#
# remirepo spec file for php-zstd
#
# Copyright (c) 2018-2019 Remi Collet
@@ -7,97 +10,38 @@
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-zstd
-%else
-%global pkg_name %{name}
-%endif
-
-%if 0%{?fedora} >= 99 || 0%{?rhel} >= 99
-%global with_libzstd 1
-%else
-%global with_libzstd 0
-%endif
-%global zstdver 1.4.0
-
%global gh_commit d4fa116c59d7fd31c2fb242b0ad8ad02bdeccd67
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner kjdev
%global gh_project php-ext-zstd
-#global gh_date 20160608
%global pecl_name zstd
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
Summary: Zstd Extension for PHP
-Name: %{?sub_prefix}php-%{pecl_name}
+Name: php-%{pecl_name}
Version: 0.7.3
-%if 0%{?gh_date:1}
-Release: 1%{gh_date}git%{gh_short}%{?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
-%if %{?with_libzstd}
+Release: 1
License: MIT
-%else
-# bundled library is BSD
-License: MIT and BSD
-%endif
URL: https://github.com/%{gh_owner}/%{gh_project}
-Source0: %{pkg_name}-%{version}-%{gh_short}.tgz
-# retrieve a recursive git snapshot with submodule
-Source1: makesrc.sh
-
-BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel
-%if %{?with_libzstd}
-BuildRequires: libzstd-devel >= %{zstdver}
-%else
-Provides: bundled(libzstd) = %{zstdver}
-%endif
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
-Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
-Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-%{pecl_name} <= %{version}
-Obsoletes: php71w-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-%{pecl_name} <= %{version}
-Obsoletes: php72w-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73u-%{pecl_name} <= %{version}
-Obsoletes: php73w-%{pecl_name} <= %{version}
-%endif
-%endif
+BuildRequires: gcc
+BuildRequires: php-devel
+BuildRequires: pkgconfig(libzstd)
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: php(api) = %{php_core_api}
%description
This extension allows Zstd compression.
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
-
%package devel
Summary: %{name} developer files (header)
Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: %{?scl_prefix}php-devel%{?_isa}
-Provides: %{?scl_prefix}php-%{pecl_name}-devel = %{version}-%{release}
-Provides: %{?scl_prefix}php-%{pecl_name}-devel%{?_isa} = %{version}-%{release}
+Requires: php-devel%{?_isa}
%description devel
These are the files needed to compile programs using %{name}.
@@ -108,14 +52,9 @@ These are the files needed to compile programs using %{name}.
mv %{gh_project}-%{gh_commit} NTS
cd NTS
-# replace symlink
-rm LICENSE-zstd
-mv zstd/LICENSE LICENSE-libzstd
-%if %{?with_libzstd}
# Use the system library
rm -r zstd
-%endif
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_ZSTD_EXT_VERSION/{s/.* "//;s/".*$//;p}' php_zstd.h)
@@ -144,9 +83,7 @@ cd NTS
%{_bindir}/phpize
%configure \
--with-php-config=%{_bindir}/php-config \
-%if %{?with_libzstd}
--with-libzstd \
-%endif
--with-libdir=%{_lib} \
--enable-zstd
make %{?_smp_mflags}
@@ -156,9 +93,7 @@ cd ../ZTS
%{_bindir}/zts-phpize
%configure \
--with-php-config=%{_bindir}/zts-php-config \
-%if %{?with_libzstd}
--with-libzstd \
-%endif
--with-libdir=%{_lib} \
--enable-zstd
make %{?_smp_mflags}
@@ -182,12 +117,6 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%check
export REPORT_EXIT_STATUS=1
-%if %{?with_libzstd}
-ver=$(pkg-config libzstd --modversion)
-if [ "$ver" != "%{zstdver}" ] ; then
-export REPORT_EXIT_STATUS=0
-fi
-%endif
cd NTS
: Minimal load test for NTS extension
@@ -217,9 +146,6 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
%files
%{!?_licensedir:%global license %%doc}
%license NTS/LICENSE
-%if ! %{?with_libzstd}
-%license NTS/LICENSE-libzstd
-%endif
%doc NTS/README.md
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -242,6 +168,9 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
%changelog
* Wed Apr 24 2019 Remi Collet <remi@remirepo.net> - 0.7.3-1
+- cleanup for Fedora review
+
+* Wed Apr 24 2019 Remi Collet <remi@remirepo.net> - 0.7.3-1
- update to 0.7.3
* Tue Apr 23 2019 Remi Collet <remi@remirepo.net> - 0.7.2-1