summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-06-10 07:17:36 +0200
committerRemi Collet <fedora@famillecollet.com>2012-06-10 07:17:36 +0200
commit5af1f8effd032a893f42b256595fe16a2d27e5f5 (patch)
treeb8c386e73cb0395d0bed0f6a19e1279bf93f8c2e
repo reorg
-rw-r--r--Makefile4
-rw-r--r--php-pear-Auth-Yubico-2.3.channel.patch22
-rw-r--r--php-pear-Auth-Yubico.spec126
3 files changed, 152 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/php-pear-Auth-Yubico-2.3.channel.patch b/php-pear-Auth-Yubico-2.3.channel.patch
new file mode 100644
index 0000000..dded191
--- /dev/null
+++ b/php-pear-Auth-Yubico-2.3.channel.patch
@@ -0,0 +1,22 @@
+diff -Naur Auth_Yubico-2.3.orig/package.xml Auth_Yubico-2.3.new/package.xml
+--- Auth_Yubico-2.3.orig/package.xml 2011-02-02 21:22:16.000000000 +0100
++++ Auth_Yubico-2.3.new/package.xml 2011-02-03 14:08:23.561533880 +0100
+@@ -4,7 +4,7 @@
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>Auth_Yubico</name>
+- <channel>pear.php.net</channel>
++ <channel>__uri</channel>
+ <summary>Authentication class for verifying Yubico OTP tokens.</summary>
+ <description>PHP class to help you verify Yubico OTP tokens.
+ </description>
+@@ -40,6 +40,9 @@
+ <pearinstaller>
+ <min>1.4.0b1</min>
+ </pearinstaller>
++ <extension>
++ <name>curl</name>
++ </extension>
+ </required>
+ </dependencies>
+ <phprelease />
diff --git a/php-pear-Auth-Yubico.spec b/php-pear-Auth-Yubico.spec
new file mode 100644
index 0000000..e84efe9
--- /dev/null
+++ b/php-pear-Auth-Yubico.spec
@@ -0,0 +1,126 @@
+%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%global pear_name Auth_Yubico
+%global channel __uri
+
+Name: php-pear-Auth-Yubico
+Version: 2.4
+Release: 1%{?dist}
+Summary: Authentication class for verifying Yubico OTP tokens
+
+Group: Development/Libraries
+License: BSD
+URL: http://php-yubico.googlecode.com/
+Source0: http://php-yubico.googlecode.com/files/Auth_Yubico-%{version}.tgz
+Patch1: php-pear-Auth-Yubico-2.3.channel.patch
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+BuildArch: noarch
+BuildRequires: php-pear >= 1:1.4.9-1.2
+
+Requires: php-pear(PEAR) >= 1.4.0
+Requires(post): %{__pear}
+Requires(postun): %{__pear}
+
+Provides: php-pear(%{channel}/%{pear_name}) = %{version}
+
+
+%description
+ The Yubico authentication PHP class provides an easy way to integrate the
+Yubikey into your existing PHP-based user authentication infrastructure.
+
+
+#-------------------------------------------------------------------------------
+%prep
+#-------------------------------------------------------------------------------
+
+%setup -q -n Auth_Yubico-%{version}
+%patch1 -p 1
+
+# Fix end of line encoding.
+
+for file in Modhex_Calculator.php Modhex.php
+do sed -i -e 's/\r$//' "example/${file}"
+done
+
+
+#-------------------------------------------------------------------------------
+%build
+#-------------------------------------------------------------------------------
+
+# Nothing to do.
+
+
+#-------------------------------------------------------------------------------
+%install
+#-------------------------------------------------------------------------------
+
+rm -rf "${RPM_BUILD_ROOT}"
+
+%{__pear} install --nodeps \
+ --packagingroot "${RPM_BUILD_ROOT}" \
+ package.xml
+
+# Clean up unnecessary files.
+
+rm -rf "${RPM_BUILD_ROOT}%{pear_phpdir}/".??*
+
+# Install XML package description.
+
+mkdir -p "${RPM_BUILD_ROOT}%{pear_xmldir}"
+install -p -m 644 package.xml "${RPM_BUILD_ROOT}%{pear_xmldir}/%{name}.xml"
+
+
+#-------------------------------------------------------------------------------
+%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 NEWS README COPYING
+%doc example demo.php
+%{pear_xmldir}/%{name}.xml
+%{pear_phpdir}/Auth
+
+
+#-------------------------------------------------------------------------------
+%changelog
+#-------------------------------------------------------------------------------
+* Sat Mar 31 2012 Remi Collet <RPMS@FamilleCollet.com> - 2.4.1
+- upstream 2.4, rebuild for remi repository
+
+* Wed Mar 28 2012 Patrick Monnerat <pm@datasphere.ch> 2.4-1
+- New upstream release: dvorak keyboard support.
+
+* Thu Feb 24 2011 Remi Collet <RPMS@FamilleCollet.com> - 2.3-2
+- rebuild for remi repo
+
+* Mon Feb 21 2011 Patrick Monnerat <pm@datasphere.ch> 2.3-2
+- Some spec file adjustments:
+ https://bugzilla.redhat.com/show_bug.cgi?id=675122#c1
+
+* Thu Feb 3 2011 Patrick Monnerat <pm@datasphere.ch> 2.3-1
+- Initial rpm packaging.
+- Patch "channel" to change package channel in XML description file.