remi pushed to php-pecl-jsonc (master). "add condition"
notifications at fedoraproject.org
notifications at fedoraproject.org
Fri Mar 27 14:17:42 UTC 2015
>From abbda7d89e3c2e46e864560fb31b9ae0e598ebb4 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi at fedoraproject.org>
Date: Fri, 27 Mar 2015 15:17:32 +0100
Subject: add condition
diff --git a/php-pecl-jsonc.spec b/php-pecl-jsonc.spec
index 2e03d59..5ebe166 100644
--- a/php-pecl-jsonc.spec
+++ b/php-pecl-jsonc.spec
@@ -28,10 +28,14 @@ Summary: Support for JSON serialization
Name: php-pecl-%{proj_name}
Version: 1.3.7
Release: 2%{?dist}
+%if %{with_libjson}
+License: PHP
+%else
# PHP extension is PHP
# jsonc-c is MIT
# json-c/linkhask.c is Public Domain
License: PHP and MIT and Public Domain
+%endif
Group: Development/Languages
URL: http://pecl.php.net/package/%{proj_name}
Source0: http://pecl.php.net/get/%{proj_name}-%{version}.tgz
@@ -78,13 +82,17 @@ These are the files needed to compile programs using JSON serializer.
%prep
%setup -q -c
+cd %{proj_name}-%{version}
+%if %{with_libjson}
+rm -rf json-c
+%else
# https://github.com/remicollet/pecl-json-c/commit/09501b8c0fdb27ee5d1c225a368f7a8c3654fe0f
sed -e '/AUTHORS/s/role="src"/role="doc"/' \
-e '/COPYING/s/role="src"/role="doc"/' \
- -i package.xml
+ -i ../package.xml
+%endif
-cd %{proj_name}-%{version}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_JSON_VERSION/{s/.* "//;s/".*$//;p}' php_json.h )
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
@@ -182,7 +190,10 @@ fi
%files
-%{?_licensedir:%license %{proj_name}-%{version}/LICENSE %{proj_name}-%{version}/json-c/COPYING}
+%{?_licensedir:%license %{proj_name}-%{version}/LICENSE}
+%if ! %{with_libjson}
+%{?_licensedir:%license %{proj_name}-%{version}/json-c/COPYING}
+%endif
%doc %{pecl_docdir}/%{pecl_name}
%config(noreplace) %{php_inidir}/%{ini_name}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/php-pecl-jsonc.git/commit/?h=master&id=abbda7d89e3c2e46e864560fb31b9ae0e598ebb4
More information about the scm-commits
mailing list