%global gh_commit 8da2f94538a2250275bb86b431c51e31e256e1e1 %global gh_short %(c=%{gh_commit}; echo ${c:0:8}) %global gh_owner oscarotero %global gh_project Gettext Name: php-gettext-gettext Version: 3.5.9 Release: 5%{?dist} BuildArch: noarch License: MIT Summary: PHP gettext manager URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_short}.tgz BuildRequires: dos2unix BuildRequires: php-composer(gettext/languages) >= 2.0.0 BuildRequires: php-composer(gettext/languages) < 3.0.0 BuildRequires: phpunit Requires: php(language) >= 5.3.0 Requires: php-date Requires: php-dom Requires: php-gettext Requires: php-json Requires: php-pcre Requires: php-simplexml Requires: php-spl Requires: php-tokenizer Requires: php-composer(gettext/languages) >= 2.0.0 Requires: php-composer(gettext/languages) < 3.0.0 Provides: php-composer(gettext/gettext) = %{version} %description Gettext is a PHP (5.3) library to import/export/edit gettext from PO, MO, PHP, JS files, etc. Autoloader: %{_datadir}/php/Gettext/autoload.php %prep %autosetup -n Gettext-%{gh_commit} # The documentation has the wrong newline codes dos2unix *.md sed -i "s:include_once.*:\ninclude_once '%{buildroot}/%{_datadir}/php/Gettext/autoload.php';:" tests/bootstrap.php %build : Create autoloader cat <<'AUTOLOAD' | tee src/autoload.php - 3.5.9-5 - Depend on php-dom and php-simplexml. - Don't provide /usr/share/php/Gettext. * Wed Feb 01 2017 Randy Barlow - 3.5.9-4 - Remove dependency on twig/twig. * Wed Feb 01 2017 Randy Barlow - 3.5.9-3 - Create a Fedora autoloader. - Depend on twig/twig. - Install to /usr/share/php/Gettext instead of the Gettext subdir of that path. * Sun Jan 22 2017 Randy Barlow - 3.5.9-2 - Use a git snapshot instead of a GitHub URL so that we can run the tests (except for two that need optional dependencies). - require_once Gettext/Languages inside the autoloader. * Tue Jan 17 2017 Randy Barlow - 3.5.9-1 - Initial release.