9b29c2f
# spec file for mysql-utilities
9b29c2f
#
9b29c2f
# Copyright (c) 2012-2013 Remi Collet
9b29c2f
# License: CC-BY-SA
9b29c2f
# http://creativecommons.org/licenses/by-sa/3.0/
9b29c2f
#
9b29c2f
# Please, preserve the changelog entries
9b29c2f
#
9cae797
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Remi Collet 8dbe102
%{!?python_version: %global python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")}
9cae797
9cae797
# From README.txt
9cae797
# Python 2.6 or later but Python 3.x is not supported (yet).
9cae797
%global with_python3 0
9cae797
9cae797
Name:           mysql-utilities
45903e4
Version:        1.3.4
45903e4
Release:        1%{?dist}
9cae797
Summary:        MySQL Utilities
9cae797
9cae797
Group:          Applications/Databases
9cae797
License:        GPLv2
9cae797
URL:            https://launchpad.net/mysql-utilities
9cae797
83b9fd5
# Upstream has a mirror redirector for downloads, so the URL is hard to
83b9fd5
# represent statically.  You can get the tarball by following a link from
83b9fd5
# http://dev.mysql.com/downloads/tools/utilities/
83b9fd5
Source0:        %{name}-%{version}.tar.gz
9cae797
9cae797
BuildArch:      noarch
9cae797
BuildRequires:  python2-devel >= 2.6
Remi Collet 8dbe102
BuildRequires:  mysql-connector-python
9cae797
%if %{with_python3}
9cae797
BuildRequires:  python3-devel
9cae797
%endif
9cae797
9cae797
Requires:       mysql-connector-python
9cae797
Remi Collet 8dbe102
9cae797
%description
83b9fd5
A package of utilities that are used for maintenance and administration
83b9fd5
of MySQL servers. These utilities encapsulate a set of primitive commands,
83b9fd5
and bundles them so they can be used to perform macro operations with a
83b9fd5
single command.
9cae797
9cae797
Documentation:
9cae797
http://dev.mysql.com/doc/workbench/en/mysql-utilities.html
9cae797
9cae797
9cae797
%prep
83b9fd5
%setup -q
9cae797
9cae797
9cae797
%build
83b9fd5
# nothing to build
9cae797
9cae797
9cae797
%install 
9cae797
install --directory %{buildroot}%{_mandir}/man1
9cae797
9cae797
%if %{with_python3}
Remi Collet 8dbe102
: Python 3 build
9cae797
%{__python3} setup.py install --skip-profile --root %{buildroot}
9cae797
rm -rf build
9cae797
%endif
9cae797
Remi Collet 8dbe102
: Python 2 build - end with this for tests
9cae797
%{__python} setup.py install --skip-profile --root %{buildroot}
9cae797
Remi Collet 8dbe102
# http://bugs.mysql.com/68614 - Issue with python 2.6
Remi Collet 8dbe102
%if "%{python_version}" < "2.7"
Remi Collet 8dbe102
: drop commands requiring python 2.7
Remi Collet 8dbe102
rm %{buildroot}%{_bindir}/mysqlauditadmin
Remi Collet 8dbe102
rm %{buildroot}%{_bindir}/mysqlauditgrep
Remi Collet 8dbe102
%endif
Remi Collet 8dbe102
83b9fd5
: Man pages
83b9fd5
%{__python} setup.py install_man --root %{buildroot}
Remi Collet 8dbe102
9cae797
9cae797
%check
Remi Collet 8dbe102
%if "%{python_version}" >= "2.7"
83b9fd5
export PYTHONPATH=%{buildroot}/%{python_sitelib}
83b9fd5
for unit in unit_tests/test*py
83b9fd5
do
83b9fd5
  %{__python} $unit
83b9fd5
done
Remi Collet 8dbe102
%endif
9cae797
9cae797
9cae797
%files
83b9fd5
%doc CHANGES.txt LICENSE.txt README.txt
Remi Collet 8dbe102
%if "%{python_version}" >= "2.7"
Remi Collet c23ecb8
%{_bindir}/mysqlauditadmin
Remi Collet c23ecb8
%{_bindir}/mysqlauditgrep
Remi Collet 8dbe102
%endif
9cae797
%{_bindir}/mysqldbcompare
9cae797
%{_bindir}/mysqldbcopy
9cae797
%{_bindir}/mysqldbexport
9cae797
%{_bindir}/mysqldbimport
9cae797
%{_bindir}/mysqldiff
9cae797
%{_bindir}/mysqldiskusage
9cae797
%{_bindir}/mysqlfailover
83b9fd5
%{_bindir}/mysqlfrm
9cae797
%{_bindir}/mysqlindexcheck
9cae797
%{_bindir}/mysqlmetagrep
9cae797
%{_bindir}/mysqlprocgrep
9cae797
%{_bindir}/mysqlreplicate
9cae797
%{_bindir}/mysqlrpladmin
9cae797
%{_bindir}/mysqlrplcheck
9cae797
%{_bindir}/mysqlrplshow
9cae797
%{_bindir}/mysqlserverclone
9cae797
%{_bindir}/mysqlserverinfo
83b9fd5
%{_bindir}/mysqluc
9cae797
%{_bindir}/mysqluserclone
9cae797
%{python_sitelib}/mysql/utilities
9cae797
%{python_sitelib}/mysql_utilities*
9cae797
%{_mandir}/man1/mysql*
9cae797
# empty file already provided by mysql-connector-python
9cae797
%exclude %{python_sitelib}/mysql/__init*
9cae797
9cae797
9cae797
%changelog
45903e4
* Mon Aug  5 2013 Remi Collet <remi@fedoraproject.org> - 1.3.4-1
45903e4
- update to 1.3.4 GA
45903e4
1f2c004
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
1f2c004
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
1f2c004
9b29c2f
* Wed Jul 10 2013 Remi Collet <remi@fedoraproject.org> - 1.3.3-1
9b29c2f
- update to 1.3.3 (beta)
9b29c2f
e796066
* Sat Jun 15 2013 Remi Collet <remi@fedoraproject.org> - 1.3.2-1
e796066
- update to 1.3.2 (beta)
e796066
83b9fd5
* Sat Apr  6 2013 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
83b9fd5
- update to 1.3.0 (alpha)
83b9fd5
  http://dev.mysql.com/doc/relnotes/mysql-utilities/en/wb-utils-news-1-3-0.html
83b9fd5
- move from launchpad to mysql.com
83b9fd5
- new command mysqlfrm
83b9fd5
- mysqluc is now usable
83b9fd5
- man pages provided in upstream tarball
83b9fd5
Remi Collet 8dbe102
* Fri Mar  8 2013 Remi Collet <remi@fedoraproject.org> - 1.2.1-2
Remi Collet 8dbe102
- generate minimal man pages using help2man
Remi Collet 8dbe102
  http://bugs.mysql.com/68610 - Missing man pages
Remi Collet 8dbe102
- drop mysqlauditadmin and mysqlauditgrep on EPEL-6
Remi Collet 8dbe102
  http://bugs.mysql.com/68614 - Issue with python 2.6
Remi Collet 8dbe102
Remi Collet 9b164c3
* Fri Mar  8 2013 Remi Collet <remi@fedoraproject.org> - 1.2.1-1
Remi Collet 9b164c3
- update to 1.2.1
Remi Collet 9b164c3
- no man pages, http://bugs.mysql.com/68610
Remi Collet 9b164c3
Remi Collet c23ecb8
* Fri Feb  8 2013 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
Remi Collet c23ecb8
- update to 1.2.0
Remi Collet c23ecb8
- new commands: mysqlauditadmin and mysqlauditgrep
Remi Collet c23ecb8
779c160
* Wed Jan  9 2013 Remi Collet <remi@fedoraproject.org> - 1.1.1-1
779c160
- update to 1.1.1
779c160
bc413c8
* Thu Oct  4 2012 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
bc413c8
- update to 1.1.0
bc413c8
- new command mysqluc removed (broken)
bc413c8
7f48929
* Fri Aug 10 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-1
7f48929
- update to 1.0.6
7f48929
f86e483
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
f86e483
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f86e483
dd376fe
* Sun May 27 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-3
dd376fe
- no man for EL-6 (missing recent python-sphinx)
dd376fe
9cae797
* Sun Apr 15 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-2
9cae797
- fix BR to python2-devel
9cae797
- incorrect-fsf-address and non-executable-script referenced as
9cae797
  Oracle BUG#13956819
9cae797
- remove mut man page (command not installed)
9cae797
Remi Collet c23ecb8
* Wed Apr 11 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-1
9cae797
- initial RPM
9cae797