# remirepo/fedora spec file for php-theseer-tokenizer # # Copyright (c) 2017-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global gh_commit 06b6ce404ee574e9c1787fb67bb9980ca4387c34 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_vendor theseer %global gh_project tokenizer %global ns_vendor TheSeer %global ns_project Tokenizer Name: php-%{gh_vendor}-%{gh_project} Version: 1.1.1 Release: 1%{?dist} Summary: Library for converting tokenized PHP source code into XML License: BSD URL: https://github.com/%{gh_vendor}/%{gh_project} Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{?gh_short}.tar.gz BuildArch: noarch # Because of phpunit8 BuildRequires: php(language) >= 7.2 BuildRequires: php-xmlwriter BuildRequires: php-dom BuildRequires: php-tokenizer BuildRequires: php-pcre BuildRequires: php-spl # Autoloader BuildRequires: php-fedora-autoloader-devel >= 1.0.0 # Tests BuildRequires: phpunit8 # From composer.json, "require": { # "php": "^7.0", # "ext-xmlwriter": "*", # "ext-dom": "*", # "ext-tokenizer": "*" Requires: php(language) >= 7.0 Requires: php-xmlwriter Requires: php-dom Requires: php-tokenizer # From phpcompatinfo report for version 1.1.0 Requires: php-pcre Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) Provides: php-composer(%{gh_vendor}/%{gh_project}) = %{version} %description A small library for converting tokenized PHP source code into XML and potentially other formats. Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} %build : Generate a simple classmap autoloader %{_bindir}/phpab --template fedora --output src/autoload.php src %install mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} %check ret=0 for cmd in php php72 php73; do if which $cmd; then $cmd %{_bindir}/phpunit8 \ --bootstrap %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php \ --no-coverage --verbose || ret=1 fi done exit $ret %files # remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.md composer.json %dir %{_datadir}/php/%{ns_vendor} %{_datadir}/php/%{ns_vendor}/%{ns_project} %changelog * Thu Apr 4 2019 Remi Collet - 1.1.1-1 - update to 1.1.1 - use phpunit8 * Fri Apr 21 2017 Remi Collet - 1.1.0-1 - initial package, version 1.1.0