-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmemstrack.spec
63 lines (51 loc) · 1.86 KB
/
memstrack.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
# vim: syntax=spec
Name: {{{ git_dir_name }}}
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: A memory allocation tracer, like a hot spot analyzer for memory allocation
License: GPLv3
URL: https://github.com/ryncsn/memstrack
VCS: {{{ git_dir_vcs }}}
BuildRequires: gcc
BuildRequires: ncurses-devel
Source: {{{ git_dir_pack }}}
%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
{{{ git_dir_setup_macro }}}
%build
%{set_build_flags}
%make_build
%install
# memstrack binary
mkdir -p %{buildroot}/%{_bindir}
install -p -m 755 memstrack %{buildroot}/%{_bindir}
# dracut module part
# keep dracutlibdir consistent with the definition in dracut.spec
%define dracutlibdir %{_prefix}/lib/dracut
%define dracutmoduledir %{dracutlibdir}/modules.d/99memstrack
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/memstrack-start.sh %{buildroot}/%{dracutmoduledir}/memstrack-start.sh
install -p -m 755 misc/99memstrack/memstrack-report.sh %{buildroot}/%{dracutmoduledir}/memstrack-report.sh
%files
%doc README.md
%license LICENSE
%{_bindir}/memstrack
%files dracut
%dir %{dracutmoduledir}
%{dracutmoduledir}/memstrack.service
%{dracutmoduledir}/module-setup.sh
%{dracutmoduledir}/memstrack-start.sh
%{dracutmoduledir}/memstrack-report.sh
%changelog
{{{ git_dir_changelog }}}