summaryrefslogtreecommitdiffstats
path: root/php-tedivm-jshrink.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-tedivm-jshrink.spec')
-rw-r--r--php-tedivm-jshrink.spec67
1 files changed, 37 insertions, 30 deletions
diff --git a/php-tedivm-jshrink.spec b/php-tedivm-jshrink.spec
index 77540e2..4399d33 100644
--- a/php-tedivm-jshrink.spec
+++ b/php-tedivm-jshrink.spec
@@ -1,58 +1,56 @@
# remirepo/fedora spec file for php-tedivm-jshrink
#
-# Copyright (c) 2015-2017 Remi Collet
+# Copyright (c) 2015-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 688527a2e854d7935f24f24c7d5eb1b604742bf9
+%bcond_without tests
+
+%global gh_commit 566e0c731ba4e372be2de429ef7d54f4faf4477a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner tedious
#global gh_date 20150820
%global gh_project JShrink
%global c_vendor tedivm
%global c_project jshrink
-%global with_tests 0%{!?_without_tests:1}
%global psr0 JShrink
Name: php-%{c_vendor}-%{c_project}
-Version: 1.1.0
+Version: 1.3.3
Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: Javascript Minifier built in PHP
-Group: Development/Libraries
License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{?gh_short}.tar.gz
-
-Source1: %{name}-autoload.php
+Source0: %{name}-%{version}-%{?gh_short}.tgz
+Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-%if %{with_tests}
-BuildRequires: php(language) >= 5.3.0
+%if %{with tests}
+BuildRequires: php(language) >= 5.6.0
BuildRequires: php-date
BuildRequires: php-pcre
BuildRequires: php-spl
# For tests, from composer.json "require-dev": {
-# "phpunit/phpunit": "4.0.*",
-# "fabpot/php-cs-fixer": "0.4.0",
-# "satooshi/php-coveralls": "dev-master"
-BuildRequires: php-composer(phpunit/phpunit) >= 4
+# "phpunit/phpunit": "^6",
+# "friendsofphp/php-cs-fixer": "^2.8",
+# "php-coveralls/php-coveralls": "^1.1.0"
+BuildRequires: phpunit6
%endif
# For autoloader
-BuildRequires: php-composer(symfony/class-loader)
+BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": ">=5.3.0"
-Requires: php(language) >= 5.3.0
+# "php": "^5.6|^7.0"
+Requires: php(language) >= 5.6.0
# From phpcompatinfo report for 1.1.0
Requires: php-date
Requires: php-pcre
Requires: php-spl
# Autoloader
-Requires: php-composer(symfony/class-loader)
+Requires: php-composer(fedora/autoloader)
# Composer
Provides: php-composer(%{c_vendor}/%{c_project}) = %{version}
@@ -72,38 +70,41 @@ To use this library, you just have to add, in your project:
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-cp %{SOURCE1} src/%{psr0}/autoload.php
-
%build
+phpab --template fedora --output src/%{psr0}/autoload.php src/%{psr0}
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{_datadir}/php
cp -pr src/* %{buildroot}%{_datadir}/php
%check
-%if %{with_tests}
+%if %{with tests}
mkdir vendor
cat << 'EOF' | tee tests/bootstrap.php
<?php
require '%{buildroot}%{_datadir}/php/%{psr0}/autoload.php';
EOF
-%{_bindir}/phpunit --verbose
+: Run upstream test suite
+ret=0
+for cmd in php php72 php73 php74 php80; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit6 \
+ --no-coverage \
+ --verbose || ret=1
+ fi
+done
+exit $ret
%else
: Test suite disabled
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json
@@ -112,5 +113,11 @@ rm -rf %{buildroot}
%changelog
+* Mon Sep 7 2020 Remi Collet <remi@remirepo.net> - 1.3.3-1
+- update to 1.3.3
+- raise dependency on PHP 5.6
+- switch to classmap autoloader
+- switch to phpunit6
+
* Tue Oct 27 2015 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
-- initial package \ No newline at end of file
+- initial package