summaryrefslogtreecommitdiffstats
path: root/php-firephp-firephp-core.spec
blob: 79112f1675db06407acadead3d70bdd0610a6a67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
# Fedora spec file for php-firephp-firephp-core
#
# Copyright (c) 2015 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#

%global github_owner     firephp
%global github_name      firephp-core
%global github_version   0.4.0
%global github_commit    fabad0f2503f9577fe8dd2cb1d1c7cd73ed2aacf

%global composer_vendor  firephp
%global composer_project firephp-core

# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}

%{!?phpdir:  %global phpdir  %{_datadir}/php}

Name:          php-%{composer_vendor}-%{composer_project}
Version:       %{github_version}
Release:       1%{?github_release}%{?dist}
Summary:       Traditional FirePHPCore library for sending PHP variables to the browser

Group:         Development/Libraries
License:       MIT
URL:           https://github.com/%{github_owner}/%{github_name}
Source0:       %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz

BuildArch:     noarch
# Tests
%if %{with_tests}
BuildRequires: %{_bindir}/phpunit
## phpcompatinfo (computed from version 0.4.0)
BuildRequires: php(language) >= 5.3.0
BuildRequires: php-json
BuildRequires: php-mbstring
BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-spl
BuildRequires: php-xml
%endif

# phpcompatinfo (computed from version 0.4.0)
Requires:      php(language) >= 5.3.0
Requires:      php-json
Requires:      php-mbstring
Requires:      php-pcre
Requires:      php-reflection
Requires:      php-xml
# Autoloader
Requires:      php-spl

# Composer
Provides:      php-composer(%{composer_vendor}/%{composer_project}) = %{version}

%description
FirePHP is an advanced logging system that can display PHP variables in the
browser as an application is navigated. All communication is out of band to
the application meaning that the logging data will not interfere with the
normal functioning of the application.


%prep
%setup -qn %{github_name}-%{github_commit}


%build
# Empty build section, nothing to build


%install
: Lib
mkdir -p %{buildroot}%{phpdir}
cp -rp lib/* %{buildroot}%{phpdir}/

: Autoloader
ln -s fb.php %{buildroot}%{phpdir}/FirePHPCore/autoload.php


%check
%if %{with_tests}
pushd tests
    %{_bindir}/phpunit --verbose .
popd
%else
: Tests skipped
%endif


%files
# README re-used as license file since it has full license text
%{?_licensedir:%license README.md}
%doc *.md
%doc composer.json
%{phpdir}/FirePHPCore
%exclude %{phpdir}/FirePHPCore/*.php4


%changelog
* Tue Aug 18 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.4.0-1
- Initial package