forked from th3architect/MariaDB-Manager-Monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MariaDB-Manager-Monitor.spec
64 lines (53 loc) · 1.78 KB
/
MariaDB-Manager-Monitor.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%define _topdir %(echo $PWD)/
%define name MariaDB-Manager-Monitor
%define release ##RELEASE_TAG##
%define version ##VERSION_TAG##
%define buildroot %{_topdir}/%{name}-%{version}-%{release}-root
%define install_path /usr/local/skysql/monitor/
BuildRoot: %{buildroot}
BuildArch: noarch
Summary: MariaDB Manager Monitor
License: GPL
Name: %{name}
Version: %{version}
Release: %{release}
Source: %{name}-%{version}-%{release}.tar.gz
Prefix: /
Group: Development/Tools
Requires: libMariaDB-Manager-java >= 0.1-12
#BuildRequires: java-1.7.0-openjdk
%description
MariaDB Manager is a tool to manage and monitor a set of MariaDB
servers using the Galera multi-master replication form Codership.
This component is the monitor for the MariaDB Manager, it probes
the databases within control of the system gathering performance
and statistics data from the servers.
%prep
%setup -q
%build
%post
chkconfig --add mariadb-manager-monitor
# : > /etc/mariadbmanager/manager.ini
#if ! grep -q '\[monitor\]' /etc/mariadbmanager/manager.ini ; then
# cat %{install_path}manager_monitor.ini >> /etc/mariadbmanager/manager.ini
#fi
#%{install_path}generateAPIkey.sh 3
rm -f %{install_path}generateAPIkey.sh
rm -f %{install_path}manager_monitor.ini
%install
mkdir -p $RPM_BUILD_ROOT%{install_path}
cp ClusterMonitor.jar $RPM_BUILD_ROOT%{install_path}
cp generateAPIkey.sh $RPM_BUILD_ROOT%{install_path}
cp manager_monitor.ini $RPM_BUILD_ROOT%{install_path}
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
cp mariadb-manager-monitor $RPM_BUILD_ROOT/etc/init.d/
mkdir -p $RPM_BUILD_ROOT/etc/mariadbmanager/
%clean
%files
%defattr(-,root,root)
%{install_path}
%{install_path}ClusterMonitor.jar
%{install_path}generateAPIkey.sh
%{install_path}manager_monitor.ini
/etc/init.d/mariadb-manager-monitor
%changelog