diff options
author | Remi Collet <fedora@famillecollet.com> | 2012-04-12 19:40:37 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2012-04-12 19:40:37 +0200 |
commit | 86aaee62987ce317abf8819c29f333d003042f2b (patch) | |
tree | bb5c2d857738dc858036c6bcc811b647d971a883 |
mysql-utilities: new package (unbundled from MySQL Workbench)
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | mysql-utilities-man.patch | 11 | ||||
-rw-r--r-- | mysql-utilities.spec | 109 |
3 files changed, 124 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1e65467 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../common/Makefile + diff --git a/mysql-utilities-man.patch b/mysql-utilities-man.patch new file mode 100644 index 0000000..db80ddf --- /dev/null +++ b/mysql-utilities-man.patch @@ -0,0 +1,11 @@ +--- setup.py.orig 2011-05-28 08:32:01.667811328 +0200 ++++ setup.py 2011-05-28 08:32:30.464887518 +0200 +@@ -110,7 +110,7 @@ class install_man(distutils.core.Command + self.set_undefined_options('build_sphinx', + ('build_dir', 'build_dir'), + ) +- self.target_dir = os.path.join(self.install_base, 'man') ++ self.target_dir = os.path.join(self.install_base, 'share/man') + self.source_dir = os.path.join(self.build_dir, 'man') + + def run(self): diff --git a/mysql-utilities.spec b/mysql-utilities.spec new file mode 100644 index 0000000..d6b1f9d --- /dev/null +++ b/mysql-utilities.spec @@ -0,0 +1,109 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +# From README.txt +# Python 2.6 or later but Python 3.x is not supported (yet). +%global with_python3 0 + +%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6 +%global with_man 1 +%else +%global with_man 0 +%endif + +Name: mysql-utilities +Version: 1.0.5 +Release: 1%{?dist} +Summary: MySQL Utilities + +Group: Applications/Databases +License: GPLv2 +URL: https://launchpad.net/mysql-utilities +# wget http://bazaar.launchpad.net/~mysql/mysql-utilities/trunk/tarball/247 -O mysql-utilities-1.0.5.tgz +Source0: %{name}-%{version}.tgz + +# Fix man page destination path +Patch0: %{name}-man.patch + + +BuildArch: noarch +BuildRequires: python-devel >= 2.6 +%if %{with_man} +BuildRequires: python-sphinx >= 1.0 +%endif +%if %{with_python3} +BuildRequires: python3-devel +%endif + +Requires: mysql-connector-python + +%description +The MySQL Utilities is a set of easy-to-use scripts intended to make working +with servers easier. It is part of the MySQL Workbench. + +Documentation: +http://dev.mysql.com/doc/workbench/en/mysql-utilities.html + + +%prep +%setup -q -n ~mysql/%{name}/trunk + +%patch0 -p0 -b .manpath + + +%build +%if %{with_man} +%{__python} setup.py build_man +%else +: No man will be generated +%endif + + +%install +install --directory %{buildroot}%{_mandir}/man1 + +%if %{with_python3} +# Python 3 build +%{__python3} setup.py install --skip-profile --root %{buildroot} +rm -rf build +%endif + +# Python 2 build (end with this for tests) +%{__python} setup.py install --skip-profile --root %{buildroot} + + +%check +%{__python} check.py + + +%files +%doc CHANGES.txt LICENSE.txt +%{_bindir}/mysqldbcompare +%{_bindir}/mysqldbcopy +%{_bindir}/mysqldbexport +%{_bindir}/mysqldbimport +%{_bindir}/mysqldiff +%{_bindir}/mysqldiskusage +%{_bindir}/mysqlfailover +%{_bindir}/mysqlindexcheck +%{_bindir}/mysqlmetagrep +%{_bindir}/mysqlprocgrep +%{_bindir}/mysqlreplicate +%{_bindir}/mysqlrpladmin +%{_bindir}/mysqlrplcheck +%{_bindir}/mysqlrplshow +%{_bindir}/mysqlserverclone +%{_bindir}/mysqlserverinfo +%{_bindir}/mysqluserclone +%{python_sitelib}/mysql/utilities +%{python_sitelib}/mysql_utilities* +%if %{with_man} +%{_mandir}/man1/m* +%endif +# empty file already provided by mysql-connector-python +%exclude %{python_sitelib}/mysql/__init* + + +%changelog +* Thu Apr 11 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-1 +- initial RPM + |