Stanislav Ochotnicky 9401bb
#invoke with "--with tests" to enable tests
Stanislav Ochotnicky 9401bb
%bcond_with tests
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
# See notes in make_release which patches this.
Stanislav Ochotnicky 9401bb
#global     git_tag  .fa1afe1
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 562f8c
Name:       fedora-review
Stanislav Ochotnicky 9401bb
Version:    0.4.0
Stanislav Ochotnicky 9401bb
Release:    1%{?git_tag}%{?dist}
Stanislav Ochotnicky 562f8c
Summary:    Review tool for fedora rpm packages
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
License:    GPLv2+
Stanislav Ochotnicky 562f8c
URL:        https://fedorahosted.org/FedoraReview/
Stanislav Ochotnicky 9401bb
Source0:    https://fedorahosted.org/released/FedoraReview/%{name}-%{version}%{?git_tag}.tar.gz
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
BuildArch:  noarch
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky f71eb3
BuildRequires:  python-BeautifulSoup
Stanislav Ochotnicky f71eb3
BuildRequires:  python-bugzilla
Stanislav Ochotnicky f71eb3
BuildRequires:  python-straight-plugin
Stanislav Ochotnicky f7d730
BuildRequires:  python2-devel
Stanislav Ochotnicky f7d730
BuildRequires:  rpm-python
Stanislav Ochotnicky 600866
BuildRequires:  python-argparse
Stanislav Ochotnicky f7d730
Stanislav Ochotnicky f7d730
Requires:       fedora-packager
Stanislav Ochotnicky f71eb3
Requires:       python-BeautifulSoup
Stanislav Ochotnicky f7d730
Requires:       python-bugzilla
Stanislav Ochotnicky f71eb3
Requires:       python-kitchen
Stanislav Ochotnicky f7d730
Requires:       python-straight-plugin
Stanislav Ochotnicky f7d730
Requires:       rpm-python
Stanislav Ochotnicky f71eb3
Requires:       rpmdevtools
Stanislav Ochotnicky 600866
Requires:       python-argparse
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky f7d730
# Let's be consistent with the name used on fedorahosted
Stanislav Ochotnicky f7d730
provides:       FedoraReview = %{version}-%{release}
Stanislav Ochotnicky f7d730
Stanislav Ochotnicky f7d730
Stanislav Ochotnicky 562f8c
%description
Stanislav Ochotnicky 562f8c
This tool automates much of the dirty work when reviewing a package
Stanislav Ochotnicky 600866
for the Fedora Package Collection like:
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 600866
    * Downloading SRPM & SPEC.
Stanislav Ochotnicky 562f8c
    * Download upstream source
Stanislav Ochotnicky 562f8c
    * Check md5sums
Stanislav Ochotnicky 600866
    * Build and install package in mock.
Stanislav Ochotnicky 600866
    * Run rpmlint.
Stanislav Ochotnicky 600866
    * Generate a review template, which becomes the starting
Stanislav Ochotnicky 600866
      point for the review work.
