4ee320e
# remirepo/fedora spec file for php-pear-CAS
d52c149
#
30dea6b
# Copyright (c) 2010-2019 Remi Collet
d52c149
# License: CC-BY-SA
4ee320e
# http://creativecommons.org/licenses/by-sa/4.0/
d52c149
#
d52c149
# Please, preserve the changelog entries
d52c149
#
54090c3
# see https://github.com/apereo/phpCAS/issues/281
30dea6b
%global gh_commit    b5b29102c3a42f570c4a3e852f3cf67cae6d6082
8c95450
%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
54090c3
%global gh_owner     apereo
8c95450
%global gh_project   phpCAS
c379ba8
c379ba8
c379ba8
Name:           php-pear-CAS
30dea6b
Version:        1.3.7
54090c3
Release:        1%{?dist}
c379ba8
Summary:        Central Authentication Service client library in php
c379ba8
c379ba8
Group:          Development/Libraries
b9fcbbd
License:        ASL 2.0
111100f
URL:            https://wiki.jasig.org/display/CASC/phpCAS
c65b6bf
8c95450
Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz
c379ba8
c379ba8
BuildArch:      noarch
8c95450
BuildRequires:  php-fedora-autoloader-devel
8c95450
# only for pear macros
d52c149
BuildRequires:  php-pear
8c95450
# for %%check
8c95450
BuildRequires:  php-cli
c379ba8
a445f38
Requires:       php-curl
8c95450
Requires:       php-date
a445f38
Requires:       php-dom
8c95450
Requires:       php-hash
a445f38
Requires:       php-pcre
a445f38
Requires:       php-pdo
a445f38
Requires:       php-session
a445f38
Requires:       php-spl
a445f38
# Optional: php-imap (when use Proxied Imap)
8c95450
Requires:       php-composer(fedora/autoloader)
a445f38
8c95450
Provides:       php-pear(__uri/CAS) = %{version}
4ee320e
Provides:       php-composer(jasig/phpcas) = %{version}
54090c3
Provides:       php-composer(apereo/phpcas) = %{version}
c379ba8
# this library is mostly known as phpCAS
c379ba8
Provides:       phpCAS = %{version}-%{release}
c379ba8
c379ba8
c379ba8
%description
c379ba8
This package is a PEAR library for using a Central Authentication Service.
c379ba8
e237109
Autoloader '%{pear_phpdir}/CAS/Autoload.php';
4ee320e
c379ba8
c379ba8
%prep
8c95450
%setup -q -n %{gh_project}-%{gh_commit}
c379ba8
c65b6bf
c379ba8
c379ba8
%build
e237109
# Rewrite a classmap autoloader (upstream is broken)
e237109
%{_bindir}/phpab \
8c95450
    --template fedora \
8c95450
    --output source/CAS/Autoload.php  \
8c95450
             source
