# remirepo/fedora spec file for pie # # SPDX-FileCopyrightText: Copyright 2024 Remi Collet # SPDX-License-Identifier: CECILL-2.1 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # # remirepo:3 # For compatibility with SCL %undefine __brp_mangle_shebangs %global gh_commit e7fcd163cf77e3ae878f6bee9a590e1fd00b2a26 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20241003 %global gh_branch main %global gh_owner php %global gh_project pie %global upstream_version 0.6.0 #global upstream_prever dev #global upstream_lower DEV %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) %global bashcomproot %(dirname %{bashcompdir} 2>/dev/null) Name: pie Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} Release: 1%{?dist} Summary: PHP Installer for Extensions # SPDX: pie is BSD-3-Clause, all dependencies are MIT License: BSD-3-Clause AND MIT URL: https://github.com/php/pie # tarball generated by makesrc.sh Source0: %{gh_project}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tgz Source1: %{name}-bash-completion # Create a git snapshot with dependencies Source9: makesrc.sh # Fix autoloader path Patch0: %{name}-rpm.patch # Don't use XDG directories Patch1: %{name}-noxdg.patch # Don't use bundled cacert.pem Patch2: %{name}-nocacert.patch BuildArch: noarch # platform set in makesrc.sh BuildRequires: php(language) >= 8.1 BuildRequires: php-cli BuildRequires: php-json BuildRequires: php-zip BuildRequires: pkgconfig(bash-completion) BuildRequires: composer-generators # From composer.json, "require": { # "php": "8.1.*||8.2.*||8.3.*||8.4.*", # "ext-zip": "*", Requires: php(language) >= 8.1 Requires: php-cli Requires: php-zip # System certificates Requires: ca-certificates # From phpcompatinfo # Ignored: core, date, filter, hash, pcre, random, reflection, spl, standard Requires: php-ctype Requires: php-curl Requires: php-dom Requires: php-intl Requires: php-json Requires: php-mbstring Requires: php-posix Requires: php-phar %description PIE (PHP Installer for Extensions). PIE can install an extension to any installed PHP version. A list of extensions that support PIE can be found on https://packagist.org/extensions. Documentation: /usr/share/doc/pie/docs/usage.md %prep %setup -q -n %{gh_project}-%{gh_commit} %patch -P0 -p1 -b .rpm %patch -P1 -p1 -b .noxdg %patch -P2 -p1 -b .nocacert find . \( -name \*.rpm -o -name \*noxdg -o -name \*nocacert \) -delete -print rm vendor/composer/ca-bundle/res/cacert.pem : Set version sed -e 's/@pie_version@/%{upstream_version}%{?upstream_prever}/' -i bin/pie %build # Nothing %install : Bash auto-completion install -Dpm 644 %{SOURCE1} %{buildroot}%{bashcompdir}/%{name} : Sources and dependencies mkdir -p %{buildroot}%{_datadir}/%{name} cp -pr src %{buildroot}%{_datadir}/%{name}/src cp -pr vendor %{buildroot}%{_datadir}/%{name}/vendor : Command install -Dpm 755 bin/%{name} %{buildroot}%{_bindir}/%{name} : Licenses cd vendor for lic in */*/LICENSE do dir=$(dirname $lic) own=$(dirname $dir) prj=$(basename $dir) ln -sf ../../pie/vendor/$own/$prj/LICENSE ../$own-$prj-LICENSE done %files %license LICENSE.md %license *LICENSE %doc README.md %doc docs %doc composer.json %{_bindir}/%{name} %{_datadir}/%{name} %{bashcomproot} %changelog * Wed Jan 29 2025 Remi Collet - 0.6.0-1 - update to 0.6.0 - always use composer-generators * Thu Jan 9 2025 Remi Collet - 0.5.0-1 - update to 0.5.0 * Wed Jan 1 2025 Remi Collet - 0.4.0-1 - update to 0.4.0 * Tue Dec 24 2024 Remi Collet - 0.3.0-2 - fix patch to not use XDG directories so use ~/.pie instead of ~/.config/pie * Tue Dec 24 2024 Remi Collet - 0.3.0-1 - update to 0.3.0 * Fri Dec 13 2024 Remi Collet - 0.2.0-2 - re-license spec file to CECILL-2.1 * Tue Nov 19 2024 Remi Collet - 0.2.0-1 - update to 0.2.0 * Wed Oct 30 2024 Remi Collet - 0.1.0-2 - refresh dependencies - add patches from composer to skip XDG and drop bundled cacert.rpm * Thu Oct 10 2024 Remi Collet - 0.1.0-1 - update to 0.1.0 (pre-release) * Fri Oct 4 2024 Remi Collet - 0.0.0~DEV-1.20241003.bbb9b6b - Initial package from dev-main