]> git.pld-linux.org Git - SPECS.git/blob - php-sebastian-environment.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / php-sebastian-environment.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 %define         php_min_version 5.3.3
6 Summary:        Handle HHVM/PHP environments
7 Name:           php-sebastian-environment
8 Version:        1.3.8
9 Release:        1
10 License:        BSD
11 Group:          Development/Libraries
12 Source0:        https://github.com/sebastianbergmann/environment/archive/%{version}/environment-%{version}.tar.gz
13 # Source0-md5:  a14fe7826a2801de5151d23a065aad33
14 URL:            https://github.com/sebastianbergmann/environment
15 BuildRequires:  php(core) >= %{php_min_version}
16 BuildRequires:  phpab
17 %if %{with tests}
18 BuildRequires:  phpunit >= 4.8
19 %endif
20 Requires:       php(core) >= %{php_min_version}
21 Requires:       php(pcre)
22 Requires:       php(posix)
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 This component provides functionality that helps writing PHP code that
28 has runtime-specific (PHP / HHVM) execution paths.
29
30 %prep
31 %setup -q -n environment-%{version}
32
33 # Restore PSR-0 tree
34 install -d SebastianBergmann
35 mv src SebastianBergmann/Environment
36
37 %build
38 # Generate the Autoloader
39 phpab \
40         --output SebastianBergmann/Environment/autoload.php \
41         SebastianBergmann/Environment
42
43 %if %{with tests}
44 : Run tests - set include_path to ensure PHPUnit autoloader use it
45 phpunit --bootstrap SebastianBergmann/Environment/autoload.php
46 %endif
47
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT%{php_pear_dir}/SebastianBergmann
52 cp -a SebastianBergmann/Environment $RPM_BUILD_ROOT%{php_pear_dir}/SebastianBergmann/Environment
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %files
58 %defattr(644,root,root,755)
59 %doc README.md LICENSE composer.json
60 %dir %{php_pear_dir}/SebastianBergmann
61 %{php_pear_dir}/SebastianBergmann/Environment
This page took 0.277548 seconds and 3 git commands to generate.