%global github_owner goodspb %global github_name pdlib %global github_commit abb617b6b3a3302d060a7b928ae14dab729136e7 %global commitdate 20180830 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) %global debug_package %{nil} Name: pdlib Version: 1.0 Release: 1.%{commitdate}git%{shortcommit}%{?dist} Summary: PHP extension to access the Dlib library Group: Development/Languages License: MIT URL: https://github.com/goodspb/pdlib Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{shortcommit}.tar.gz BuildRequires: gcc-c++ BuildRequires: php-devel BuildRequires: dlib-devel >= 19.8 Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} %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 %setup -q -n %{github_name}-%{github_commit} %{__cat} <<'EOF' > 40-pdlib.ini extension=pdlib.so EOF sed -i 's/\r//' CREDITS %build phpize %configure make %{?_smp_mflags} %install make install INSTALL_ROOT=$RPM_BUILD_ROOT INSTALL="install -p" install -p -D -m0644 40-pdlib.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.d/40-pdlib.ini %check # Minimal load test of php extension php --no-php-ini \ --define extension_dir=${RPM_BUILD_ROOT}%{php_extdir} \ --define extension=pdlib.so \ --modules | grep pdlib %files %doc CREDITS %license LICENSE %config(noreplace) %{_sysconfdir}/php.d/40-pdlib.ini %{php_extdir}/pdlib.so %changelog * 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