summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-02-07 11:18:16 +0100
committerRemi Collet <remi@remirepo.net>2020-02-07 11:18:16 +0100
commit46e44a4bec72768e2fcefa0665352f09aa8b9219 (patch)
tree837f9368f74a0f3ba5d65f01f0ba3eb6228f82a0
parentb5ef5e2c551b9e89b4579ebf495cbe20203ab2b6 (diff)
update to 2.0.0
raise dependency on PHP 7.3 rename to php-phpunit-php-text-template2 move to /usr/share/php/SebastianBergmann/Template2
-rw-r--r--composer.json8
-rw-r--r--php-phpunit-php-text-template2.spec79
2 files changed, 46 insertions, 41 deletions
diff --git a/composer.json b/composer.json
index a5779c8..68ed142 100644
--- a/composer.json
+++ b/composer.json
@@ -18,12 +18,16 @@
"issues": "https://github.com/sebastianbergmann/php-text-template/issues"
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.3"
},
"autoload": {
"classmap": [
"src/"
]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
}
}
-
diff --git a/php-phpunit-php-text-template2.spec b/php-phpunit-php-text-template2.spec
index 71c5a40..2fd98f6 100644
--- a/php-phpunit-php-text-template2.spec
+++ b/php-phpunit-php-text-template2.spec
@@ -1,39 +1,45 @@
-# remirepo/fedora spec file for php-phpunit-Text-Template
+# remirepo/fedora spec file for php-phpunit-php-text-template2
#
-# Copyright (c) 2010-2017 Remi Collet
+# Copyright (c) 2010-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 31f8b717e51d9a2afca6c9f046f5d69fc27c8686
+%global gh_commit 526dc996cc0ebdfa428cd2dfccd79b7b53fee346
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project php-text-template
+# Packagist
+%global pk_vendor phpunit
+%global pk_project %{gh_project}
+# Namespace
+%global ns_vendor SebastianBergmann
+%global ns_project Template
%global php_home %{_datadir}/php
-%global pear_name Text_Template
-%global pear_channel pear.phpunit.de
+%global ver_major 2
-Name: php-phpunit-Text-Template
-Version: 1.2.1
+Name: php-%{pk_vendor}-%{pk_project}%{ver_major}
+Version: 2.0.0
Release: 1%{?dist}
Summary: Simple template engine
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
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: php(language) >= 5.3.3
-BuildRequires: %{_bindir}/phpab
+BuildRequires: php(language) >= 7.3
+BuildRequires: php-cli
+BuildRequires: php-fedora-autoloader-devel
# From composer.json
-Requires: php(language) >= 5.3.3
-# From phpcompatinfo report for version 1.2.0
+# "php": "^7.3"
+Requires: php(language) >= 7.3
+# From phpcompatinfo report for version 2.0.0
Requires: php-spl
-Provides: php-composer(phpunit/php-text-template) = %{version}
+Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
%description
@@ -43,47 +49,42 @@ Simple template engine.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-: Restore previous PSR-0 layout
-mkdir -p Text/Template
-mv src/Template.php Text/
-rmdir src
-
%build
-: Generate autoloader
-%{_bindir}/phpab \
- --output Text/Template/Autoload.php \
- --basedir Text/Template \
- Text
+# Generate the Autoloader
+%{_bindir}/phpab --template fedora --output src/autoload.php src
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{php_home}
-cp -pr Text %{buildroot}%{php_home}
-
+mkdir -p %{buildroot}%{php_home}/%{ns_vendor}
+cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}
-%clean
-rm -rf %{buildroot}
-
-%post
-if [ -x %{_bindir}/pear ]; then
- %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
- %{pear_channel}/%{pear_name} >/dev/null || :
-fi
+%check
+: check autoloader
+php -r '
+require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}/autoload.php";
+exit (class_exists("%{ns_vendor}\\%{ns_project}\\Template") ? 0 : 1);
+'
%files
-%defattr(-,root,root,-)
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
-%doc README.md
+%doc *.md
%doc composer.json
-%{php_home}/*
+%dir %{php_home}/%{ns_vendor}
+ %{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}
%changelog
+* Fri Feb 7 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- update to 2.0.0
+- raise dependency on PHP 7.3
+- rename to php-phpunit-php-text-template2
+- move to /usr/share/php/SebastianBergmann/Template2
+
* Sun Jun 21 2015 Remi Collet <remi@fedoraproject.org> - 1.2.1-1
- update to 1.2.1
- generate autoloader