diff --git a/.gitignore b/.gitignore index 37d52b1..84ad670 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /fedora-review-0.2.2.tar.gz /fedora-review-0.3.0.tar.gz /fedora-review-0.3.1.tar.gz +/fedora-review-0.4.0.tar.gz diff --git a/fedora-review.spec b/fedora-review.spec index 11577be..6606368 100644 --- a/fedora-review.spec +++ b/fedora-review.spec @@ -1,11 +1,17 @@ +#invoke with "--with tests" to enable tests +%bcond_with tests + +# See notes in make_release which patches this. +#global git_tag .fa1afe1 + Name: fedora-review -Version: 0.3.1 -Release: 3%{?dist} +Version: 0.4.0 +Release: 1%{?git_tag}%{?dist} Summary: Review tool for fedora rpm packages License: GPLv2+ URL: https://fedorahosted.org/FedoraReview/ -Source0: https://fedorahosted.org/released/FedoraReview/%{name}-%{version}.tar.gz +Source0: https://fedorahosted.org/released/FedoraReview/%{name}-%{version}%{?git_tag}.tar.gz BuildArch: noarch @@ -28,8 +34,6 @@ Requires: python-argparse # Let's be consistent with the name used on fedorahosted provides: FedoraReview = %{version}-%{release} -Patch0: 0001-Handle-multiline-envvars-correct-bz-874246.patch - %description This tool automates much of the dirty work when reviewing a package @@ -49,25 +53,59 @@ python. There is also support for external tests that can be written in a simple way in bash. +%package tests +Summary: Test and test data files for fedora-review +Requires: %{name} = %{version}-%{release} + +%description tests +Tests are packaged separately due to space concerns. + + +%package php-phpci +Summary: Run phpci static analyzer on php packages +Requires: %{name} = %{version}-%{release} +Requires: php-bartlett-PHP-CompatInfo + +%description php-phpci +Bash plugin running the phpci static analyzer on php packages, +see http://php5.laurent-laville.org/compatinfo/. + + %prep %setup -q chmod -x api/examples/* -%patch0 -p1 -b . -F1 %build -%{__python} setup.py build +%{__python} setup.py --quiet build + %install -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%{__python} setup.py --quiet install -O1 --skip-build --root $RPM_BUILD_ROOT +pkg_dir="$RPM_BUILD_ROOT/%{python_sitelib}/FedoraReview" +ln -s %{_datadir}/%{name}/scripts $pkg_dir/scripts +ln -s %{_datadir}/%{name}/plugins $pkg_dir/plugins +cd test +bash < restore-links.sh +rm restore-links.sh remember-links +cd .. +cp -ar test "$RPM_BUILD_ROOT%{_datadir}/%{name}" + + +%check +%if %{with tests} +cd test +export REVIEW_LOGLEVEL=warning +export MAKE_RELEASE=1 +mock --quiet -r fedora-17-i386 --init +mock --quiet -r fedora-16-i386 --init +mock --quiet -r fedora-17-i386 --uniqueext=hugo --init +python -m unittest discover -f +%endif -ln -s %{_datadir}/%{name}/plugins \ - %{buildroot}%{python_sitelib}/FedoraReview/plugins -ln -s %{_datadir}/%{name}/scripts \ - %{buildroot}%{python_sitelib}/FedoraReview/scripts %files -%doc COPYING AUTHORS TODO README api +%doc COPYING AUTHORS TODO README %{python_sitelib}/* %{_bindir}/fedora-review %{_bindir}/fedora-create-review @@ -77,8 +115,20 @@ ln -s %{_datadir}/%{name}/scripts \ %dir %{_datadir}/%{name} %{_datadir}/%{name}/plugins %{_datadir}/%{name}/scripts +%exclude %{_datadir}/%{name}/scripts/php-phpci.sh + +%files tests +%doc test/README.test +%{_datadir}/%{name}/test + +%files php-phpci +%{_datadir}/%{name}/scripts/php-phpci.sh + %changelog +* Mon Jan 28 2013 Stanislav Ochotnicky - 0.4.0-1 +- Updating to upstream 0.4.0 + * Wed Nov 07 2012 Pierre-Yves Chibon - 0.3.1-3 - Backport from upstream's git fix to RHBZ#874246 (Patch0) @@ -125,3 +175,5 @@ ln -s %{_datadir}/%{name}/scripts \ * Thu Nov 10 2011 Pierre-Yves Chibon - 0.1.0-1 - Initial packaging work for Fedora + + diff --git a/sources b/sources index e9e39cf..e26a0ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bd1501dd14910b4f412e5ba616f0636f fedora-review-0.3.1.tar.gz +915df5c6cd2dc8a3cd246b93728e87de fedora-review-0.4.0.tar.gz