[packages/php-symfony-Process] Initial

arekm arekm at pld-linux.org
Sat Apr 4 00:17:30 CEST 2026


commit e0d6ab1e3f198f99bb1b2abdc3881bddfe0e3b3c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Apr 4 00:17:17 2026 +0200

    Initial

 php-symfony-Process.spec | 93 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)
---
diff --git a/php-symfony-Process.spec b/php-symfony-Process.spec
new file mode 100644
index 0000000..7682914
--- /dev/null
+++ b/php-symfony-Process.spec
@@ -0,0 +1,93 @@
+%define		package	Process
+%define		php_min_version 8.2
+Summary:	Symfony Process Component
+Summary(pl.UTF-8):	Komponent Symfony Process
+Name:		php-symfony-Process
+Version:	7.2.9
+Release:	1
+License:	MIT
+Group:		Development/Languages/PHP
+Source0:	https://github.com/symfony/process/archive/v%{version}/process-%{version}.tar.gz
+# Source0-md5:	020560f28cf33035e3cc51eb7ba944e5
+URL:		https://symfony.com/doc/current/components/process.html
+BuildRequires:	php-cli
+BuildRequires:	rpmbuild(macros) >= 1.610
+Requires:	php(core) >= %{php_min_version}
+Requires:	php(pcre)
+Requires:	php(spl)
+Requires:	php-dirs >= 1.6
+Obsoletes:	php-symfony2-Process < 7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The Process Component executes commands in sub-processes.
+
+%description -l pl.UTF-8
+Komponent Process uruchamia polecenia w podprocesach.
+
+%prep
+%setup -q -n process-%{version}
+
+%{__rm} Pipes/WindowsPipes.php
+
+%build
+# generate classmap autoloader
+php -r '
+$classes = [];
+$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."));
+foreach ($rii as $file) {
+    if ($file->isDir() || $file->getExtension() !== "php") continue;
+    $path = $file->getPathname();
+    if (str_contains($path, "/Tests/")) continue;
+    $content = file_get_contents($path);
+    $tokens = token_get_all($content);
+    $ns = "";
+    for ($i = 0; $i < count($tokens); $i++) {
+        if (is_array($tokens[$i]) && $tokens[$i][0] === T_NAMESPACE) {
+            $ns = "";
+            for ($j = $i+1; $j < count($tokens); $j++) {
+                if (is_array($tokens[$j]) && in_array($tokens[$j][0], [T_NAME_QUALIFIED, T_STRING]))
+                    $ns .= $tokens[$j][1];
+                elseif ($tokens[$j] === ";") break;
+            }
+        }
+        if (is_array($tokens[$i]) && in_array($tokens[$i][0], [T_CLASS, T_INTERFACE, T_TRAIT, T_ENUM])) {
+            if ($i > 0 && is_array($tokens[$i-1]) && $tokens[$i-1][0] === T_DOUBLE_COLON) continue;
+            for ($j = $i+1; $j < count($tokens); $j++) {
+                if (is_array($tokens[$j]) && $tokens[$j][0] === T_STRING) {
+                    $cn = $ns ? $ns . "\\\\" . $tokens[$j][1] : $tokens[$j][1];
+                    $rp = substr($path, 1); // strip leading "."
+                    $classes[$cn] = $rp;
+                    break;
+                }
+            }
+        }
+    }
+}
+ksort($classes);
+$f = fopen("autoload.php", "w");
+fwrite($f, "<?php\nspl_autoload_register(\n    function(\$class) {\n        static \$classes = null;\n        if (\$classes === null) {\n            \$classes = array(\n");
+foreach ($classes as $c => $p) {
+    fwrite($f, "                " . var_export($c, true) . " => " . var_export($p, true) . ",\n");
+}
+fwrite($f, "            );\n        }\n        \$cn = strtolower(\$class);\n        if (isset(\$classes[\$cn])) {\n            require __DIR__ . \$classes[\$cn];\n        }\n    },\n    true,\n    false\n);\n");
+fclose($f);
+'
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{php_data_dir}/Symfony/Component/%{package}
+cp -a *.php */ $RPM_BUILD_ROOT%{php_data_dir}/Symfony/Component/%{package}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG.md LICENSE README.md
+%dir %{php_data_dir}/Symfony/Component/Process
+%{php_data_dir}/Symfony/Component/Process/*.php
+%{php_data_dir}/Symfony/Component/Process/Exception
+%{php_data_dir}/Symfony/Component/Process/Messenger
+%{php_data_dir}/Symfony/Component/Process/Pipes
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-symfony-Process.git/commitdiff/e0d6ab1e3f198f99bb1b2abdc3881bddfe0e3b3c



More information about the pld-cvs-commit mailing list