summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-05 10:19:36 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-05 10:19:36 +0000
commitf6985c9916e4d57aa6ddbfe2e67d51299bba0638 (patch)
tree481ade5810a02e074bcef213eb5ac62be9a763ab
parent95ef75ec28db912bbd6b557d73144430c0c39b43 (diff)
automatic import of php-ioncube-loaderopeneuler24.03_LTS_SP1
-rw-r--r--.gitignore2
-rw-r--r--LICENSE.txt243
-rw-r--r--USER-GUIDE.txt330
-rw-r--r--php-ioncube-loader.spec211
-rw-r--r--sources2
5 files changed, 788 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..50c63ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/ioncube_loaders_lin_aarch64_14.4.0.tar.gz
+/ioncube_loaders_lin_x86-64_14.4.0.tar.gz
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..bd92bd8
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,243 @@
+LICENCE AGREEMENT FOR THE IONCUBE PHP LOADER, PROVIDED TO ENABLE THE USE
+OF IONCUBE ENCODED FILES AND AS PART OF THE IONCUBE24 SERVICE (ioncube24.com)
+
+YOU SHOULD CAREFULLY READ THE FOLLOWING TERMS AND CONDITIONS BEFORE USING THE
+LOADER SOFTWARE. THE INSTALLATION AND/OR USE OR COPYING OF THE IONCUBE PHP
+LOADER SOFTWARE INDICATES YOUR ACCEPTANCE OF THIS LICENCE AGREEMENT. IF YOU
+DO NOT ACCEPT THE TERMS OF THIS LICENCE AGREEMENT, DO NOT INSTALL, COPY
+AND/OR USE THE LOADER SOFTWARE.
+
+DEFINITIONS
+
+The following definitions shall apply in this document:
+
+LOADER shall mean the ionCube PHP Loader software package or collection
+of Loaders, including any modifications or upgrades to the software, used for
+executing PHP scripts previously encoded with the ionCube PHP Encoder
+software to render them non-humanly readable, and any associated
+documentation or electronic or online materials relating to the software.
+
+ENCODER shall mean any ionCube PHP Encoder software or service used for the
+purpose of producing non-humanly readable encoded files from PHP scripts.
+
+ENCODED FILE shall mean a non-humanly readable file produced by the
+Encoder and being derived from humanly readable PHP script source.
+
+PROVIDER shall mean ionCube Ltd.
+
+USER/YOU shall mean any entity who has downloaded or obtained through any
+other means a version of the Loader software.
+
+
+1 LICENSE ENTITLEMENT
+
+1.1 The Loader is provided without charge. Title to the Loader does not pass
+to the user in any circumstances. The Loader is supplied as object code.
+
+1.2 The provider grants a personal, non-transferable, non-exclusive licence to
+use the Loader in accordance with the terms and conditions of this Licence
+Agreement.
+
+1.3 The installation or downloading and use of the Loader entitles the user
+to install and use the Loader for its own internal lawful purposes.
+
+
+2 DISTRIBUTION
+
+2.1 The Loader may be freely distributed to third parties alone or as
+part of a distribution containing other items provided that this license
+is also included.
+
+2.2 The Loader may under no circumstances be branded as another product,
+whether distributed or not.
+
+2.3 Distribution as part of a commercial product is permitted provided such
+distribution is in accordance with clauses 2.1 and 2.2 with respect to the
+Loader.
+
+
+3 ANALYSIS / REVERSE ENGINEERING / MODIFICATION
+
+Except insofar as the user is permitted to do so in accordance with applicable
+law:
+
+3.1 Any analysis of the Loader and embedded data by any means and by
+any entity whether human or otherwise and including but without limitation to
+discover details of internal operation, to reverse engineer, to de-compile
+object code, or to modify for the purposes of modifying behaviour is
+forbidden.
+
+3.2 Any analysis of encoded files by any means and by any entity whether human
+or otherwise and including but without limitation to discover details of file
+format or for the purposes of modifying behaviour or scope of their usage is
+forbidden.
+
+
+4 WARRANTY
+
+THE LOADER SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+WARRANTIES INCLUDING BUT WITHOUT LIMITATION THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE ARE
+DISCLAIMED. THE PROVIDER DOES NOT WARRANT THAT THE LOADER IS UNINTERRUPTED
+OR ERROR FREE, NOR THAT THE OPERATION OF THE LOADER WILL FUNCTION IN
+CONJUNCTION WITH ANY OTHER PRODUCT.
+
+
+5 LIMITATION OF LIABILITY
+
+5.1 IN NO EVENT WILL THE PROVIDER OF THE LOADER BE LIABLE TO THE USER OR ANY
+PARTY FOR ANY DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER
+CONSEQUENTIAL DAMAGES ARISING DIRECTLY OR INDIRECTLY FROM THIS LICENCE
+AGREEMENT OR ANY USE OF THE LOADER OR ENCODED FILES, EVEN IF THE PROVIDER IS
+EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+5.2 THE LOADER IS PROVIDED ON AN "AS IS" BASIS. THE PROVIDER EXCLUDES ALL
+WARRANTIES, CONDITIONS, TERMS, UNDERTAKINGS AND REPRESENTATIONS (EXCLUDING
+FRAUDULENT MISREPRESENTATION) OF ANY KIND, EXPRESS OR IMPLIED, STATUTORY OR
+OTHERWISE IN CONNECTION WITH THE LOADER TO THE FULLEST EXTENT PERMITTED BY
+LAW.
+
+5.3 DOWNLOADING THE LOADER IS AT YOUR OWN RISK AND THE PROVIDER DOES NOT
+ACCEPT LIABILITY FOR ANY DIRECT OR INDIRECT LOSS OR DAMAGE HOWSOEVER CAUSED AS
+A RESULT OF ANY COMPUTER VIRUSES, BUGS, TROJAN HORSES, WORMS, SOFTWARE BOMBS
+OR OTHER SIMILAR PROGRAMS ARISING FROM YOUR USE OF THE LOADER. WHILST THE
+PROVIDER WILL DO ITS BEST TO ENSURE THAT THE LOADER IS FREE FROM SUCH
+DESTRUCTIVE PROGRAMS, IT IS YOUR RESPONSIBILITY TO TAKE REASONABLE PRECAUTIONS
+TO SCAN FOR SUCH DESTRUCTIVE PROGRAMS DOWNLOADED FROM THE INTERNET.
+
+5.4 THE PROVIDER'S MAXIMUM LIABILITY FOR ANY LOSS OR DAMAGE ARISING FROM THIS
+LICENCE AGREEMENT SHALL IN ANY EVENT BE LIMITED IN THE SOLE DISCRETION OF THE
+PROVIDER TO THE REPLACEMENT OF THE LOADER PRODUCT.
+
+5.5 DUE TO THE NATURE OF THE INTERNET, THE PROVIDER CANNOT GUARANTEE THAT ANY
+E-MAILS OR OTHER ELECTRONIC TRANSMISSIONS WILL BE SENT TO YOU OR RECEIVED BY
+THE PROVIDER OR THAT THE CONTENT OF SUCH TRANSMISSIONS WILL BE SECURE DURING
+TRANSMISSION.
+
+
+6 BUG FIXING AND PRODUCT SUPPORT
+
+6.1 The provider will use reasonable endeavours to provide support to users.
+The provider will at their discretion only provide support for the latest
+release.
+
+6.2 Support comprises of fault reporting via tickets and fault diagnosis,
+recommendations on workarounds, and where reasonably possible a timely
+resolution.
+
+6.3 The user accepts that on occasion the ability of the provider to meet
+anticipated or published support schedules may be impaired due to, but without
+limitation, Internet service provider failures or software failures that
+affect the ability to communicate for an indeterminate period.
+
+6.4 The provider reserves the right to refuse to provide support at any time.
+
+6.5 The provider wishes to maintain and offer a product of the highest
+possible quality, and accordingly may from time to time and at its discretion
+make product changes for the purpose of correcting behaviour in variance to
+the published specification or the user's reasonable expectations.
+
+6.6 The provider reserves the right to charge for support where the user does
+not have a valid support plan in place, or where the support offered exceeds
+the scope of the active support plan.
+
+
+7 PRODUCT UPGRADES
+
+7.1 The provider may from time to time release product upgrades. These will
+be provided free of charge and attempts made to provide a timely notification
+to customers of the existence of any new release.
+
+
+8 ERRORS AND OMISSIONS
+
+Whilst reasonable endeavours are made to ensure the accuracy of documentation
+concerning the details of the Loader, the user accepts the possibility of
+inaccuracies in information presented in any format, including email
+communications and online services. The provider shall under no circumstances
+be liable for any events that arise as a result of unintentional inaccuracies
+or omissions.
+
+
+9 USER INDEMNITY
+
+You agree to fully indemnify, defend and hold the provider harmless
+immediately upon demand from and against all actions, liability, claims,
+losses, damages, costs and expenses (including legal/attorney fees) incurred
+by the provider arising directly or indirectly as a result of your breach of
+this Licence Agreement.
+
+
+10 INTELLECTUAL PROPERTY RIGHTS
+
+10.1 The user acknowledges that the Loader and associated documentation and
+materials contain proprietary information of the provider and are and shall
+remain the exclusive property of the provider and/or its licensors and all
+title, copyright, trade marks, trade names, patents and other intellectual
+property rights therein of whatever nature shall remain the sole property of
+the provider and/or its licensors.
+
+10.2 No title to or rights of ownership, copyright or other intellectual
+property in the Loader is transferred to the user (other than the licence
+rights expressly granted in this Licence Agreement).
+
+
+11 TERMINATION
+
+11.1 The provider reserves the right to terminate this Licence Agreement
+immediately by notice in writing against the user if the user is in breach of
+any terms and conditions of this Licence Agreement.
+
+11.2 Termination of this Licence Agreement for any reason shall be without
+prejudice to any other rights or remedies of the provider which may have
+arisen on or before the date of termination under this Licence Agreement or in
+law.
+
+11.3 The provisions of the following clauses shall survive any termination of
+this agreement; clause 3, 5, 10 and 13.
+
+
+12 GENERAL
+
+12.1 The provider reserves the right to transfer or assign all or any of its
+rights and duties and responsibilities set out in this Licence Agreement to
+another party.
+
+12.2 Headings have been included for convenience only and will not be used in
+construing any provision of this Licence Agreement.
+
+12.3 No delay or failure by the provider to exercise any powers, rights or
+remedies under this Licence Agreement will operate as a waiver of them nor
+will any single or partial exercise of any such powers, rights or remedies
+include any other or further exercise of them.
+
+12.4 If any part of this Licence Agreement is found by a court of competent
+jurisdiction or other competent authority to be invalid, unlawful or
+unenforceable then such part shall be severed from the remainder of this
+Licence Agreement which will continue to be valid and enforceable to the
+fullest extent permitted by applicable law.
+
+12.5 This Licence Agreement including the documents or other sources referred
+to herein supersede all prior representations, understandings and agreements
+between the user and the provider relating to the Loader and sets forth the
+entire agreement and understanding between the user and the provider relating
+to the Loader.
+
+12.6 Nothing in this Licence Agreement shall be deemed to constitute a
+partnership between you and the provider nor constitute either party being an
+agent of the other party.
+
+12.7 This Agreement does not create any rights or benefits enforceable by any
+person not a party to it (within the meaning of the U.K.Contracts (Rights of
+Third Parties) Act 1999) except that a person who under clause 12.1 is a
+permitted successor or assignee of the rights or benefits of the provider may
+enforce such rights or benefits.
+
+
+13 GOVERNING LAW AND JURISDICTION
+
+This License Agreement and any issues relating thereto shall be construed and
+interpreted in accordance with the laws of England and subject to the
+exclusive jurisdiction of the English courts.
+
+Copyright (c) 2002-2017 ionCube Ltd. Last revised 23-April-2015
diff --git a/USER-GUIDE.txt b/USER-GUIDE.txt
new file mode 100644
index 0000000..93bb3c7
--- /dev/null
+++ b/USER-GUIDE.txt
@@ -0,0 +1,330 @@
+ionCube Loader 10 User Guide
+============================
+
+This document describes the available php.ini configuration options of the
+ionCube Loader that relate to processing of PHP encoded files, and also the
+ionCube24 service. It also describes which encoded files can be run by each
+ionCube Loader.
+
+PERFORMANCE OF ENCODED FILES
+----------------------------
+
+We recommend that the encoded paths feature (see below) is used
+with encoded files in order to maximise performance.
+
+ENCODED FILES
+-------------
+
+INI entry: ioncube.loader.encoded_paths
+
+Purpose: Specify the locations of encoded files
+
+ The ionCube Loader will normally examine a PHP file before processing
+ to test whether it is encoded, and will run the file itself if necessary.
+ Although this checking is very efficient, restricting which files the
+ Loader tests for being encoded may give extra performance. If set to
+ a series of paths or files, only files in those locations are tested.
+
+ Entries should be separated by a : on Unix and ; on Windows.
+ A path may be prefixed with + or - to add or remove that path from
+ the possible locations. + is assumed if no character is given.
+
+
+Examples: (... means ioncube.loader.encoded_paths)
+
+ * Site with a single encoded module in /var/www/html/modules/RSS
+
+... = "/var/www/html/modules/RSS"
+
+
+ * As above, with a site configuration file encoded too.
+
+... = "/var/www/html/modules/RSS:/var/www/html/config/config.php"
+
+
+ * Encoded files may be anywhere except for /var/www/html/framework
+
+... = "/:-/var/www/html/framework"
+
+
+ * Site with most modules encoded except for one
+
+... = "/var/www/html/modules:-/var/www/html/modules/plain"
+
+
+ * As above, with an encoded config file in the plain directory
+
+... = "/site/modules:-/site/modules/plain:/site/modules/plain/config.php"
+
+
+Locations:
+
+ The ioncube.loader.encoded_paths property can be set in a php.ini
+ file, in a .htaccess file (when using Apache), in a .user.ini file
+ (when using CGI PHP 5.3+) or using ini_set within a PHP script. In ini
+ files only the last value will be used for the encoded_paths property. If
+ you wish to build up the value in several lines then, for PHP 5.1+, you
+ can use the following syntax:
+
+ioncube.loader.encoded_paths = "/path1"
+ioncube.loader.encoded_paths = ${ioncube.loader.encoded_paths}":/path2"
+; etc...
+
+LIMITATIONS OF LOADERS AND ENCODED FILES
+----------------------------------------
+
+Encoded files can, in general, run on versions of PHP equal to
+or greater than the source language of the Encoder used to
+produce them. So a file produced by the Encoder for PHP 5.3
+can be run by the Loaders for PHP 5.3, 5.4, 5.5 and PHP 5.6. This
+means that the Loaders are highly backwards compatible. However, there
+are the following limitations:
+
+ * The Loader for PHP 7.1 can only run files produced by the
+ Encoder for PHP 7.1 included in the version 10 Encoder.
+
+ * The Loader for PHP 7.0 can only run files produced by the
+ Encoder for PHP 5.6.
+
+ * The Loaders for PHP 5.5 and PHP 5.6 cannot run files
+ produced by the PHP 4 Encoder.
+
+
+IONCUBE24 : real-time intrusion protection and PHP error reporting
+---------
+### (Available for Linux 32 and 64 bit x86 servers)
+
+ionCube24 (https://ioncube24.com) is an ionCube service that uses the
+ionCube Loader to provide both real-time protection against the exploit of
+website vulnerabilities and alerting of website errors.
+
+Vulnerabilities in PHP applications are common, particularly in sites using
+Wordpress and other plugin based systems. Exploits result in website
+defacement or customer data being compromised, and ionCube24 provides a
+uniquely powerful defense.
+
+PHP errors can cause intermittent or even persistent blank pages or errors for
+visitors until discovered, and without active monitoring this could go
+undetected indefinitely. ionCube24 active monitoring ensures you are always
+aware of problems in your website code.
+
+ionCube24 is free to try, with the server side support built into the Linux
+Loaders as standard. With the Loader installed, ionCube24 can be activated
+at any time to give active intrusion protection and error reporting.
+
+## php.ini settings
+
+ionCube24 has a powerful real-time web interface to configure, monitor and
+manage things, and there are also settings that can be used in a php.ini
+file as summarised below.
+
+The setup process at https://ioncube24.com automatically gives the settings
+that you need to get started, but you may wish to make changes yourself
+once setup. The default values are given with each example.
+
+### Global settings
+
+INI entry: ic24.enable ; default 0
+
+Purpose: Enable or disable all ionCube24 features.
+
+This defaults to 0 (off), and in this case no ionCube24 behaviour is
+activated.
+
+Example:
+
+ ic24.enable = 1
+
+----------
+
+INI entry: ic24.api_access_key ; provided during setup
+
+Purpose: An authentication key for adminstration requests.
+
+ This value is provided when adding a server to ionCube24.
+
+----------
+
+INI entry: ic24.api_check_ip ; default 1
+
+Purpose: Specify whether the IP for admin requests should be validated
+
+ If set, ionCube24 refuses access to API functions unless the calling IP
+ is a known ionCube IP address. This option should be left with the
+ default setting unless web requests pass through a proxy and your site
+ appears to be accessed from the IP of the proxy instead of ionCube. Note
+ that access to API functions will still be authenticated by access key.
+
+----------
+
+INI entry: ic24.api_max_timeout ; default 7
+
+Purpose: Maximum timeout period when sending notifications to ionCube24.
+
+ The actual period is adaptive so that a brief increase in typical latency
+ will favour a timeout followed by a retry rather than a longer than usual
+ timeout.
+
+----------
+
+INI entry: ic24.home_dir ; no default
+
+Purpose: The home directory for ionCube24 related system files.
+
+ A location outside of the web root is recommended. It should be writable
+ by the web server during startup.
+
+Example:
+
+ic24.home_dir = /var/www/ic24_home
+
+----------
+
+INI entry: ic24.update_domains_retry_interval ; default 30
+
+Purpose: The number of seconds to wait before retrying a fetch of the set
+of domains being managed.
+
+
+### Security related settings
+
+INI entry: ic24.sec.enable ; default "auto"
+
+Purpose: Enable the intrusion protection feature of ionCube24.
+
+Accepted values:
+
+ * "auto" (default) - allow setting from the ionCube24 control panel.
+ * 1 : always enabled.
+ * 0 : disabled.
+
+----------
+
+INI entry: ic24.sec.initial_state ; default 1
+
+Purpose: The default for whether security should be enabled or
+disabled. The default is to enable protection. Any files on a protected
+domain will become blocked if they are changed, so setting this to 0 will
+avoid accidental blocking when using ionCube24 for the first time.
+Protection may be enabled and disabled using the ionCube24 control panel and
+also via the User API.
+
+Accepted values:
+
+ * 1 : protection will be active when ionCube24 initialises.
+ * 0 : protection will be disabled.
+
+----------
+
+INI entry: ic24.sec.initial_action ; default "block"
+
+Purpose: The initial setting for how new and modified files should be
+treated when about to execute. The default is to block. The action is taken
+only if protection is enabled, and the setting may be changed via the
+ionCube24 control panel.
+
+Accepted values:
+
+ * "block" : prevent execution of new or modified files
+ * "allow" : allow execution of new or modified files
+
+Note that depending on the notification settings, a notification may still
+be generated when a new or modified file is about to execute even if it is
+not blocked.
+
+----------
+
+INI entry: ic24.sec.initial_notify ; default "always"
+
+Purpose: The initial setting for whether a notification is generated the
+first time an unacknowledged new or modified file is attempted to be
+executed. This setting can be changed via the ionCube24 control panel.
+
+Accepted values:
+
+ * "always" : always notify of a new modification
+ * "once" : only the first detected modification is reported
+ * "never" : never notify of new and modified files
+
+----------
+
+INI entry: ic24.sec.exclusion_key ; provided during setup
+
+Purpose: A key that if present at the start of a file, will identify the
+file as trusted. This value is provided when adding a server to ionCube24.
+
+----------
+
+INI entry: ic24.sec.trusted_include_paths ; no default
+
+Purpose: List paths from where files can be included and automatically
+trusted.
+
+Example:
+
+ic24.sec.trusted_include_paths = "/var/cache:/var/cache2"
+
+Directories can be excluded from the list by prefixing with a minus
+character -. e.g.
+
+"/var/cache:-/var/cache/subdir"
+
+This is useful if your site creates and/or modifies files by itself from
+time to time, e.g. in a cache directory. Requests that *directly* access
+files on a trusted include path will be blocked but the file itself will
+not be blocked, so requests that use the file as intended will still work.
+See ioncube24.com for more details once signed up. As an alternative, if
+possible we recommend producing files that include the exclusion key.
+
+----------
+
+INI entry: ic24.sec.block_uploaded_files ; default 1
+
+Purpose: If set, block any uploaded files in ionCube24 that are processed
+using the standard PHP mechanism for uploaded files. This applies even if
+the file is subsequently included and where included files being
+automatically approved with the previous setting.
+
+----------
+
+INI entry: ic24.sec.block_stdin ; default 1
+
+Purpose: Refuse code that PHP sees via stdin. If disabled, code via
+stdin will run without security checking as there is no filepath. This
+setting should be left on as PHP would normally never receive a script via
+stdin.
+
+### PHP Error reporting settings
+
+INI entry: ic24.phperr.enable ; default "auto"
+
+Purpose: Enable reporting of PHP errors to ionCube24. When enabled, any
+non-ignored errors are reported to ionCube24 in realtime, triggering
+alerting so errors can be investigated as necessary.
+
+Accepted values:
+
+ * "auto" (default) - allow setting from the ionCube24 control panel.
+ * 1 : always enabled.
+ * 0 : disabled.
+
+----------
+
+### Deprecated settings
+
+Deprecated settings are subject to removal in a future
+release.
+
+INI entry: ic24.phperr.ignore ; default 0
+
+Purpose: Specify default error levels to always ignore for all domains.
+
+Note that default and per-domain errors to ignore can also be set via the
+web interface, and are combined with this setting. Leaving this unset and
+using the web interface is recommended for maximum flexibility.
+
+Example:
+
+ic24.phperr.ignore = E_NOTICE | E_DEPRECATED
+
+(c) ionCube Ltd. 2017
diff --git a/php-ioncube-loader.spec b/php-ioncube-loader.spec
new file mode 100644
index 0000000..d2b923f
--- /dev/null
+++ b/php-ioncube-loader.spec
@@ -0,0 +1,211 @@
+# remirepo spec file for php-ioncube-loader
+#
+# Copyright (c) 2012-2022 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+%{?scl: %scl_package php-ioncube-loader}
+%global extname ioncube_loader
+%global debug_package %{nil}
+%global __debug_install_post /bin/true
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global _build_id_links none
+%endif
+%ifarch armv7hl aarch64 armv7hl
+%global with_zts 0
+%else
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%endif
+%if "%{php_version}" < "5.6"
+%global ininame %{extname}.ini
+%else
+# [ionCube Loader] The Loader must appear as the first entry in the php.ini
+%global ininame 01-%{extname}.ini
+%endif
+
+# Open issues
+# http://forum.ioncube.com/viewtopic.php?t=4244 - No version in Reflection
+
+Name: %{?scl_prefix}php-ioncube-loader
+Summary: Loader for ionCube Encoded Files with ionCube 24 support
+%global upstream_version 14.4.0
+#global upstream_prever beta2
+Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
+Release: 1
+License: Distribuable
+
+URL: http://www.ioncube.com
+%if 0%{?upstream_prever:1}
+Source1: https://www.ioncube.com/php-7.4.0-beta-loaders/ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
+%else
+Source1: https://downloads.ioncube.com/loader_downloads/%{extname}s_lin_x86-64_%{upstream_version}.tar.gz
+Source2: https://downloads.ioncube.com/loader_downloads/%{extname}s_lin_aarch64_%{upstream_version}.tar.gz
+%endif
+Source90: LICENSE.txt
+Source91: USER-GUIDE.txt
+
+ExclusiveArch: x86_64 aarch64
+BuildRequires: %{?scl_prefix}php-devel < 8.0
+
+# ABI check
+Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
+Requires: %{?scl_prefix}php(api) = %{php_core_api}
+%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
+
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+# Other third party repo stuff
+Obsoletes: php53-ioncube-loader <= %{version}
+Obsoletes: php53u-ioncube-loader <= %{version}
+Obsoletes: php54-ioncube-loader <= %{version}
+%if "%{php_version}" > "5.5"
+Obsoletes: php55u-ioncube-loader <= %{version}
+%endif
+%if "%{php_version}" > "5.6"
+Obsoletes: php56u-ioncube-loader <= %{version}
+%endif
+%if "%{php_version}" > "7.0"
+Obsoletes: php70u-ioncube-loader <= %{version}
+%endif
+%if "%{php_version}" > "7.1"
+Obsoletes: php71u-ioncube-loader <= %{version}
+%endif
+%if "%{php_version}" > "7.2"
+Obsoletes: php72u-ioncube-loader <= %{version}
+%endif
+%if "%{php_version}" > "7.3"
+Obsoletes: php73-ioncube-loader <= %{version}
+%endif
+%if "%{php_version}" > "7.4"
+Obsoletes: php74-ioncube-loader <= %{version}
+%endif
+%endif
+
+
+%description
+Loader for ionCube Encoded Files with ionCube 24 support.
+
+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 -T -c
+
+%ifarch aarch64
+tar xvf %{SOURCE2}
+%else
+tar xvf %{SOURCE1}
+%endif
+
+%if 0%{?upstream_prever:1}
+mkdir ioncube
+mv ioncube_loader_lin_7.4_%{upstream_version}_%{upstream_prever}.so ioncube/ioncube_loader_lin_7.4.so
+mv ioncube_loader_lin_7.4_%{upstream_version}_%{upstream_prever}_ts.so ioncube/ioncube_loader_lin_7.4_ts.so
+%endif
+
+[ -d linux_x86_64 ] && ln -s linux_x86_64 ioncube
+
+# Drop in the bit of configuration
+# Sometime file is missing
+# http://forum.ioncube.com/viewtopic.php?t=4245
+[ -f ioncube/LICENSE.txt ] || cp %{SOURCE90} ioncube/
+[ -f ioncube/USER-GUIDE.txt ] || cp %{SOURCE91} ioncube/
+sed -e 's/\r//' -i ioncube/*.txt
+
+cat << 'EOF' | tee %{extname}.nts
+; Enable %{extname} extension module
+zend_extension = %{extname}.so
+
+; ionCube PHP Loader + Intrusion Protection from ioncube24.com configuration
+;ic24.enable = 0
+;ic24.sec.stop_on_error = 1
+;ic24.sec.trusted_include_paths = ''
+;ic24.sec.block_uploaded_files = 1
+;ic24.api_access_key = ''
+;ic24.api_check_ip = 1
+;ic24.slt = '7'
+;ic24.sec.enable = 'auto'
+;ic24.sec.initial_state = 1
+;ic24.sec.initial_action = 'block'
+;ic24.sec.initial_notify = 'always'
+;ic24.sec.initial_cache_all = 1
+;ic24.sec.exclusion_key = ''
+;ic24.home_dir = ''
+;ic24.sec.block_stdin = '1'
+;ic24.update_domains_retry_interval = '30'
+;ic24.phperr.enable = 'auto'
+;ic24.phperr.ignore = 0
+;ic24.api.log_msg_errors = 0
+;ic24.api.max_timeout = 7
+;ioncube.loader.encoded_paths = ''
+EOF
+
+cp %{extname}.nts %{extname}.zts
+
+%if "%{php_version}" < "5.5"
+sed -e 's:%{extname}.so:%{php_ztsextdir}/%{extname}.so:' \
+ -i %{extname}.zts
+sed -e 's:%{extname}.so:%{php_extdir}/%{extname}.so:' \
+ -i %{extname}.nts
+diff %{extname}.nts %{extname}.zts || : ok
+%endif
+
+
+%build
+# tarball provides binaries
+
+
+%install
+ver=$(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
+
+if [ -f ioncube/%{extname}_lin_${ver}.so ]; then
+
+ install -D -pm 755 ioncube/%{extname}_lin_${ver}.so %{buildroot}%{php_extdir}/%{extname}.so
+ %if %{with_zts}
+ install -D -pm 755 ioncube/%{extname}_lin_${ver}_ts.so %{buildroot}%{php_ztsextdir}/%{extname}.so
+ %endif
+
+elif [ -f linux_x86_64/${ver}.0/ioncube_loader_%{version}.so ]; then
+
+ install -D -pm 755 linux_x86_64/${ver}.0/ioncube_loader_%{version}.so %{buildroot}%{php_extdir}/%{extname}.so
+ %if %{with_zts}
+ install -D -pm 755 linux_x86_64/${ver}.0-ts/ioncube_loader_%{version}_ts.so %{buildroot}%{php_ztsextdir}/%{extname}.so
+ %endif
+
+else
+ : Module for PHP $ver not provided
+ exit 1
+fi
+
+install -D -m 644 %{extname}.nts %{buildroot}%{php_inidir}/%{ininame}
+%if %{with_zts}
+install -D -m 644 %{extname}.zts %{buildroot}%{php_ztsinidir}/%{ininame}
+%endif
+
+
+%check
+# simple module load test
+%{__php} --no-php-ini \
+ --define zend_extension=%{buildroot}%{php_extdir}/%{extname}.so \
+ --version | grep 'ionCube.*%{upstream_version}'
+
+%if %{with_zts}
+%{__ztsphp} --no-php-ini \
+ --define zend_extension=%{buildroot}%{php_ztsextdir}/%{extname}.so \
+ --version | grep 'ionCube.*%{upstream_version}'
+%endif
+
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license ioncube/LICENSE.txt
+%doc ioncube/USER-GUIDE.txt
+
+%config(noreplace) %{php_inidir}/%{ininame}
+%{php_extdir}/%{extname}.so
+
+%if %{with_zts}
+%config(noreplace) %{php_ztsinidir}/%{ininame}
+%{php_ztsextdir}/%{extname}.so
+%endif
diff --git a/sources b/sources
new file mode 100644
index 0000000..3702568
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+95b1ba55ca708cb2588515d74cd934e2 ioncube_loaders_lin_aarch64_14.4.0.tar.gz
+8eea8be581fcc550573c3a6e4acc5c08 ioncube_loaders_lin_x86-64_14.4.0.tar.gz