Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > b6d1c3f73808d0330917acff89c4d062 > files > 4

php-zetacomponents-base-1.9-1.1.mga6.src.rpm

# inspired from fedora spec file
# Copyright (c) 2015 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/

%define github_name     Base
%define composer_name   base
%define composer_vendor zetacomponents
%define bootstrap       0
%define subrel 1

%define php_libdir %{_datadir}/php

%define __requires_exclude_from ^%{_datadir}/.*$

Name:           php-%{composer_vendor}-%{composer_name}
Version:        1.9
Release:        %mkrel 1
Summary:        Zeta Base Component
Group:          Development/PHP
License:        ASL 2.0
URL:            http://zetacomponents.org/
Source0:        https://github.com/zetacomponents/Base/archive/%{github_name}-%{version}.tar.gz

# Use old PEAR layout
Patch0:         %{name}-layout.patch
# Upstream
Patch1:         %{name}-upstream.patch

BuildArch:      noarch
%if ! %{bootstrap}
BuildRequires:  php-composer(theseer/autoload)
%endif

# From phpcompatinfo report for 1.9
Requires:       php > 5.3
Requires:       php-pcre
Requires:       php-posix
Requires:       php-simplexml

Provides:       php-composer(%{composer_vendor}/%{composer_name}) = %{version}

%description
This is the base package of the Zeta components, offering the basic
support that all Components need. In the first version this will be the
autoload support.

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

%patch0 -p0
%patch1 -p1

%build
%if ! %{bootstrap}
: Generate a simple autoloader
%{_bindir}/phpab \
   --output src/autoloader.php \
   src
%endif

%install
mkdir -p %{buildroot}%{php_libdir}/ezc/autoload

: The library
cp -pr src \
       %{buildroot}%{php_libdir}/ezc/%{github_name}
: For ezcBase autoloader
cp -pr src/*_autoload.php \
       %{buildroot}%{php_libdir}/ezc/autoload

%files
%doc LICENSE* CREDITS
%doc ChangeLog
%doc composer.json
%doc docs design
%dir %{php_libdir}/ezc
%dir %{php_libdir}/ezc/autoload
%{php_libdir}/ezc/autoload/*_autoload.php
%{php_libdir}/ezc/%{github_name}


%changelog
* Sat Feb 10 2018 guillomovitch <guillomovitch> 1.9-1.1.mga6
+ Revision: 1200107
- rebuild with proper autoloader, now than bootstrapping is finished

* Tue Apr 18 2017 guillomovitch <guillomovitch> 1.9-1.mga6
+ Revision: 1096673
- imported package php-zetacomponents-base