From 228a5e29317d78057f36b63ae4e698b46ba059ac Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Jan 2013 17:02:59 +0100 Subject: php-horde-Horde-Crypt: 2.1.1 --- php-horde-Horde-Crypt.spec | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) (limited to 'php-horde-Horde-Crypt.spec') diff --git a/php-horde-Horde-Crypt.spec b/php-horde-Horde-Crypt.spec index ee3a945..229180d 100644 --- a/php-horde-Horde-Crypt.spec +++ b/php-horde-Horde-Crypt.spec @@ -3,8 +3,11 @@ %global pear_name Horde_Crypt %global pear_channel pear.horde.org +# can run test which requires locales to be installed +%global with_tests %{?_with_tests:1}%{!?_with_tests:0} + Name: php-horde-Horde-Crypt -Version: 2.1.0 +Version: 2.1.1 Release: 1%{?dist} Summary: Horde Cryptography API @@ -12,20 +15,20 @@ Group: Development/Libraries License: LGPLv2 URL: http://pear.horde.org Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz -# /usr/lib/rpm/find-lang.sh from fedora 16 -Source1: find-lang.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: php-pear(PEAR) >= 1.7.0 BuildRequires: php-channel(%{pear_channel}) BuildRequires: gettext +%if %{with_tests} # To run unit tests -BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.0.0 +BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 %if 0%{?rhel} < 6 # Don't work with GnuPG 2 BuildRequires: gnupg < 2 %endif +%endif Requires(post): %{__pear} Requires(postun): %{__pear} @@ -88,16 +91,23 @@ rm -rf %{buildroot}%{pear_metadir}/.??* mkdir -p %{buildroot}%{pear_xmldir} install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} -%if 0%{?fedora} > 13 -%find_lang %{pear_name} -%else -sh %{SOURCE1} %{buildroot} %{pear_name} -%endif +for loc in locale/{??,??_??} +do + lang=$(basename $loc) + test -d $loc && echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc" +done | tee ../%{pear_name}.lang %check +%if %{with_tests} cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) -phpunit -d date.timezone=UTC AllTests.php +phpunit \ + -d include_path=%{buildroot}%{pear_phpdir}:.:%{pear_phpdir} \ + -d date.timezone=UTC \ + . +%else +: Test disabled, missing '--with tests' option. +%endif %post @@ -111,21 +121,24 @@ if [ $1 -eq 0 ] ; then fi -%files -f %{pear_name}-%{version}/%{pear_name}.lang +%files -f %{pear_name}.lang %doc %{pear_docdir}/%{pear_name} %defattr(-,root,root,-) %{pear_xmldir}/%{name}.xml %{pear_phpdir}/Horde/Crypt %{pear_phpdir}/Horde/Crypt.php %{pear_testdir}/%{pear_name} -# own locales (non standard) directories, .mo own by find_lang %dir %{pear_datadir}/%{pear_name} %dir %{pear_datadir}/%{pear_name}/locale -%dir %{pear_datadir}/%{pear_name}/locale/* -%dir %{pear_datadir}/%{pear_name}/locale/*/LC_MESSAGES %changelog +* Wed Jan 9 2013 Remi Collet - 2.0.2-1 +- Update to 2.0.2 for remi repo +- use local script instead of find_lang +- new test layout (requires Horde_Test 2.1.0) +- add option for test (can't be run in mock) + * Wed Nov 7 2012 Remi Collet - 2.1.0-1 - Update to 2.1.0 for remi repo -- cgit