# remirepo/fedora spec file for php-williamdes-mariadb-mysql-kbs # # Copyright (c) 2019-2020 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 2653637d537329b2b2ba7290dc70eacf09c74072 %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.11 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} # pull from github to retrieve full data Source0: %{name}-%{version}-%{?gh_short}.tgz Source1: makesrc.sh 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 || ^8 || ^9", # "phpstan/phpstan": "^0.12", # "slevomat/coding-standard": "^6.3", # "squizlabs/php_codesniffer": "^3.4", # "swaggest/json-schema": "^0.12.29" %if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 BuildRequires: phpunit9 %global phpunit %{_bindir}/phpunit9 %else BuildRequires: phpunit8 %global phpunit %{_bindir}/phpunit8 %endif %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(swaggest/json-schema) > 0.12.29 with php-composer(swaggest/json-schema) < 1) %else BuildRequires: php-composer(swaggest/json-schema) < 1 BuildRequires: php-composer(swaggest/json-schema) >= 0.12.29 %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 -b .rpm find src -name \*.rpm -delete : Create autoloader cat <<'AUTOLOAD' | tee src/autoload.php - 1.2.11-1 - update to 1.2.11 - switch to phpunit9 * Thu Feb 27 2020 Remi Collet - 1.2.10-1 - update to 1.2.10 - sources from git snapshot * Mon Jan 27 2020 Remi Collet - 1.2.9-1 - update to 1.2.9 - switch to phpunit8 * Tue Nov 12 2019 Remi Collet - 1.2.8-1 - update to 1.2.8 * Thu Sep 12 2019 Remi Collet - 1.2.7-1 - initial package