From 1e2063fc8af7d76b9f652589b3788c025115d00b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Jan 2019 16:34:19 +0100 Subject: new package --- php-symfony-contracts.spec | 154 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 php-symfony-contracts.spec (limited to 'php-symfony-contracts.spec') diff --git a/php-symfony-contracts.spec b/php-symfony-contracts.spec new file mode 100644 index 0000000..1dcd78e --- /dev/null +++ b/php-symfony-contracts.spec @@ -0,0 +1,154 @@ +# remirepo/fedora spec file for php-symfony-contracts +# +# Copyright (c) 2019 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%global gh_commit 1aa7ab2429c3d594dd70689604b5cf7421254cdf +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner symfony +%global gh_project contracts +# Packagist +%global pk_vendor %{gh_owner} +%global pk_project %{gh_project} +# Namespace +%global ns_vendor Symfony +%global ns_project Contracts +%global php_home %{_datadir}/php +# Test +%global with_tests 0%{!?_without_tests:1} + +Name: php-%{pk_vendor}-%{pk_project} +Version: 1.0.2 +Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} +Summary: A set of abstractions extracted out of the Symfony + +License: MIT +URL: https://github.com/%{gh_owner}/%{gh_project} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz + +BuildArch: noarch +%if %{with_tests} +# For tests +BuildRequires: php(language) >= 7.1.3 +BuildRequires: php-reflection +BuildRequires: php-pcre +BuildRequires: php-spl +BuildRequires: php-intl +# From composer.json, "require-dev": { +# "psr/cache": "^1.0", +# "psr/container": "^1.0" +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >=8 +BuildRequires: (php-composer(psr/cache) >= 1.0 with php-composer(psr/cache) < 2) +BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) +# remirepo:4 +%else +BuildRequires: php-psr-cache +BuildRequires: php-psr-container +%endif +%global phpunit %{_bindir}/phpunit7 +BuildRequires: %{phpunit} +# Autoloader +BuildRequires: php-composer(fedora/autoloader) +%endif + +# From composer.json, "require": { +# "php": "^7.1.3" +Requires: php(language) >= 7.1.3 +# From composer.json, "suggest": { +# "psr/cache": "When using the Cache contracts", +# "psr/container": "When using the Service contracts", +# "symfony/cache-contracts-implementation": "", +# "symfony/service-contracts-implementation": "", +# "symfony/translation-contracts-implementation": "" +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >=8 +Recommends: (php-composer(psr/cache) >= 1.0 with php-composer(psr/cache) < 2) +Recommends: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) +# remirepo:1 +%endif +# From phpcompatinfo report for version 1.0.2 +Requires: php-reflection +Requires: php-pcre +Requires: php-spl +Requires: php-intl +# Autoloader +Requires: php-composer(fedora/autoloader) + +Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} + + +%description +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components +proved useful - and that already have battle tested implementations. + +Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + + +%build +: Create autoloader +cat <<'AUTOLOAD' | tee autoload.php + - 1.0.2-1 +- initial package, version 1.0.2 -- cgit