# remirepo spec file for php-composer-installers, from: # # Fedora spec file for php-composer-installers # # Copyright (c) 2015-2018 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT # # Please preserve changelog entries # %global github_owner composer %global github_name installers %global github_version 1.5.0 %global github_commit 049797d727261bf27f2690430d935067710049c2 %global composer_vendor composer %global composer_project installers # "composer-plugin-api": "^1.0" %global composer_plugin_min_ver 1.0 %global composer_plugin_max_ver 2.0 # "composer/composer": "1.0.*@dev" %global composer_min_ver 1.0 %global composer_max_ver 2.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: A multi-framework Composer library installer License: MIT URL: http://composer.github.io/installers/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz BuildArch: noarch # Tests %if %{with_tests} ## composer.json %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(composer/composer) >= %{composer_min_ver} with php-composer(composer/composer) < %{composer_max_ver}) BuildRequires: (php-composer(composer-plugin-api) >= %{composer_plugin_min_ver} with php-composer(composer-plugin-api) < %{composer_plugin_max_ver}) %else BuildRequires: php-composer(composer/composer) < %{composer_max_ver} BuildRequires: php-composer(composer/composer) >= %{composer_min_ver} BuildRequires: php-composer(composer-plugin-api) < %{composer_plugin_max_ver} BuildRequires: php-composer(composer-plugin-api) >= %{composer_plugin_min_ver} %endif BuildRequires: php-composer(phpunit/phpunit) ## phpcompatinfo (computed from version 1.5.0) BuildRequires: php(language) >= 5.3.0 BuildRequires: php-pcre BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # composer.json %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(composer-plugin-api) >= %{composer_plugin_min_ver} with php-composer(composer-plugin-api) < %{composer_plugin_max_ver}) %else Requires: php-composer(composer-plugin-api) >= %{composer_plugin_min_ver} Requires: php-composer(composer-plugin-api) < %{composer_plugin_max_ver} %endif # phpcompatinfo (computed from version 1.5.0) Requires: php(language) >= 5.3.0 Requires: php-pcre Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} %description This is for PHP package authors to require in their composer.json. It will install their package to the correct location based on the specified package type. The goal of installers is to be a simple package type to install path map. Users can also customize the install path per package and package authors can modify the package name upon installing. installers isn't intended on replacing all custom installers. If your package requires special installation handling then by all means, create a custom installer to handle it. Autoloader: %{phpdir}/Composer/Installers/autoload.php %prep %setup -qn %{github_name}-%{github_commit} %build : Create autoloader cat <<'AUTOLOAD' | tee src/Composer/Installers/autoload.php - 1.5.0-1 - update to 1.5.0 - use range dependencies on F27+ * Sun Oct 08 2017 Shawn Iwinski - 1.4.0-1 - Updated to 1.4.0 (RHBZ #1479799) * Sat Apr 29 2017 Shawn Iwinski - 1.3.0-1 - Updated to 1.3.0 (RHBZ #1444845) - Added max version constraint to php-composer(composer/composer) dependency - Switched autoloader to php-composer(fedora/autoloader) - Test with SCLs if available * Sun Sep 11 2016 Shawn Iwinski - 1.2.0-1 - Updated to 1.2.0 (RHBZ #1372115) * Sat Jul 23 2016 Shawn Iwinski - 1.1.0-1 - Updated to 1.1.0 (RHBZ #1352896) - Updated URL * Thu Apr 14 2016 Remi Collet - 1.0.25-1 - update to 1.0.25 * Wed Apr 6 2016 Remi Collet - 1.0.24-1 - update to 1.0.24 * Sat Mar 12 2016 Shawn Iwinski - 1.0.23-1 - Updated to 1.0.23 (RHBZ #1302488) * Fri Feb 26 2016 Remi Collet - 1.0.23-1 - update to 1.0.23 - run test suite with both PHP 5 and 7 when available * Wed Nov 04 2015 Shawn Iwinski - 1.0.22-2 - Dependency updates * Wed Nov 04 2015 Shawn Iwinski - 1.0.22-1 - Updated to 1.0.22 (RHBZ #1276816) * Fri Oct 30 2015 Remi Collet - 1.0.22-1 - update to 1.0.22 * Tue Aug 25 2015 Remi Collet - 1.0.21-1 - backport for #remirepo * Thu Aug 20 2015 Shawn Iwinski - 1.0.21-1 - Initial package