From 0f81255ffbdf2586211b954853cfba721ecbe916 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 13 Jun 2022 18:09:01 +0200 Subject: [PATCH] - fix ext_skel file conflict, fix man pages alternatives --- php.spec | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/php.spec b/php.spec index 5f849d2..f9a112c 100644 --- a/php.spec +++ b/php.spec @@ -125,7 +125,7 @@ Summary(ru.UTF-8): PHP - язык препроцессирования HTML-фа Summary(uk.UTF-8): PHP - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} Version: 8.1.7 -Release: 1 +Release: 2 Epoch: 4 # All files licensed under PHP version 3.01, except # Zend is licensed under Zend @@ -1818,7 +1818,7 @@ cp -p php.ini-production php.ini #%patch68 -p1 DROP or update to 7.0 APIs %patch71 -p1 -sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \ +sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{_bindir}/\1%{php_suffix},' \ ext/ext_skel.php \ run-tests.php @@ -2452,7 +2452,7 @@ cp -a tests/* $RPM_BUILD_ROOT%{php_data_dir}/tests/php # fix install paths, avoid evil rpaths sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la -install -p ext/ext_skel.php $RPM_BUILD_ROOT%{_bindir} +install -p ext/ext_skel.php $RPM_BUILD_ROOT%{_bindir}/ext_skel%{php_suffix} %clean rm -rf $RPM_BUILD_ROOT @@ -2470,7 +2470,7 @@ fi %post cli update-alternatives \ --install %{_bindir}/php php %{_bindir}/php%{php_suffix} %{php_suffix} \ - --slave %{_mandir}/man1/php.1 php.1 %{_mandir}/man1/php%{php_suffix}.1* || : + --slave %{_mandir}/man1/php.1.gz php.1.gz %{_mandir}/man1/php%{php_suffix}.1.gz || : %postun cli if [ $1 -eq 0 ]; then @@ -2483,10 +2483,12 @@ fi %post devel update-alternatives \ --install %{_bindir}/phpize phpize %{_bindir}/phpize%{php_suffix} %{php_suffix} \ - --slave %{_mandir}/man1/php.1 php.1 %{_mandir}/man1/php%{php_suffix}.1* || : + --slave %{_mandir}/man1/phpize.1.gz phpize.1.gz %{_mandir}/man1/phpize%{php_suffix}.1.gz || : update-alternatives \ --install %{_bindir}/php-config php-config %{_bindir}/php-config%{php_suffix} %{php_suffix} \ - --slave %{_mandir}/man1/php.1 php.1 %{_mandir}/man1/php%{php_suffix}.1* || : + --slave %{_mandir}/man1/php-config.1.gz php-config.1.gz %{_mandir}/man1/php-config%{php_suffix}.1.gz || : +update-alternatives \ + --install %{_bindir}/ext_skel ext_skel %{_bindir}/ext_skel%{php_suffix} %{php_suffix} || : %postun devel if [ $1 -eq 0 ]; then @@ -2500,7 +2502,9 @@ fi %post fpm /sbin/chkconfig --add %{name}-fpm %service %{name}-fpm restart -update-alternatives --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/php%{php_suffix}-fpm %{php_suffix} || : +update-alternatives \ + --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/php%{php_suffix}-fpm %{php_suffix} \ + --slave %{_mandir}/man8/php-fpm.8.gz php-fpm.8.gz %{_mandir}/man8/php-fpm%{php_suffix}.8.gz || : %preun fpm if [ "$1" = "0" ]; then @@ -2655,7 +2659,7 @@ fi \ %ext_post update-alternatives \ --install %{_bindir}/phar phar %{_bindir}/phar%{php_suffix}.phar %{php_suffix} \ - --slave %{_mandir}/man1/phar.1 phar.1 %{_mandir}/man1/phar%{php_suffix}.1* || : + --slave %{_mandir}/man1/phar.1.gz phar.1.gz %{_mandir}/man1/phar%{php_suffix}.1.gz || : %postun phar %ext_postun @@ -2742,7 +2746,7 @@ fi %files devel %defattr(644,root,root,755) %doc CODING_STANDARDS.md docs/*.md -%attr(755,root,root) %{_bindir}/ext_skel.php +%attr(755,root,root) %{_bindir}/ext_skel%{php_suffix} %attr(755,root,root) %{_bindir}/phpize%{php_suffix} %attr(755,root,root) %{_bindir}/php-config%{php_suffix} %ghost %{_bindir}/phpize -- 2.44.0