67 lines
2.1 KiB
RPMSpec
67 lines
2.1 KiB
RPMSpec
# vim: syntax=spec
|
|
%global gitcommit ee02de283fec5499639751deb6c0d7848fba986c
|
|
%global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7})
|
|
%global snapshotdate 20200310
|
|
|
|
# keep dracutlibdir consistent with the definition in dracut.spec
|
|
%global dracutlibdir %{_prefix}/lib/dracut
|
|
%global dracutmoduledir %{dracutlibdir}/modules.d/99memstrack
|
|
|
|
Name: memstrack
|
|
Version: 0
|
|
Release: 1.%{snapshotdate}git%{gitshortcommit}%{?dist}
|
|
Summary: A memory allocation tracer, like a hot spot analyzer for memory allocation
|
|
License: GPLv3
|
|
URL: https://github.com/ryncsn/memstrack
|
|
VCS: git+git@github.com:ryncsn/memstrack.git
|
|
BuildRequires: gcc
|
|
BuildRequires: ncurses-devel
|
|
|
|
Source: https://github.com/ryncsn/memstrack/archive/%{gitcommit}/memstrack-%{gitshortcommit}.tar.gz
|
|
|
|
%description
|
|
A memory allocation tracer, like a hot spot analyzer for memory allocation
|
|
|
|
%package dracut
|
|
Summary: Debug hook for analyzing memory with memstract in dracut
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: dracut
|
|
BuildArch: noarch
|
|
|
|
%description dracut
|
|
Debug hook for analyzing memory with memstract in dracut, help analyze
|
|
booting stage memory usage.
|
|
|
|
%prep
|
|
%setup -q -n memstrack-%{gitcommit}
|
|
|
|
%build
|
|
%{set_build_flags}
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
mkdir -p %{buildroot}/%{_bindir}
|
|
install -p -m 755 memstrack %{buildroot}/%{_bindir}
|
|
|
|
mkdir -p %{buildroot}/%{dracutmoduledir}
|
|
install -p -m 644 misc/99memstrack/memstrack.service %{buildroot}/%{dracutmoduledir}/memstrack.service
|
|
install -p -m 755 misc/99memstrack/module-setup.sh %{buildroot}/%{dracutmoduledir}/module-setup.sh
|
|
install -p -m 755 misc/99memstrack/start-tracing.sh %{buildroot}/%{dracutmoduledir}/start-tracing.sh
|
|
install -p -m 755 misc/99memstrack/stop-tracing.sh %{buildroot}/%{dracutmoduledir}/stop-tracing.sh
|
|
|
|
%files
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{_bindir}/memstrack
|
|
|
|
%files dracut
|
|
%dir %{dracutmoduledir}
|
|
%{dracutmoduledir}/memstrack.service
|
|
%{dracutmoduledir}/module-setup.sh
|
|
%{dracutmoduledir}/start-tracing.sh
|
|
%{dracutmoduledir}/stop-tracing.sh
|
|
|
|
%changelog
|
|
* Sun Mar 15 2020 Kairui Song <ryncsn@gmail.com> - 0-1.20200310gitee02de2
|
|
- First release
|