# inspired from fedora spec file # License: MIT # https://opensource.org/licenses/MIT %define github_name Slim %define composer_name slim %define composer_vendor slim %define php_libdir %{_datadir}/php %define slim_home %{php_libdir}/Slim %define __requires_exclude_from ^%{_datadir}/.*$ Name: php-%{composer_name} Summary: PHP micro framework Version: 4.10.0 Release: %mkrel 1 License: MIT Group: Development/PHP URL: https://www.slimframework.com/ Source0: https://github.com/slimphp/Slim/archive/refs/tags/%{version}.tar.gz BuildArch: noarch BuildRequires: php-theseer-autoload Requires: php >= 5.5.0 Requires: php-simplexml Requires: php-json Requires: php-pcre Requires: php-composer(psr/http-message) >= 1.0 Requires: php-composer(pimple/pimple) >= 3.0 Requires: php-composer(container-interop/container-interop) >= 1.1 Requires: php-composer(nikic/fast-route) >= 1.0 Provides: php-composer(%{composer_vendor}/%{composer_name}) = %{version} Provides: php-composer(psr/http-message-implementation) = 1.0 %description Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. Features: - Powerful router - Standard and custom HTTP methods - Route parameters with wildcards and conditions - Route redirect, halt, and pass - Route middleware - Template rendering with custom views - Flash messages - Secure cookies with AES-256 encryption - HTTP caching - Logging with custom log writers - Error handling and debugging - Middleware and hook architecture - Simple configuration Autoloader: %{php_libdir}/Slim/autoload.php %prep %setup -qn %{github_name}-%{version} %build %{_bindir}/phpab \ --output %{github_name}/autoload.php \ %{github_name} cat >> %{github_name}/autoload.php <<'EOF' // Dependencies require_once '%{php_libdir}/Psr/Http/Message/autoload.php'; require_once '%{php_libdir}/Interop/Container/autoload.php'; require_once '%{php_libdir}/Pimple/autoload.php'; require_once '%{php_libdir}/FastRoute/bootstrap.php'; EOF %install install -d %{buildroot}%{php_libdir} cp -pr Slim %{buildroot}%{php_libdir}/ %files %doc LICENSE.md %{php_libdir}/Slim %changelog * Tue Apr 19 2022 mokraemer <mokraemer> 4.10.0-1.mga9 + Revision: 1851939 - new version 4.10.0 * Tue Mar 22 2022 umeabot <umeabot> 3.12.3-2.mga9 + Revision: 1819768 - Mageia 9 Mass Rebuild * Tue Apr 21 2020 guillomovitch <guillomovitch> 3.12.3-1.mga8 + Revision: 1570307 - new version 3.12.3 * Wed Feb 12 2020 umeabot <umeabot> 3.9.2-3.mga8 + Revision: 1507393 - Mageia 8 Mass Rebuild * Thu Sep 20 2018 umeabot <umeabot> 3.9.2-2.mga7 + Revision: 1287873 - Mageia 7 Mass Rebuild + guillomovitch <guillomovitch> - new version 3.9.2 * Wed Oct 04 2017 guillomovitch <guillomovitch> 3.8.1-2.mga7 + Revision: 1168142 - fix dependencies * Wed Oct 04 2017 guillomovitch <guillomovitch> 3.8.1-1.mga7 + Revision: 1168085 - imported package php-slim