This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
linxin-coredump-tools/script/coredump.spec

38 lines
1011 B
RPMSpec
Raw Normal View History

2023-04-27 20:06:04 +08:00
Name: coredump-tools
Version: {_version}
Release: {_release}
Summary: tsg's coredump handler and tools
Group: Applications/Internet
License: GPL
URL: https://git.mesalab.cn/linxin/coredump-handler
Source0: coredump-tools-{_version}.tar.gz
%define debug_package %{nil}
%description
This package contains the binary executable for coredump-handler and coredump-tool, as well as its configuration files.
%prep
%setup -q
%build
cd ./coredump-handler
go build -o coredump-handler .
cd ..
cd ./coredump-ctl
go build -o coredump-tool .
cd ..
%install
mkdir -p %{buildroot}/etc/coredump-handler
mkdir -p %{buildroot}/opt/tsg/coredump
cp ./coredump-handler/coredump-handler %{buildroot}/opt/tsg/coredump
cp ./config/config.json %{buildroot}/etc/coredump-handler
cp ./coredump-ctl/coredump-tool %{buildroot}/opt/tsg/coredump
%post
echo "export PATH=/opt/tsg/coredump:$PATH" >>~/.bashrc
%files
%defattr (-,root,root)
/etc/coredump-handler/config.json
/opt/tsg/coredump/coredump-handler
/opt/tsg/coredump/coredump-tool