e237109
c379ba8
8c95450
%install
8c95450
mkdir -p %{buildroot}%{pear_phpdir}
8c95450
cp -pr source/* %{buildroot}%{pear_phpdir}/
8c95450
8c95450
8c95450
%check
8c95450
: Ensure our autoloader works
8c95450
php -r '
8c95450
require "%{buildroot}%{pear_phpdir}/CAS/Autoload.php";
8c95450
if (!class_exists("phpCAS")) {
8c95450
  echo "Class not found\n";
8c95450
  exit(1);
8c95450
}
8c95450
if (phpCAS::getVersion() != "%{version}") {
8c95450
  echo "Bad version (found=" . phpCAS::getVersion()  . ", expected=%{version})\n";
8c95450
  exit(1);
8c95450
}
8c95450
echo "Ok\n";
8c95450
'
c379ba8
c379ba8
c379ba8
%files
8c95450
%{!?_licensedir:%global license %%doc}
8c95450
%license LICENSE
8c95450
%doc composer.json
8c95450
%doc NOTICE *.md
c379ba8
%{pear_phpdir}/CAS
c379ba8
%{pear_phpdir}/CAS.php
c379ba8
c379ba8
c379ba8
%changelog
30dea6b
* Tue Apr 23 2019 Remi Collet <remi@remirepo.net> - 1.3.7-1
30dea6b
- update to 1.3.7
30dea6b
54090c3
* Fri Oct 26 2018 Remi Collet <remi@remirepo.net> - 1.3.6-1
54090c3
- update to 1.3.6
54090c3
- new github and packagist owner
54090c3
d5a142d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-3
d5a142d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d5a142d
5acd579
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-2
5acd579
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5acd579
8c95450
* Tue Apr 11 2017 Remi Collet <remi@remirepo.net> - 1.3.5-1
8c95450
- update to 1.3.5
8c95450
- sources from github
8c95450
- add minimal check for our autoloader
8c95450
fbb0c34
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-4
fbb0c34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fbb0c34
e237109
* Wed Oct 19 2016 Remi Collet <remi@fedoraproject.org> - 1.3.4-3
e237109
- fix broken autoloader
e237109
0485a01
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-2
0485a01
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0485a01
4ee320e
* Tue Nov 17 2015 Remi Collet <remi@fedoraproject.org> - 1.3.4-1
4ee320e
- update to Version 1.3.4
4ee320e
- add provides php-composer(jasig/phpcas)
4ee320e
6c6a520
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
6c6a520
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6c6a520
d52c149
* Mon Jul 28 2014 Remi Collet <remi@fedoraproject.org> - 1.3.4-1
d52c149
- update to Version 1.3.3
d52c149
8ceb54f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-4
8ceb54f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8ceb54f
db2458a
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-3
db2458a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
db2458a
02f74f5
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-2
02f74f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
02f74f5
a445f38
* Sat Dec 29 2012 Remi Collet <remi@fedoraproject.org> - 1.3.2-1
a445f38
- update to Version 1.3.2, security fix for
a445f38
  CVE-2012-5583 Missing CN validation of CAS server certificate
a445f38
- add requires for all needed php extensions
a445f38
61a07a4
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-2
61a07a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
61a07a4
70367a0
* Sun Apr 29 2012 Remi Collet <remi@fedoraproject.org> - 1.3.1-1
70367a0
- update to Version 1.3.1
70367a0
b9fcbbd
* Wed Mar 14 2012 Remi Collet <remi@fedoraproject.org> - 1.3.0-2
b9fcbbd
- License is ASL 2.0, https://github.com/Jasig/phpCAS/issues/32
b9fcbbd
- New sources,        https://github.com/Jasig/phpCAS/issues/31
b9fcbbd
c65b6bf
* Tue Mar 13 2012 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
c65b6bf
- update to Version 1.3.0
c65b6bf
731c948
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-1.1
731c948
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
731c948
bdb9305
* Sat Jun 11 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.2.2-1
bdb9305
- update to Version 1.2.2 (stable) - API 1.2.2 (stable)
bdb9305
2a78c0b
* Wed Mar 30 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.2.1-1
bdb9305
- update to Version 1.2.1 (stable) - API 1.2.1 (stable)
2a78c0b
088bfa9
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-1.1
088bfa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
088bfa9
111100f
* Thu Jan 20 2011 Remi Collet <Fedora@FamilleCollet.com> - 1.2.0-1
111100f
- update to Version 1.2.0 (stable) - API 1.2.0 (stable)
111100f
- dont requires domxml-php4-to-php5 anymore
111100f
- fix URL
111100f
- link %%doc to pear_docdir
111100f
f94d151
* Mon Oct 04 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.3-1
f94d151
- update to 1.1.3
f94d151
- fix CVE-2010-3690, CVE-2010-3691, CVE-2010-3692
f94d151
- set timezone during build
f94d151
b33e6ad
* Tue Aug 03 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.2-1
b33e6ad
- update to 1.1.2
b33e6ad
- fix  CVE-2010-2795, CVE-2010-2796, #620753
b33e6ad
fe735b5
* Thu May 20 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.1-1
fe735b5
- update to 1.1.1
fe735b5
c379ba8
* Thu May 20 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.0-1
c379ba8
- update to 1.1.0 finale
c379ba8
c379ba8
* Sun Mar 14 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.0-0.1.RC7
c379ba8
- initial packaging (using pear make-rpm-spec CAS-1.1.0RC7.tgz)
c379ba8