diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-07-24 07:30:42 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-07-24 07:30:42 +0200 |
commit | c185ae6e671c6bb261b62961b324f73603410842 (patch) | |
tree | eee02da16cfcdb965b0c182ead0b02d5b0217a29 /php-scssphp.spec | |
parent | f5f8cdd3de2d7cf9b2a1bae364e97313677d8830 (diff) |
php-scssphp: 0.6.5 (backported from Fedora)
Diffstat (limited to 'php-scssphp.spec')
-rw-r--r-- | php-scssphp.spec | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/php-scssphp.spec b/php-scssphp.spec index 815755f..affdd67 100644 --- a/php-scssphp.spec +++ b/php-scssphp.spec @@ -13,17 +13,17 @@ %global github_owner leafo %global github_name scssphp -%global github_version 0.4.0 -%global github_commit 78a6f27aa4eaf70bb3ff4d13b639bab71fdaf47a +%global github_version 0.6.5 +%global github_commit 0649d38dfef6808be1a89040a3312e8bda0b3aed %global composer_vendor leafo %global composer_project scssphp -# "php": ">=5.3.0" -%global php_min_ver 5.3.0 +# "php": ">=5.4.0" +%global php_min_ver 5.4.0 # Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +%global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} @@ -41,9 +41,6 @@ URL: http://leafo.github.io/scssphp Source0: %{name}-%{github_version}-%{github_commit}.tar.gz Source1: %{name}-get-source.sh -# Pre-0.1.0 compat -Patch0: %{name}-pre-0-1-0-compat.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Library version check @@ -53,11 +50,12 @@ BuildRequires: php-cli ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) -## phpcompatinfo (computed from version 0.4.0) +## phpcompatinfo (computed from version 0.6.5) BuildRequires: php-ctype BuildRequires: php-date BuildRequires: php-mbstring BuildRequires: php-pcre +BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(symfony/class-loader) %endif @@ -65,11 +63,12 @@ BuildRequires: php-composer(symfony/class-loader) Requires: php-cli # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 0.4.0) +# phpcompatinfo (computed from version 0.6.5) Requires: php-ctype Requires: php-date Requires: php-mbstring Requires: php-pcre +Requires: php-spl # Autoloader Requires: php-composer(symfony/class-loader) @@ -95,9 +94,6 @@ syntax. %prep %setup -qn %{github_name}-%{github_commit} -: Lib pre-0.1.0 compat -%patch0 -p1 - : Bin sed "/scss.inc.php/s#.*#require_once '%{phpdir}/Leafo/ScssPhp/autoload.php';#" \ -i bin/pscss @@ -138,28 +134,36 @@ rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir}/Leafo/ScssPhp cp -pr src/* %{buildroot}%{phpdir}/Leafo/ScssPhp/ -: Lib pre-0.1.0 compat -mkdir -p %{buildroot}%{phpdir}/%{github_name} -cp -p classmap.php %{buildroot}%{phpdir}/%{github_name}/scss.inc.php - : Bin mkdir -p %{buildroot}%{_bindir} install -pm 0755 bin/pscss %{buildroot}%{_bindir}/ %check -: Library version check -%{_bindir}/php -r 'require_once "%{buildroot}%{phpdir}/Leafo/ScssPhp/autoload.php"; - exit(version_compare("%{version}", ltrim(\Leafo\ScssPhp\Version::VERSION, "v"), "=") ? 0 : 1);' +: Library version value and autoloader check +%{_bindir}/php -r ' + require_once "%{buildroot}%{phpdir}/Leafo/ScssPhp/autoload.php"; + $version = ltrim(\Leafo\ScssPhp\Version::VERSION, "v"); + echo "Version $version (expected %{version})\n"; + exit(version_compare("%{version}", "$version", "=") ? 0 : 1); +' %if %{with_tests} +run=0 +ret=0 +if which php56; then + php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Leafo/ScssPhp/autoload.php || ret=1 + run=1 +fi +if which php71; then + php71 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Leafo/ScssPhp/autoload.php || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then %{_bindir}/phpunit --verbose \ --bootstrap %{buildroot}%{phpdir}/Leafo/ScssPhp/autoload.php - -if which php70; then - php70 %{_bindir}/phpunit --verbose \ - --bootstrap %{buildroot}%{phpdir}/Leafo/ScssPhp/autoload.php fi +exit $ret %else : Tests skipped %endif @@ -173,14 +177,17 @@ rm -rf %{buildroot} %defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE.md -%doc README.md %doc composer.json -%{phpdir}/%{github_name}/scss.inc.php +%doc README.md %{phpdir}/Leafo/ScssPhp %{_bindir}/pscss %changelog +* Sat Jul 23 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.6.5-1 +- Updated to 0.6.5 (RHBZ #1347068) +- Dropped pre-0.1.0 compat + * Wed Jan 20 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.4.0-1 - Updated to 0.4.0 (RHBZ #1274939) - Removed php-json dependency |