summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--README7
-rw-r--r--php-pear-CAS-systemlibs.patch32
-rw-r--r--php-pear-CAS.spec106
4 files changed, 149 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/README b/README
new file mode 100644
index 0000000..9505db5
--- /dev/null
+++ b/README
@@ -0,0 +1,7 @@
+php-pear-CAS
+------------
+
+Review https://bugzilla.redhat.com/573345
+
+Package approved, look in rawhide for latest spec file
+
diff --git a/php-pear-CAS-systemlibs.patch b/php-pear-CAS-systemlibs.patch
new file mode 100644
index 0000000..44b89f2
--- /dev/null
+++ b/php-pear-CAS-systemlibs.patch
@@ -0,0 +1,32 @@
+diff -up CAS-1.1.1/CAS.php.systemlib CAS-1.1.1/CAS.php
+--- CAS-1.1.1/CAS.php.systemlib 2010-05-20 19:51:33.000000000 +0200
++++ CAS-1.1.1/CAS.php 2010-05-20 19:51:27.000000000 +0200
+@@ -40,7 +40,7 @@ if (!$_SERVER['REQUEST_URI']) {
+ // another one by Vangelis Haniotakis also to make phpCAS work with PHP5
+ //
+ if (version_compare(PHP_VERSION, '5', '>=')) {
+- require_once (dirname(__FILE__) . '/CAS/domxml-php4-to-php5.php');
++ require_once('/usr/share/php/domxml-php4-php5/domxml-php4-to-php5.php');
+ }
+
+ /**
+diff -up CAS-1.1.1/php-pear-CAS.xml.systemlib CAS-1.1.1/php-pear-CAS.xml
+--- CAS-1.1.1/php-pear-CAS.xml.systemlib 1970-01-01 10:13:08.000000000 +0100
++++ CAS-1.1.1/php-pear-CAS.xml 2010-05-20 19:51:46.000000000 +0200
+@@ -51,7 +51,6 @@ see http://www.ja-sig.org/wiki/display/C
+ <file baseinstalldir="/" md5sum="9162d942d32ac8bdc01d409c07f41a0f" name="CAS/PGTStorage/pgt-file.php" role="php" />
+ <file baseinstalldir="/" md5sum="4bd67b4d6d6021504c00eff90e577ac0" name="CAS/PGTStorage/pgt-main.php" role="php" />
+ <file baseinstalldir="/" md5sum="b9c07025eef0c13593773be0c4f48e21" name="CAS/client.php" role="php" />
+- <file baseinstalldir="/" md5sum="e9ce7e11f871d8206b0abc2f608b0277" name="CAS/domxml-php4-to-php5.php" role="php" />
+ <file baseinstalldir="/" md5sum="a8e731ea0f492255d0121047f88a66e8" name="docs/api/annotated.html" role="doc" />
+ <file baseinstalldir="/" md5sum="c6548ef25563a0be9a536cdfaa432114" name="docs/api/CAS_8php.html" role="doc" />
+ <file baseinstalldir="/" md5sum="36a457969af7c786fecf8cc6860edff8" name="docs/api/CAS_8php_source.html" role="doc" />
+@@ -192,7 +191,7 @@ see http://www.ja-sig.org/wiki/display/C
+ <file baseinstalldir="/" md5sum="e14db513fb966a6ac042001eb35a43c2" name="docs/ChangeLog" role="doc" />
+ <file baseinstalldir="/" md5sum="8b55ff8b0efc4d70a30e3d282f4ef188" name="docs/index.html" role="doc" />
+ <file baseinstalldir="/" md5sum="d153a0effa32fbccded9387ea5310df6" name="docs/README" role="doc" />
+- <file baseinstalldir="/" md5sum="8de4941eed30099e1a867f8e05414f6e" name="CAS.php" role="php" />
++ <file baseinstalldir="/" md5sum="4dcda9e7e1019d1e1ba477e982e30e7e" name="CAS.php" role="php" />
+ </dir>
+ </contents>
+ <dependencies>
diff --git a/php-pear-CAS.spec b/php-pear-CAS.spec
new file mode 100644
index 0000000..a793444
--- /dev/null
+++ b/php-pear-CAS.spec
@@ -0,0 +1,106 @@
+%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%global pear_name CAS
+%global channel __uri
+#global prever RC7
+
+
+Name: php-pear-CAS
+Version: 1.1.1
+Release: %{?prever:0.}1%{?prever:.}%{?prever}%{?dist}
+Summary: Central Authentication Service client library in php
+
+Group: Development/Libraries
+License: BSD
+URL: http://www.ja-sig.org/wiki/display/CASC/phpCAS
+Source0: http://www.ja-sig.org/downloads/cas-clients/php/%{version}%{?prever}/%{pear_name}-%{version}%{?prever}.tgz
+
+Patch0: php-pear-CAS-systemlibs.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+BuildRequires: php-pear >= 1:1.4.9-1.2
+
+Requires(post): %{__pear}
+Requires(postun): %{__pear}
+Requires: php-pear(DB) >= 1.4.0
+Requires: php-pear(PEAR) >= 1.4.3
+Requires: php-domxml-php4-php5
+Provides: php-pear(%{channel}/%{pear_name}) = %{version}
+# this library is mostly known as phpCAS
+Provides: phpCAS = %{version}-%{release}
+
+
+%description
+This package is a PEAR library for using a Central Authentication Service.
+
+
+%prep
+%setup -q -c
+
+# Package is V2
+mv package.xml %{pear_name}-%{version}%{?prever}/%{name}.xml
+cd %{pear_name}-%{version}%{?prever}
+
+# converting to unix format mandatory for old patch version
+sed -i -e 's/\r//' CAS.php
+%patch0 -p1 -b .systemlib
+
+
+%build
+cd %{pear_name}-%{version}%{?prever}
+# Empty build section, most likely nothing required.
+
+
+%install
+rm -rf $RPM_BUILD_ROOT docdir
+cd %{pear_name}-%{version}%{?prever}
+%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+
+
+# Move documentation
+mv $RPM_BUILD_ROOT%{pear_docdir}/%{pear_name} ../docdir
+for fic in ../docdir/docs/examples/example*.php; do
+ sed -i -e 's/\r//' $fic
+done
+
+# Clean up unnecessary files
+rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
+
+# Install XML package description
+mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
+install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post
+%{__pear} install --nodeps --soft --force --register-only \
+ %{pear_xmldir}/%{name}.xml >/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+ %{__pear} uninstall --nodeps --ignore-errors --register-only \
+ %{channel}/%{pear_name} >/dev/null || :
+fi
+
+
+%files
+%defattr(-,root,root,-)
+%doc docdir/docs/*
+%{pear_xmldir}/%{name}.xml
+%{pear_phpdir}/CAS
+%{pear_phpdir}/CAS.php
+
+
+%changelog
+* Thu May 20 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.1-1
+- update to 1.1.1
+
+* Thu May 20 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.0-1
+- update to 1.1.0 finale
+
+* Sun Mar 14 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.1.0-0.1.RC7
+- initial packaging (using pear make-rpm-spec CAS-1.1.0RC7.tgz)
+