diff --git a/config/rpm/maatkit-redhat.spec b/config/rpm/maatkit-redhat.spec deleted file mode 100644 index f75ab906..00000000 --- a/config/rpm/maatkit-redhat.spec +++ /dev/null @@ -1,44 +0,0 @@ -Summary: Maatkit is a collection of essential command-line utilities for MySQL -Name: maatkit -Version: @DISTRIB@ -Release: 1%{?dist} -Source: %{name}-%{version}.tar.gz -License: GPL -Group: Development/Tools -URL: http://code.google.com/p/maatkit/ -BuildRoot: %{_tmppath}/%{name}-root -Requires: perl(DBD::mysql) -BuildArch: noarch - -%description -Maatkit is a collection of essential command-line utilities for MySQL. Each is completely stand-alone, without dependencies other than core Perl and the DBI drivers needed to connect to MySQL, and doesn't need to be "installed" - you can just execute the scripts. This makes the tools easy to use on systems where you can't install anything extra, such as customer sites or ISPs. - -%prep -%setup -q - -%build - -%install -rm -rf $RPM_BUILD_ROOT -%{__perl} Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} -make install -find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' -find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';' - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%doc Changelog COPYING MANIFEST README -%{_bindir}/* -%{_mandir}/man1/* -%{_mandir}/man3/* -%{perl_sitelib}/* - -%changelog -* Thu Sep 18 2008 Robin Bowes - 2 -- Added BuildArch: noarch - -* Wed Aug 13 2008 Baron Schwartz - 1 -- Contributed by Spil Games diff --git a/config/rpm/maatkit.spec b/config/rpm/maatkit.spec deleted file mode 100644 index 6b510b54..00000000 --- a/config/rpm/maatkit.spec +++ /dev/null @@ -1,60 +0,0 @@ -Name: maatkit -Version: @DISTRIB@ -Release: 1%{?dist} -Summary: Essential command-line utilities for MySQL - -Group: Applications/Databases -License: GPL -URL: http://code.google.com/p/maatkit/ -Source0: http://maatkit.googlecode.com/files/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildArch: noarch -Requires: perl(DBI) >= 1.13, perl(DBD::mysql) >= 1.0, perl(Term::ReadKey) >= 2.10 -# perl-DBI is required by perl-DBD-MySQL anyway - -%description -This toolkit contains essential command-line utilities for MySQL, such as a -table checksum tool and query profiler. It provides missing features such as -checking slaves for data consistency, with emphasis on quality and -scriptability. - - -%prep -%setup -q - - -%build -%{__perl} Makefile.PL INSTALLDIRS=vendor < /dev/null -make %{?_smp_mflags} - - -%install -rm -rf $RPM_BUILD_ROOT -make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' -find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' -find $RPM_BUILD_ROOT -type f -name maatkit.pod -exec rm -f {} ';' -chmod -R u+w $RPM_BUILD_ROOT/* - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc COPYING INSTALL Changelog* -%{_bindir}/* -%{_mandir}/man1/*.1* - - -%changelog -* Fri Aug 14 2009 Robin Bowes - 3 -Use perl Requires, rather than rpm packages - -* Fri Sep 19 2008 Jeremy Cole - 2 -- lowercased the MySQL in requires perl-DBD-mysql - -* Tue Jun 12 2007 Sven Edge - 547-1 -- initial packaging attempt diff --git a/config/rpm/percona-toolkit.spec b/config/rpm/percona-toolkit.spec new file mode 100644 index 00000000..151575b1 --- /dev/null +++ b/config/rpm/percona-toolkit.spec @@ -0,0 +1,54 @@ +Name: percona-toolkit +Summary: Advanced MySQL and system command-line tools used by Percona +Version: %{version} +Release: %{release} +Group: Applications/Databases +License: GPL +Vendor: Percona Inc. +URL: http://www.percona.com/software/percona-toolkit/ +Source: percona-toolkit-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildArch: noarch +Requires: perl(DBI) >= 1.13, perl(DBD::mysql) >= 1.0, perl(Term::ReadKey) >= 2.10 + +%description +Percona Toolkit is a collection of advanced command-line tools used by +Percona (http://www.percona.com/) support staff to perform a variety of +MySQL and system tasks that are too difficult or complex to perform manually. + +These tools are ideal alternatives to private or "one-off" scripts because +they are professionally developed, formally tested, and fully documented. +They are also fully self-contained, so installation is quick and easy and +no libraries are installed. + +Percona Toolkit is developed and supported by Percona Inc. For more +information and other free, open-source software developed by Percona, +visit http://www.percona.com/software/. + +%prep +%setup -q + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor < /dev/null +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' +find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' +find $RPM_BUILD_ROOT -type f -name 'percona-toolkit.pod' -exec rm -f {} ';' +chmod -R u+w $RPM_BUILD_ROOT/* + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc COPYING INSTALL README Changelog +%{_bindir}/* +%{_mandir}/man1/*.1* + +%changelog +* Mon Jul 18 2011 Daniel Nichter +- Initial implementation diff --git a/util/build-packages b/util/build-packages index 3cbcdc6b..2ed8b687 100755 --- a/util/build-packages +++ b/util/build-packages @@ -137,13 +137,11 @@ update_manifest() { echo -n "Updating MANIFEST... " cd $BRANCH echo -n > MANIFEST - for file in *; do + for file in * bin/* docs/*.pod; do if [ -f $file ]; then echo $file >> MANIFEST fi done - find bin -type f -depth 1 >> MANIFEST - find docs -type f -depth 1 >> MANIFEST echo "OK" } @@ -216,11 +214,25 @@ build_rpm() { if [ ! -f "$PKG.tar.gz" ]; then die "Cannot build RPM because $PKG.tar.gz does not exist" fi + mkdir -p rpm rpm/BUILD rpm/SOURCES rpm/RPMS rpm/SRPMS cd rpm local topdir=`pwd` - # Build RPM package from the tarball - rpmbuild --define "_topdir $topdir" -ta ../$PKG.tar.gz + + # Build RPM package from the tarball. + rpmbuild -bb --clean $BRANCH/config/rpm/percona-toolkit.spec \ + --quiet \ + --define "_topdir $PWD" \ + --define "_sourcedir $RELEASE" \ + --define "version $VERSION" \ + --define "release 1" + + if [ ! -f "RPMS/noarch/$PKG-1.noarch.rpm" ]; then + die "RPMS/noarch/$PKG-1.noarch.rpm did not build" + fi + mv "RPMS/noarch/$PKG-1.noarch.rpm" $RELEASE + rm -rf $RELEASE/rpm + echo "OK" } @@ -262,7 +274,9 @@ fi # Now that those ^ items are updated, you need to commit and push one more # time before the release packages are built. This script can't do that # because your branch could non-standard. -cat <