summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json12
-rw-r--r--php-sebastian-version3.spec77
2 files changed, 50 insertions, 39 deletions
diff --git a/composer.json b/composer.json
index 3b87814..13d7ae9 100644
--- a/composer.json
+++ b/composer.json
@@ -13,8 +13,16 @@
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues"
},
+ "config": {
+ "platform": {
+ "php": "7.3.0"
+ },
+ "optimize-autoloader": true,
+ "sort-packages": true
+ },
+ "prefer-stable": true,
"require": {
- "php": ">=5.6"
+ "php": "^7.3"
},
"autoload": {
"classmap": [
@@ -23,7 +31,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0-dev"
}
}
}
diff --git a/php-sebastian-version3.spec b/php-sebastian-version3.spec
index f7acb6b..949382e 100644
--- a/php-sebastian-version3.spec
+++ b/php-sebastian-version3.spec
@@ -1,41 +1,48 @@
-# remirepo/fedora spec file for php-phpunit-Version
+# remirepo/fedora spec file for php-sebastian-version3
#
-# Copyright (c) 2013-2017 Remi Collet
+# Copyright (c) 2013-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 99732be0ddb3361e16ad77b68ba41efc8e979019
+%global gh_commit 0411bde656dce64202b39c2f4473993a9081d39e
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project version
-%global php_home %{_datadir}/php/SebastianBergmann/
+# Packagist
+%global pk_vendor sebastian
+%global pk_project %{gh_project}
+# Namespace (fake ns_project as not PSR-4 compliant)
+%global ns_vendor SebastianBergmann
+%global ns_project Version
+%global ver_major 3
+%global php_home %{_datadir}/php
%global with_tests %{?_without_tests:0}%{!?_withou_tests:1}
-Name: php-phpunit-Version
-Version: 2.0.1
+Name: php-%{pk_vendor}-%{pk_project}%{ver_major}
+Version: 3.0.0
Release: 1%{?dist}
Summary: Managing the version number of Git-hosted PHP projects
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.6
+BuildRequires: php(language) >= 7.3
+BuildRequires: php-cli
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": ">=5.6"
-Requires: php(language) >= 5.6
-Requires: php-spl
+# "php": "^7.3.0"
+Requires: php(language) >= 7.3
Requires: git
# Autoloader
Requires: php-composer(fedora/autoloader)
-Provides: php-composer(sebastian/version) = %{version}
+Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
%description
@@ -46,47 +53,43 @@ of Git-hosted PHP projects.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-: Restore PSR-0 layout
-mkdir src/Version
-
%build
-: Generate autoloader
-%{_bindir}/phpab \
- --template fedora \
- --output src/Version/autoload.php \
- src
+: Generate the Autoloader
+%{_bindir}/phpab --template fedora --output src/autoload.php src
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{php_home}
-
-cp -pr src/* %{buildroot}%{php_home}
-
+# Not PSR-4 compliant, but ok as we use a classmap
+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.phpunit.de/Version >/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}") ? 0 : 1);
+'
%files
-%defattr(-,root,root,-)
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
-%doc README.md
+%doc *.md
%doc composer.json
-%dir %{php_home}
- %{php_home}/Version*
+%dir %{php_home}/%{ns_vendor}
+ %{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}
%changelog
+* Fri Feb 7 2020 Remi Collet <remi@remirepo.net> - 3.0.0-1
+- update to 3.0.0
+- raise dependency on PHP 7.3
+- rename to php-sebastian-version3
+- move to /usr/share/php/SebastianBergmann/Version3
+
* Sat Nov 26 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
- update to 2.0.1 (no change)
- switch to fedora/autoloader