[php-ircmaxell-security-lib] import from review #1129700

Remi Collet remi at fedoraproject.org
Thu Aug 28 16:24:42 UTC 2014


commit f7ee043c11e911b119513eb7b1f1ae6783db9d3d
Author: Remi Collet <remi at fedoraproject.org>
Date:   Thu Aug 28 18:24:00 2014 +0200

    import from review #1129700

 .gitignore                      |    1 +
 php-ircmaxell-security-lib.spec |  113 +++++++++++++++++++++++++++++++++++++++
 sources                         |    1 +
 3 files changed, 115 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b861cad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/SecurityLib-1.0.0.tar.gz
diff --git a/php-ircmaxell-security-lib.spec b/php-ircmaxell-security-lib.spec
new file mode 100644
index 0000000..aac3bb6
--- /dev/null
+++ b/php-ircmaxell-security-lib.spec
@@ -0,0 +1,113 @@
+# spec file for php-ircmaxell-security-lib
+#
+# Copyright (c) 2014 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/3.0/
+#
+# Please, preserve the changelog entries
+#
+%global gh_commit    80934de3c482dcafb46b5756e59ebece082b6dc7
+%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner     ircmaxell
+%global gh_project   SecurityLib
+%global with_tests   %{?_without_tests:0}%{!?_without_tests:1}
+
+Name:           php-ircmaxell-security-lib
+Version:        1.0.0
+Release:        2%{?dist}
+Summary:        A Base Security Library
+
+Group:          Development/Libraries
+# See class headers
+# LICENSE file will be in next version
+License:        MIT
+URL:            https://github.com/%{gh_owner}/%{gh_project}
+Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+%if %{with_tests}
+BuildRequires:  php(language) >= 5.3.2
+BuildRequires:  php-bcmath
+BuildRequires:  php-hash
+BuildRequires:  %{_bindir}/phpab
+BuildRequires:  %{_bindir}/phpunit
+BuildRequires:  php-theseer-autoload
+#      "mikey179/vfsStream": "1.1.*", ignore max version on purpose
+BuildRequires:  php-composer(mikey179/vfsStream) >= 1.1
+%endif
+
+# From composer.json
+#      "php": ">=5.3.2"
+Requires:       php(language) >= 5.3.2
+# From phpcompatinfo report for version 1.0.0
+Requires:       php-hash
+Requires:       php-reflection
+Requires:       php-spl
+# optional php-bcmath or php-gmp
+
+Provides:       php-composer(ircmaxell/security-lib) = %{version}
+
+
+%description
+This is a base set of libraries used in other projects.
+This isn't useful on its own...
+
+Optional dependency: php-gmp or php-bcmath
+
+
+%prep
+%setup -q -n %{gh_project}-%{gh_commit}
+
+rm lib/SecurityLib/composer.json
+
+
+%build
+# Nothing
+
+
+%install
+rm -rf       %{buildroot}
+mkdir -p     %{buildroot}%{_datadir}/php
+cp -pr lib/* %{buildroot}%{_datadir}/php
+
+
+%check
+%if %{with_tests}
+if %{_bindir}/php -m | grep gmp; then
+  : Skip test with GMP load, BCMath expected
+else
+  : Generate autoloader
+  %{_bindir}/php -d date.timezone=UTC \
+  %{_bindir}/phpab \
+    --basedir $PWD \
+    --output autoload.php \
+    lib test %{_datadir}/php/org/bovigo/vfs
+
+  : Run test suite
+  %{_bindir}/phpunit \
+    --bootstrap autoload.php \
+    -d date.timezone=UTC
+fi
+%else
+: Test suite disabled
+%endif
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc *.md
+%doc composer.json
+%{_datadir}/php/SecurityLib
+
+
+%changelog
+* Wed Aug 13 2014 Remi Collet <remi at fedoraproject.org> - 1.0.0-2
+- drop composer.json from library path
+
+* Wed Aug 13 2014 Remi Collet <remi at fedoraproject.org> - 1.0.0-1
+- initial package
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..5f65528 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+dec61814bcd0aaa486227a1dfe7bf311  SecurityLib-1.0.0.tar.gz


More information about the scm-commits mailing list