Group: Libraries
#Source0: https://php.net/distributions/%{orgname}-%{version}.tar.xz
Source0: https://downloads.php.net/~derick/php-%{version}%{subver}.tar.xz
Group: Libraries
#Source0: https://php.net/distributions/%{orgname}-%{version}.tar.xz
Source0: https://downloads.php.net/~derick/php-%{version}%{subver}.tar.xz
%define fileinfover %{version}
%define hashver %{version}
%define intlver %{version}
%define fileinfover %{version}
%define hashver %{version}
%define intlver %{version}
-ver=$(sed -n '/#define PHP_JSON_VERSION /{s/.* "//;s/".*$//;p}' ext/json/php_json.h)
-if test "$ver" != "%{jsonver}"; then
+ver=$(get_version PHP_JSON_VERSION ext/json/php_json.h)
+if test "$ver" != "PHP_VERSION"; then
: Error: Upstream JSON version is now ${ver}, expecting %{jsonver}.
: Update the jsonver macro and rebuild.
exit 1
: Error: Upstream JSON version is now ${ver}, expecting %{jsonver}.
: Update the jsonver macro and rebuild.
exit 1