From 0d0edafadbc3ef7d3f900e602f87e980578501c7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 13 Aug 2014 15:37:21 +0200 Subject: php-ircmaxell-security-lib: 1.0.0 - New package --- Makefile | 4 ++ php-ircmaxell-security-lib.spec | 108 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 Makefile create mode 100644 php-ircmaxell-security-lib.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/php-ircmaxell-security-lib.spec b/php-ircmaxell-security-lib.spec new file mode 100644 index 0000000..09d3d72 --- /dev/null +++ b/php-ircmaxell-security-lib.spec @@ -0,0 +1,108 @@ +# 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: 1%{?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} + + +%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 - 1.0.0-1 +- initial package \ No newline at end of file -- cgit