# remirepo spec file for php-bolt # # Copyright (c) 2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %{?scl:%scl_package php-bolt} %global extname bolt %global debug_package %{nil} %global __debug_install_post /bin/true %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 %global _build_id_links none %endif %global with_zts 0 %global ininame 40-%{extname}.ini Name: %{?scl_prefix}php-bolt Summary: Protect PHP Source Code Version: 1.0.4 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: Distribuable URL: https://phpbolt.com/ # see https://phpbolt.com/download-phpbolt/ Source0: https://phpbolt.com/wp-content/uploads/2023/03/phpBolt-extension-%{version}.zip Source1: https://raw.githubusercontent.com/arshidkv12/phpBolt/master/encryption.php # Message from upstream: "You can redistribute" Source2: message.eml ExclusiveArch: x86_64 BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-devel < 8.3 # ABI check Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %description Protect PHP Source Code * Encrypt and decrypt php source code. * Ensure only licensed people are using. * Free for small and medium companies. * Encode and run PHP files. * Ioncube alternative (free) Encode php source code from your php server. No need any additianal installation. Package built for PHP %(%{__php} -n -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. %prep %setup -q -c cp %{SOURCE1} . cp %{SOURCE2} . cat << 'EOF' | tee %{ininame} ; Enable "%{SUMMARY}" extension module zend_extension = %{extname}.so EOF %build : Nothing to build as tarball provides binaries %install : configuration file install -D -m 644 %{ininame} %{buildroot}%{php_inidir}/%{ininame} : PHP extension ver=$(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;') cd phpBolt-extension-%{version}/linux*64/*$ver if [ -f %{extname}.so ]; then install -D -pm 755 %{extname}.so %{buildroot}%{php_extdir}/%{extname}.so else : Module for PHP $ver not provided exit 1 fi %check : simple NTS module load test %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{extname}.so \ --ri %{extname} %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{extname}.so \ --modules | grep -E '^[Bb]olt$' %if %{with_zts} : simple ZTS module load test %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{extname}.so \ --modules | grep -E '^[Bb]olt$' %endif %files %{!?_licensedir:%global license %%doc} %license message.eml %doc encryption.php %config(noreplace) %{php_inidir}/%{ininame} %{php_extdir}/%{extname}.so %if %{with_zts} %config(noreplace) %{php_ztsinidir}/%{ininame} %{php_ztsextdir}/%{extname}.so %endif %changelog * Fri Mar 15 2024 Remi Collet - 1.0.4-1 - initial package