cc50a07
# Spec file for php-pear-CAS
cc50a07
#
cc50a07
# Copyright (c) 2010-2014 Remi Collet
cc50a07
# License: CC-BY-SA
cc50a07
# http://creativecommons.org/licenses/by-sa/3.0/
cc50a07
#
cc50a07
# Please, preserve the changelog entries
cc50a07
#
8059b7a
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
cc50a07
%{!?__pear:       %global __pear       %{_bindir}/pear}
f77068e
%global pear_name CAS
f77068e
%global channel   __uri
f77068e
#global prever    RC7
f77068e
f77068e
f77068e
Name:           php-pear-CAS
cc50a07
Version:        1.3.3
8059b7a
Release:        1%{?dist}
f77068e
Summary:        Central Authentication Service client library in php
f77068e
f77068e
Group:          Development/Libraries
cdf7385
License:        ASL 2.0
60ecb1e
URL:            https://wiki.jasig.org/display/CASC/phpCAS
cdf7385
60ecb1e
Source0:        http://downloads.jasig.org/cas-clients/php/%{version}%{?prever}/%{pear_name}-%{version}%{?prever}.tgz
f77068e
f77068e
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f77068e
BuildArch:      noarch
cc50a07
BuildRequires:  php-pear
f77068e
f77068e
Requires(post): %{__pear}
f77068e
Requires(postun): %{__pear}
cc50a07
Requires:       php-pear(PEAR)
8059b7a
Requires:       php-curl
8059b7a
Requires:       php-dom
8059b7a
Requires:       php-pcre
8059b7a
Requires:       php-pdo
8059b7a
Requires:       php-session
8059b7a
Requires:       php-spl
8059b7a
# Optional: php-imap (when use Proxied Imap)
8059b7a
f77068e
Provides:       php-pear(%{channel}/%{pear_name}) = %{version}
f77068e
# this library is mostly known as phpCAS
f77068e
Provides:       phpCAS = %{version}-%{release}
f77068e
f77068e
f77068e
%description
f77068e
This package is a PEAR library for using a Central Authentication Service.
f77068e
f77068e
f77068e
%prep
f77068e
%setup -q -c
f77068e
f77068e
cd %{pear_name}-%{version}%{?prever}
8059b7a
mv ../package.xml %{name}.xml
f77068e
f77068e
f77068e
%build
f77068e
cd %{pear_name}-%{version}%{?prever}
f77068e
# Empty build section, most likely nothing required.
f77068e
f77068e
f77068e
%install
cdf7385
rm -rf %{buildroot}
f77068e
cd %{pear_name}-%{version}%{?prever}
cdf7385
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
f77068e
f77068e
# Clean up unnecessary files
8059b7a
rm -rf %{buildroot}%{pear_metadir}/.??*
f77068e
f77068e
# Install XML package description
cdf7385
mkdir -p %{buildroot}%{pear_xmldir}
cdf7385
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
f77068e
f77068e
f77068e
%clean
cdf7385
rm -rf %{buildroot}
f77068e
f77068e
f77068e
%post
f77068e
%{__pear} install --nodeps --soft --force --register-only \
f77068e
    %{pear_xmldir}/%{name}.xml >/dev/null || :
f77068e
f77068e
%postun
f77068e
if [ $1 -eq 0 ] ; then
f77068e
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
f77068e
        %{channel}/%{pear_name} >/dev/null || :
f77068e
fi
f77068e
f77068e
f77068e
%files
f77068e
%defattr(-,root,root,-)
60ecb1e
%doc %{pear_docdir}/%{pear_name}
f77068e
%{pear_xmldir}/%{name}.xml
f77068e
%{pear_phpdir}/CAS
f77068e
%{pear_phpdir}/CAS.php
f77068e
f77068e
f77068e
%changelog
cc50a07
* Mon Jul 28 2014 Remi Collet <remi@fedoraproject.org> - 1.3.4-1
cc50a07
- update to Version 1.3.3
cc50a07
8059b7a
* Sat Dec 29 2012 Remi Collet <remi@fedoraproject.org> - 1.3.2-1
8059b7a
- update to Version 1.3.2, security fix for
8059b7a
  CVE-2012-5583 Missing CN validation of CAS server certificate
8059b7a
- add requires for all needed php extensions
8059b7a
cdf7385
* Wed Mar 14 2012 Remi Collet <remi@fedoraproject.org> - 1.3.0-2
cdf7385
- License is ASL 2.0, https://github.com/Jasig/phpCAS/issues/32
cdf7385
- New sources,        https://github.com/Jasig/phpCAS/issues/31
cdf7385
- update to Version 1.3.0
cdf7385
60ecb1e
* Sat Jun 11 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.2.2-1
60ecb1e
- update to Version 1.2.2 (stable) - API 1.2.2 (stable)
60ecb1e
- dont requires domxml-php4-to-php5 anymore
60ecb1e
- fix URL
60ecb1e
- link %%doc to pear_docdir
60ecb1e
c5de757
* Mon Oct 04 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.3-1
c5de757
- update to 1.1.3
c5de757
- fix CVE-2010-3690, CVE-2010-3691, CVE-2010-3692
c5de757
- set timezone during build
c5de757
f7d9eee
* Tue Aug 03 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.2-1
f7d9eee
- update to 1.1.2
f7d9eee
- fix  CVE-2010-2795, CVE-2010-2796, #620753
f7d9eee
c53a1de
* Thu May 20 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.1-1
c53a1de
- update to 1.1.1
c53a1de
f77068e
* Thu May 20 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.0-1
f77068e
- update to 1.1.0 finale
f77068e
f77068e
* Sun Mar 14 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.0-0.1.RC7
f77068e
- initial packaging (using pear make-rpm-spec CAS-1.1.0RC7.tgz)
f77068e