Changes of Revision 2

php-seld-cli-prompt.spec Changed
x
 
1
@@ -1,19 +1,19 @@
2
-# spec file for php-seld-cli-prompt
3
+# remirepo/fedora spec file for php-seld-cli-prompt
4
 #
5
-# Copyright (c) 2015 Remi Collet
6
+# Copyright (c) 2015-2017 Remi Collet
7
 # License: CC-BY-SA
8
 # http://creativecommons.org/licenses/by-sa/4.0/
9
 #
10
 # Please, preserve the changelog entries
11
 #
12
-%global gh_commit    fe114c7a6ac5cb0ce76932ae4017024d9842a49c
13
+%global gh_commit    a19a7376a4689d4d94cab66ab4f3c816019ba8dd
14
 %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
15
 %global gh_owner     Seldaek
16
 %global gh_project   cli-prompt
17
 
18
 Name:           php-seld-cli-prompt
19
-Version:        1.0.0
20
-Release:        1%{?dist}
21
+Version:        1.0.3
22
+Release:        3%{?dist}
23
 Summary:        Allows you to prompt for user input on the command line
24
 
25
 Group:          Development/Libraries
26
@@ -21,9 +21,15 @@
27
 URL:            https://github.com/%{gh_owner}/%{gh_project}
28
 Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
29
 
30
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
31
+# Autoloader
32
+Source1:        %{gh_project}-autoload.php
33
+
34
 BuildArch:      noarch
35
 BuildRequires:  php(language) >= 5.3
36
+# For test
37
+BuildRequires:  php-cli
38
+# Autoloader
39
+BuildRequires:  php-composer(fedora/autoloader)
40
 
41
 # From composer.json
42
 #       "php": ">=5.3.0",
43
@@ -31,6 +37,8 @@
44
 # From phpcompatifo report for 1.0.0
45
 Requires:       php-pcre
46
 Requires:       php-spl
47
+# Autoloader
48
+Requires:       php-composer(fedora/autoloader)
49
 
50
 Provides:       php-composer(seld/cli-prompt) = %{version}
51
 
52
@@ -41,28 +49,37 @@
53
 in by the user should not be directly visible, and this is quite a pain to do
54
 in a cross-platform way.
55
 
56
+To use this library, you just have to add, in your project:
57
+  require_once '%{_datadir}/php/Seld/CliPrompt/autoload.php';
58
+
59
 
60
 %prep
61
 %setup -q -n %{gh_project}-%{gh_commit}
62
 
63
+cp %{SOURCE1} src/autoload.php
64
+
65
 
66
 %build
67
 # Nothing
68
 
69
 
70
 %install
71
-rm -rf       %{buildroot}
72
 # Restore PSR-0 tree
73
 mkdir -p     %{buildroot}%{_datadir}/php/Seld/CliPrompt
74
 cp -pr src/* %{buildroot}%{_datadir}/php/Seld/CliPrompt/
75
 
76
 
77
-%clean
78
-rm -rf %{buildroot}
79
+%check
80
+: Check if our autoloader works
81
+php -r '
82
+require "%{buildroot}%{_datadir}/php/Seld/CliPrompt/autoload.php";
83
+$a = new \Seld\CliPrompt\CliPrompt();
84
+echo "Ok\n";
85
+exit(0);
86
+'
87
 
88
 
89
 %files
90
-%defattr(-,root,root,-)
91
 %{!?_licensedir:%global license %%doc}
92
 %license LICENSE
93
 %doc README.md composer.json res/example.php
94
@@ -70,5 +87,35 @@
95
 
96
 
97
 %changelog
98
+* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-3
99
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
100
+
101
+* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
102
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
103
+
104
+* Mon Mar 20 2017 Remi Collet <remi@remirepo.net> - 1.0.3-1
105
+- Update to 1.0.3
106
+
107
+* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-3
108
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
109
+
110
+* Fri Oct 21 2016 Remi Collet <remi@fedoraproject.org> - 1.0.2-2
111
+- switch from symfony/class-loader to fedora/autoloader
112
+
113
+* Mon Apr 18 2016 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
114
+- update to 1.0.2
115
+
116
+* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
117
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
118
+
119
+* Sun Jan 10 2016 Remi Collet <remi@fedoraproject.org> - 1.0.1-1
120
+- update to 1.0.1 (no change)
121
+
122
+* Wed Oct 14 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-3
123
+- add autoloader
124
+
125
+* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
126
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
127
+
128
 * Mon May  4 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
129
 - initial package
130
\ No newline at end of file
131
cli-prompt-1.0.0-fe114c7.tar.gz Deleted
cli-prompt-1.0.3-a19a737.tar.gz Added
cli-prompt-autoload.php Added
11
 
1
@@ -0,0 +1,9 @@
2
+<?php
3
+/* Autoloader for seld/cli-prompt and its dependencies */
4
+
5
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
6
+    require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
7
+}
8
+
9
+\Fedora\Autoloader\Autoload::addPsr4('Seld\\CliPrompt\\', __DIR__);
10
+
11