simple rpm build system

This commit is contained in:
root 2015-06-18 23:13:51 +02:00
parent 5739dfd230
commit 03baf72c08
5 changed files with 56 additions and 0 deletions

10
build/build.sh Normal file
View file

@ -0,0 +1,10 @@
#!/bin/sh
VERSION=1.4.5
mkdir -p mysqltuner-$VERSION
cp ../mysqltuner.pl mysqltuner.spec ../LICENSE mysqltuner-$VERSION
tar czf mysqltuner-${VERSION}.tgz mysqltuner-$VERSION
rpmbuild -ta mysqltuner-${VERSION}.tgz 2>/dev/null| grep --color=never '\.rpm' | cut -d: -f2 > ./lrpm.txt
mv $(cat ./lrpm.txt) .
rm -rf mysqltuner-$VERSION ./lrpm.txt

Binary file not shown.

Binary file not shown.

BIN
build/mysqltuner-1.4.5.tgz Normal file

Binary file not shown.

46
build/mysqltuner.spec Normal file
View file

@ -0,0 +1,46 @@
Summary: High Performance MySQL Tuning Script
Name: mysqltuner
Version: 1.4.5
Release: 1
License: GPL v3+
Group: Applications
Source0: https://github.com/build/MySQLTuner-perl/build/%{name}-%{version}.tgz
URL: https://github.com/major/MySQLTuner-perl
Requires: mysql-client
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
MySQLTuner is a high-performance MySQL tuning script written in Perl
that will provide you with a snapshot of a MySQL server's health.
Based on the statistics gathered, specific recommendations will be
provided that will increase a MySQL server's efficiency and
performance. The script gives you automated MySQL tuning that is on
the level of what you would receive from a MySQL DBA.
This script has been derived from many of the ideas in Matthew
Montgomery's MySQL tuning primer script.
%prep
%setup -q
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_sbindir}
install -p %{name}.pl $RPM_BUILD_ROOT%{_sbindir}/%{name}
install -d $RPM_BUILD_ROOT%{_datarootdir}/%{name}
install -p LICENSE $RPM_BUILD_ROOT%{_sbindir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc LICENSE
%attr(755,root,root) %{_sbindir}/%{name}
%changelog
* Thu Jun 18 2015 Jean-Marie RENOUARD <jmrenouard@gmail.com> 1.4.5-1
- Initial RPM release