summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json13
-rw-r--r--php-pecl-selinux.spec48
2 files changed, 39 insertions, 22 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..ea7a753
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,13 @@
+{
+ "name": "pecl/selinux",
+ "type": "php-ext",
+ "license": "PHP-3.01",
+ "description": "SELinux binding for PHP language",
+ "require": {
+ "php": ">= 7.0.0"
+ },
+ "php-ext": {
+ "extension-name": "selinux",
+ "configure-options": []
+ }
+}
diff --git a/php-pecl-selinux.spec b/php-pecl-selinux.spec
index a691f8c..4a5c6de 100644
--- a/php-pecl-selinux.spec
+++ b/php-pecl-selinux.spec
@@ -1,7 +1,7 @@
# remirepo spec file for php-pecl-selinux
# adapted for SCL
#
-# Copyright (c) 2011-2024 Remi Collet
+# Copyright (c) 2011-2026 Remi Collet
#
# Fedora spec file for php-pecl-selinux
#
@@ -22,31 +22,42 @@
%global pecl_name selinux
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
+%global sources %{archivename}
%global _configure ../%{sources}/configure
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-security-selinux
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{version}
+
Summary: SELinux binding for PHP scripting language
Name: %{?scl_prefix}php-pecl-selinux
Version: 0.6.1
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+%forgemeta
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP-3.01
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{sources}.tgz
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: libselinux-devel >= 2.0.80
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: libselinux >= 2.0.80
+# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# PIE
Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
@@ -64,11 +75,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
pushd %{sources}
extver=$(sed -n '/#define PHP_SELINUX_VERSION/{s/.* "//;s/".*$//;p}' php_selinux.h)
if test "x${extver}" != "x%{version}"; then
@@ -121,21 +127,12 @@ cd ../ZTS
# Drop in the bit of configuration
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
%if %{with_zts}
# Install the ZTS stuff
%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Documentation
-cd %{sources}
-for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
: Minimal load test for NTS extension
@@ -163,8 +160,8 @@ REPORT_EXIT_STATUS=0 \
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/composer.json
+%doc %{sources}/README
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -176,6 +173,13 @@ REPORT_EXIT_STATUS=0 \
%changelog
+* Wed Mar 11 2026 Remi Collet <remi@remirepo.net> - 0.6.1-4
+- drop pear/pecl dependency
+- sources from github
+
+* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 0.6.1-3
+- rebuild for PHP 8.5.0RC1
+
* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 0.6.1-2
- rebuild for 8.5.0alpha3