From 378e427e1b46127b3f9b94467686f9b046834c8d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 12 Sep 2019 15:06:09 +0200 Subject: new package --- php-williamdes-mariadb-mysql-kbs.spec | 154 ++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 php-williamdes-mariadb-mysql-kbs.spec (limited to 'php-williamdes-mariadb-mysql-kbs.spec') diff --git a/php-williamdes-mariadb-mysql-kbs.spec b/php-williamdes-mariadb-mysql-kbs.spec new file mode 100644 index 0000000..a8841a6 --- /dev/null +++ b/php-williamdes-mariadb-mysql-kbs.spec @@ -0,0 +1,154 @@ +# remirepo/fedora spec file for php-williamdes-mariadb-mysql-kbs +# +# Copyright (c) 2019 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# + +%global with_tests 0%{!?_without_tests:1} +# Github +%global gh_commit 64167803686aff4090f72a6d89826364b1d88d7d +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner williamdes +%global gh_project mariadb-mysql-kbs +# Packagist +%global pk_vendor %{gh_owner} +%global pk_project %{gh_project} +# Namespace +%global ns_vendor Williamdes +%global ns_project MariaDBMySQLKBS +%global major %nil + +Name: php-%{pk_vendor}-%{pk_project}%{major} +Version: 1.2.7 +Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} +Summary: An index of the MariaDB and MySQL Knowledge bases + +License: MPLv2.0 +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 + +Patch0: %{name}-layout.patch + +BuildArch: noarch +%if %{with_tests} +BuildRequires: php(language) >= 7.1 +BuildRequires: php-json +BuildRequires: php-pcre +# For tests, from composer.json "require-dev": { +# "phpunit/phpunit": "^7.0 || ^8.0", +# "phpstan/phpstan": "^0.11.3", +# "slevomat/coding-standard": "^5.0", +# "squizlabs/php_codesniffer": "^3.3", +# "php-school/cli-menu": "^3.0", +# "swaggest/json-schema": "^0.12.9" +BuildRequires: phpunit7 +%global phpunit %{_bindir}/phpunit7 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(swaggest/json-schema) > 0.12.9 with php-composer(swaggest/json-schema) < 1) +%else +BuildRequires: php-composer(swaggest/json-schema) < 1 +BuildRequires: php-composer(swaggest/json-schema) >= 0.12.9 +%endif +# For autoloader +BuildRequires: php-composer(fedora/autoloader) +%endif + +# From composer.json, "require": { +# "php": "^7.1" +Requires: php(language) >= 7.1 +# From phpcompatinfo report for 1.2.7 +Requires: php-json +Requires: php-pcre +# For generated autoloader +Requires: php-composer(fedora/autoloader) + +# Composer +Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} + + +%description +An index of the MariaDB and MySQL Knowledge bases. + + +Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 + +: Create autoloader +cat <<'AUTOLOAD' | tee src/autoload.php + - 1.2.7-1 +- initial package -- cgit