summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-03 17:46:06 +0200
committerRemi Collet <remi@remirepo.net>2017-10-03 17:46:06 +0200
commitcc2fe0f576e6e0344c1c99d2ac70505f988ce742 (patch)
treec04d9873f9588888e74689588d0f16e39840b8fc
parentba97ae64357b8a229f0481a75620de84b9acf7df (diff)
mcrypt is optional
-rw-r--r--.gitignore8
-rw-r--r--php-horde-Horde-Crypt-Blowfish.spec38
2 files changed, 22 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/php-horde-Horde-Crypt-Blowfish.spec b/php-horde-Horde-Crypt-Blowfish.spec
index 2eb61ab..65a428e 100644
--- a/php-horde-Horde-Crypt-Blowfish.spec
+++ b/php-horde-Horde-Crypt-Blowfish.spec
@@ -12,7 +12,7 @@
Name: php-horde-Horde-Crypt-Blowfish
Version: 1.1.2
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Blowfish Encryption Library
Group: Development/Libraries
@@ -20,12 +20,10 @@ License: LGPLv2
URL: http://pear.horde.org
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.3.0
BuildRequires: php-pear(PEAR) >= 1.7.0
BuildRequires: php-hash
-BuildRequires: php-mcrypt
BuildRequires: php-channel(%{pear_channel})
# To run unit tests
BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
@@ -34,7 +32,6 @@ Requires(post): %{__pear}
Requires(postun): %{__pear}
Requires: php(language) >= 5.3.0
Requires: php-hash
-Requires: php-mcrypt
Requires: php-openssl
Requires: php-channel(%{pear_channel})
Requires: php-pear(PEAR) >= 1.7.0
@@ -42,6 +39,9 @@ Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0
Requires: php-pear(%{pear_channel}/Horde_Exception) < 3.0.0
Requires: php-pear(%{pear_channel}/Horde_Support) >= 2.0.0
Requires: php-pear(%{pear_channel}/Horde_Support) < 3.0.0
+%if 0%{?fedora} >= 21
+Suggests: php-mcrypt
+%endif
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
Provides: php-composer(horde/horde-crypt-blowfish) = %{version}
@@ -76,26 +76,14 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
%check
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
-# remirepo:14
-%if 0%{?rhel} == 5
-phpunit . || exit 0
-%else
-run=0
+
ret=0
-if which php56; then
- php56 %{_bindir}/phpunit . || ret=1
- run=1
-fi
-if which php71; then
- php71 %{_bindir}/phpunit . || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/phpunit --verbose .
-# remirepo:3
-fi
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --verbose . || ret=1
+ fi
+done
exit $ret
-%endif
%post
@@ -110,17 +98,19 @@ fi
%files
-%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
# dir also owned by Horde_Crypt which is not required
%dir %{pear_phpdir}/Horde/Crypt
%{pear_phpdir}/Horde/Crypt/Blowfish
%{pear_phpdir}/Horde/Crypt/Blowfish.php
-%{pear_testdir}/%{pear_name}
+%doc %{pear_testdir}/%{pear_name}
%changelog
+* Tue Oct 3 2017 Remi Collet <remi@fedoraproject.org> - 1.1.2-4
+- php-mcrypt is optional
+
* Fri Sep 02 2016 Remi Collet <remi@fedoraproject.org> - 1.1.2-1
- Update to 1.1.2