obagent.spec 1.5 KB
Newer Older
W
wangzelin.wzl 已提交
1 2 3
Name: obagent
Summary: ob agent program
Group: alipay/oceanbase
4
Version: 1.1.0
W
wangzelin.wzl 已提交
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
Release: %(echo $RELEASE)%{?dist}
URL: http://rpm.corp.taobao.com/find.php?q=obagent
License: Commercial
BuildArch: x86_64 aarch64
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
obagent program

%define _prefix /home/admin

%prep
rm -rf %{_sourcedir}/%{name}
mkdir -p %_sourcedir/%{name}
cp -r $OLDPWD/* %_sourcedir/%{name}

%build

cd %_sourcedir/%{name}
make build

%install
cd %_sourcedir/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/bin
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/conf
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/log
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/run
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/tmp
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/backup
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/pkg_store
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/obagent/task_store

cp bin/*                $RPM_BUILD_ROOT/%{_prefix}/obagent/bin
cp -r etc/*             $RPM_BUILD_ROOT/%{_prefix}/obagent/conf

%files
%defattr(755,admin,admin)
%dir %{_prefix}/obagent/
%dir %{_prefix}/obagent/bin
%dir %{_prefix}/obagent/conf
%dir %{_prefix}/obagent/run
%{_prefix}/obagent/bin/monagent
%{_prefix}/obagent/conf/*.yaml
%{_prefix}/obagent/conf/config_properties/*.yaml
%{_prefix}/obagent/conf/module_config/*.yaml
%{_prefix}/obagent/conf/prometheus_config/*.yaml
%{_prefix}/obagent/conf/prometheus_config/rules/*.yaml