summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--php-horde-Horde-Translation.spec38
2 files changed, 25 insertions, 21 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-Translation.spec b/php-horde-Horde-Translation.spec
index 968f07f..21842ce 100644
--- a/php-horde-Horde-Translation.spec
+++ b/php-horde-Horde-Translation.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-horde-Horde-Translation
#
-# Copyright (c) 2012-2017 Nick Bebout, Remi Collet
+# Copyright (c) 2012-2019 Nick Bebout, Remi Collet
#
# License: MIT
# https://fedoraproject.org/wiki/Licensing:MIT#Modern_Style_with_sublicense
@@ -20,15 +20,13 @@
Name: php-horde-Horde-Translation
Version: 2.2.2
-Release: 1%{?dist}
+Release: 7%{?dist}
Summary: Horde translation library
-Group: Development/Libraries
License: LGPLv2+
URL: http://pear.horde.org
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
BuildRequires: gettext
BuildRequires: php(language) >= 5.3.0
@@ -36,8 +34,13 @@ BuildRequires: php-pear(PEAR) >= 1.7.0
BuildRequires: php-channel(%{pear_channel})
%if %{with_tests}
# To run unit tests
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 with php-pear(%{pear_channel}/Horde_Test) < 3)
+BuildRequires: glibc-langpack-de
+%else
BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
%endif
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -59,7 +62,7 @@ Translation wrappers.
cd %{pear_name}-%{version}
# Install .po and .pot files, only part of test suite
# Remove checksum for .mo, as we regenerate them
-sed -e '/%{pear_name}.mo/s/md5sum=.*name=/name=/' \
+sed -e '/Horde.*\.mo/s/md5sum=.*name=/name=/' \
../package.xml >%{name}.xml
touch -r ../package.xml %{name}.xml
@@ -90,21 +93,12 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
%if %{with_tests}
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
-# remirepo:11
-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:2
-fi
+for cmd in php php56 php70 php71 php72 php73 php74; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose . || ret=1
+ fi
+done
exit $ret
%else
: Test disabled, missing '--with tests' option.
@@ -123,16 +117,18 @@ fi
%files
-%defattr(-,root,root,-)
%{pear_xmldir}/%{name}.xml
%dir %{pear_phpdir}/Horde
%{pear_phpdir}/Horde/Translation
%{pear_phpdir}/Horde/Translation.php
%doc %{pear_docdir}/%{pear_name}
-%{pear_testdir}/%{pear_name}
+%doc %{pear_testdir}/%{pear_name}
%changelog
+* Fri Nov 15 2019 Remi Collet <remi@remirepo.net> - 2.2.2-7
+- ignore all mo checksum, fix FTBFS from Koschei
+
* Mon Feb 27 2017 Remi Collet <remi@fedoraproject.org> - 2.2.2-1
- Update to 2.2.2