%global github_owner goodspb %global github_name pdlib %global github_commit abb617b6b3a3302d060a7b928ae14dab729136e7 %global commitdate 20180830 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: php-%{github_name} Version: 1.1.0 Release: 3 Summary: PHP extension to access the Dlib library Group: Development/Languages License: MIT URL: https://github.com/goodspb/%{github_name} Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{version}.tar.gz BuildRequires: make BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: php-devel BuildRequires: dlib-devel >= 19.8 BuildRequires: pkgconfig(cblas) BuildRequires: pkgconfig(lapack) Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} # dlib-devel missing in this case %if 0%{?rhel} >= 10 ExcludeArch: %{s390x} %endif %description This extension provides a PHP implementation of the OpenCV library. The extension offers two new functions. In principle, they differ only by their return value. The first returns only the number of faces found on the given image and the other an associative array of their coordinates. %prep %autosetup -n %{github_name}-%{version} %{__cat} <<'EOF' > 40-%{github_name}.ini extension=%{github_name}.so EOF sed -i 's/\r//' CREDITS %build %{_bindir}/phpize %configure \ --with-php-config=%{_bindir}/php-config \ --with-libdir=%{_lib} \ --with-%{github_name} %make_build %install %make_install INSTALL_ROOT=%{buildroot} INSTALL="install -p" install -D -m 644 40-%{github_name}.ini %{buildroot}%{php_inidir}/40-%{github_name}.ini %check export NO_INTERACTION=1 export SKIP_ONLINE_TESTS=1 export REPORT_EXIT_STATUS=1 # Minimal load test of php extension %{__php} --no-php-ini \ --define extension_dir=%{buildroot}%{php_extdir} \ --define extension=%{github_name}.so \ --modules | grep %{github_name} %files %doc CREDITS README.md %license LICENSE %config(noreplace) %{_sysconfdir}/php.d/40-%{github_name}.ini %{php_extdir}/%{github_name}.so %changelog * Sat May 03 2025 Andrew Bauer 1.1.0-3 - modernize specfile * Tue Apr 23 2024 Matias De lellis 1.1.0-2 - Rebuild for dlib updates. * Thu May 18 2023 Matias De lellis 1.1.0-1 - Rebuild for dlib updates. * Thu May 18 2023 Matias De lellis 1.0.2-6 - Rebuild for dlib updates. * Tue Aug 02 2022 Matias De lellis 1.0.2-5 - Rebuild for dlib updates. * Thu Nov 25 2021 Matias De lellis 1.0.2-4 - Rebuild for fedora 35 * Tue May 18 2021 Matias De lellis 1.0.2-3 - Explicitly requires cblas and lapack * Tue May 18 2021 Matias De lellis 1.0.2-2 - Rebuild to sync with the dlib package * Sun Jul 26 2020 Matias De lellis 1.0.2-1 - Update to last package * Mon Nov 25 2019 Matias De lellis - 1.0-2.20180830gitabb617b - Rebuild with last dlib on copr. * Mon Apr 15 2019 Matias De lellis - 1.0-1.20180830gitabb617b - Fix typo on loading extention file * Thu Aug 30 2018 Matias De lellis - 1.0-20180830gitabb617b - Initial release * Tue Aug 07 2018 Matias De lellis - 0.1-20180720git091caba - Initial package