Stanislav Ochotnicky 600866
Stanislav Ochotnicky 600866
The tool is composed of a plugins, one for each supported language.
Stanislav Ochotnicky 600866
As of today, there is plugins for C/C++, Ruby, java, R, perl and
Stanislav Ochotnicky 600866
python.  There is also support for external tests that can be written
Stanislav Ochotnicky 600866
in a simple way in bash.
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 9401bb
%package tests
Stanislav Ochotnicky 9401bb
Summary: Test and test data files for fedora-review
Stanislav Ochotnicky 9401bb
Requires: %{name} = %{version}-%{release}
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
%description tests
Stanislav Ochotnicky 9401bb
Tests are packaged separately due to space concerns.
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
%package php-phpci
Stanislav Ochotnicky 9401bb
Summary:  Run phpci static analyzer on php packages
Stanislav Ochotnicky 9401bb
Requires: %{name} = %{version}-%{release}
Stanislav Ochotnicky 9401bb
Requires: php-bartlett-PHP-CompatInfo
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
%description php-phpci
Stanislav Ochotnicky 9401bb
Bash plugin running the phpci static analyzer on php packages,
Stanislav Ochotnicky 9401bb
see http://php5.laurent-laville.org/compatinfo/.
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 562f8c
%prep
Stanislav Ochotnicky 562f8c
%setup -q
182472
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
%build
Stanislav Ochotnicky 9401bb
%{__python} setup.py --quiet build
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
%install
Stanislav Ochotnicky 9401bb
%{__python} setup.py --quiet install -O1 --skip-build --root $RPM_BUILD_ROOT
Stanislav Ochotnicky 9401bb
pkg_dir="$RPM_BUILD_ROOT/%{python_sitelib}/FedoraReview"
Stanislav Ochotnicky 9401bb
ln -s %{_datadir}/%{name}/scripts $pkg_dir/scripts
Stanislav Ochotnicky 9401bb
ln -s %{_datadir}/%{name}/plugins $pkg_dir/plugins
Stanislav Ochotnicky 9401bb
cd test
Stanislav Ochotnicky 9401bb
bash < restore-links.sh
Stanislav Ochotnicky 9401bb
rm restore-links.sh remember-links
Stanislav Ochotnicky 9401bb
cd ..
Stanislav Ochotnicky 9401bb
cp -ar test "$RPM_BUILD_ROOT%{_datadir}/%{name}"
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
%check
Stanislav Ochotnicky 9401bb
%if %{with tests}
Stanislav Ochotnicky 9401bb
cd test
Stanislav Ochotnicky 9401bb
export REVIEW_LOGLEVEL=warning
Stanislav Ochotnicky 9401bb
export MAKE_RELEASE=1
Stanislav Ochotnicky 9401bb
mock --quiet -r fedora-17-i386 --init
Stanislav Ochotnicky 9401bb
mock --quiet -r fedora-16-i386 --init
Stanislav Ochotnicky 9401bb
mock --quiet -r fedora-17-i386 --uniqueext=hugo --init
Stanislav Ochotnicky 9401bb
python -m unittest discover -f
Stanislav Ochotnicky 9401bb
%endif
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
%files
Stanislav Ochotnicky 9401bb
%doc COPYING AUTHORS TODO README
Stanislav Ochotnicky 562f8c
%{python_sitelib}/*
Stanislav Ochotnicky 562f8c
%{_bindir}/fedora-review
Stanislav Ochotnicky 9e89a9
%{_bindir}/fedora-create-review
Stanislav Ochotnicky 922ef7
%{_bindir}/koji-download-scratch
Stanislav Ochotnicky 562f8c
%{_mandir}/man1/%{name}.1.*
Stanislav Ochotnicky 9e89a9
%{_mandir}/man1/fedora-create-review.1.*
Stanislav Ochotnicky 562f8c
%dir %{_datadir}/%{name}
Stanislav Ochotnicky 600866
%{_datadir}/%{name}/plugins
Stanislav Ochotnicky 600866
%{_datadir}/%{name}/scripts
Stanislav Ochotnicky 9401bb
%exclude %{_datadir}/%{name}/scripts/php-phpci.sh
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
%files tests
Stanislav Ochotnicky 9401bb
%doc test/README.test
Stanislav Ochotnicky 9401bb
%{_datadir}/%{name}/test
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb
%files php-phpci
Stanislav Ochotnicky 9401bb
%{_datadir}/%{name}/scripts/php-phpci.sh
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
%changelog
Stanislav Ochotnicky 9401bb
* Mon Jan 28 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.4.0-1
Stanislav Ochotnicky 9401bb
- Updating to upstream 0.4.0
Stanislav Ochotnicky 9401bb
9cbf0b
* Wed Nov 07 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.3.1-3
9cbf0b
- Backport from upstream's git fix to RHBZ#874246 (Patch0)
9cbf0b
Stanislav Ochotnicky 33b778
* Thu Oct 25 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.1-2
Stanislav Ochotnicky 33b778
- Add symlink to scripts directory so they are loaded
Stanislav Ochotnicky 33b778
Stanislav Ochotnicky 600866
* Tue Sep 25 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.1-1
Stanislav Ochotnicky 600866
- Update to lastest upstream (0.3.1)
Stanislav Ochotnicky 600866
- Fix loading of system-wide plugins
Stanislav Ochotnicky 600866
- Add back suport for EL6
Stanislav Ochotnicky 600866
Stanislav Ochotnicky f7d730
* Mon Sep 24 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.0-1
Stanislav Ochotnicky f7d730
- Update to lastest upstream (0.3.0)
Stanislav Ochotnicky f7d730
- Remove no longer needed build workarounds
Stanislav Ochotnicky f7d730
Stanislav Ochotnicky 922ef7
* Thu Aug  9 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.2.2-1
Stanislav Ochotnicky 922ef7
- Update to lastest upstream (0.2.2)
Stanislav Ochotnicky 922ef7
- Add koji-download-scratch script
Stanislav Ochotnicky 922ef7
102029
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
102029
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
102029
Stanislav Ochotnicky f71eb3
* Wed Jul 11 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.2.0-1
Stanislav Ochotnicky f71eb3
- Update to latest release (0.2.0)
Stanislav Ochotnicky f71eb3
Stanislav Ochotnicky 883e4c
* Fri Feb 24 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.3-1
Stanislav Ochotnicky 883e4c
- Update to latest bugfix release
Stanislav Ochotnicky 883e4c
Stanislav Ochotnicky 9e89a9
* Fri Jan 13 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.2-1
Stanislav Ochotnicky 9e89a9
- Update to latest bugfix release
Stanislav Ochotnicky 9e89a9
- Add fedora-create-review script
Stanislav Ochotnicky 9e89a9
cbd287
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.1-3
cbd287
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
cbd287
1f5a2f
* Wed Jan 11 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.1-2
1f5a2f
- Add wget as requires
1f5a2f
Stanislav Ochotnicky eab9bf
* Wed Nov 23 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.1-1
Stanislav Ochotnicky eab9bf
- New upstream bugfix release
Stanislav Ochotnicky eab9bf
Stanislav Ochotnicky 562f8c
* Wed Nov 16 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.1.0-2
Stanislav Ochotnicky 562f8c
- Remove things not needed in el6+
Stanislav Ochotnicky 562f8c
Stanislav Ochotnicky 562f8c
* Thu Nov 10 2011 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.0-1
Stanislav Ochotnicky 562f8c
- Initial packaging work for Fedora
Stanislav Ochotnicky 9401bb
Stanislav Ochotnicky 9401bb