106 lines
3 KiB
RPMSpec
106 lines
3 KiB
RPMSpec
%global github_owner nikic
|
|
%global github_name PHP-Parser
|
|
%global github_version 1.0.0
|
|
%global github_commit a6d46c17b10d89f35a92fa4b8fb5071615bfb36c
|
|
%global github_release .beta1
|
|
|
|
%global lib_name PhpParser
|
|
%global lib_name_old PHPParser
|
|
|
|
%global php_min_ver 5.3
|
|
|
|
Name: php-%{lib_name_old}
|
|
Version: %{github_version}
|
|
Release: 0.3%{?github_release}%{?dist}
|
|
Summary: A PHP parser written in PHP
|
|
|
|
Group: Development/Libraries
|
|
License: BSD
|
|
URL: https://github.com/%{github_owner}/%{github_name}
|
|
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
# For tests
|
|
BuildRequires: php(language) >= %{php_min_ver}
|
|
|
|
BuildRequires: %{_bindir}/phpunit
|
|
# For tests: phpcompatinfo (computed from version 1.0.0-beta1)
|
|
BuildRequires: php-ctype
|
|
BuildRequires: php-filter
|
|
BuildRequires: php-pcre
|
|
BuildRequires: php-spl
|
|
BuildRequires: php-tokenizer
|
|
|
|
# composer.json
|
|
Requires: php(language) >= %{php_min_ver}
|
|
Requires: php-tokenizer
|
|
# phpcompatinfo (computed from version 1.0.0-beta1)
|
|
Requires: php-ctype
|
|
Requires: php-filter
|
|
Requires: php-pcre
|
|
Requires: php-spl
|
|
|
|
Provides: php-composer(nikic/php-parser) = %{version}
|
|
|
|
|
|
%description
|
|
A PHP parser written in PHP to simplify static analysis and code manipulation.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{github_name}-%{github_commit}
|
|
|
|
|
|
%build
|
|
# Empty build section, nothing to build
|
|
|
|
|
|
%install
|
|
mkdir -p -m 755 %{buildroot}%{_datadir}/php
|
|
cp -rp lib/%{lib_name} %{buildroot}%{_datadir}/php/
|
|
|
|
# Compat with old version (< 1.0.0)
|
|
mkdir -p -m 755 %{buildroot}%{_datadir}/php/%{lib_name_old}
|
|
ln -s ../%{lib_name}/Autoloader.php \
|
|
%{buildroot}%{_datadir}/php/%{lib_name_old}/Autoloader.php
|
|
|
|
|
|
%check
|
|
%{_bindir}/phpunit
|
|
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %%doc}
|
|
%license LICENSE
|
|
%doc *.md doc grammar composer.json
|
|
%{_datadir}/php/%{lib_name_old}
|
|
%{_datadir}/php/%{lib_name}
|
|
|
|
|
|
%changelog
|
|
* Wed Jul 23 2014 Remi Collet <remi@fedoraproject.org> 1.0.0-0.3.beta1
|
|
- provide php-composer(nikic/php-parser)
|
|
- fix license handling
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.2.beta1
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Fri May 16 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.0.0-0.1.beta1
|
|
- Updated to 1.0.0-beta1 (BZ #1096697)
|
|
|
|
* Fri Nov 15 2013 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.9.4-1
|
|
- Updated to 0.9.4 (BZ #1001126)
|
|
- Spec cleanup
|
|
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
* Mon Dec 31 2012 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.9.3-2
|
|
- Added php_min_ver
|
|
- Fixed requires for php_min_ver and non-Fedora
|
|
|
|
* Thu Dec 20 2012 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.9.3-1
|
|
- Initial package
|