fix to show SHA commit in help text
- also ensure `make install` uses the right build flags - include all bundled projects' licenses Signed-off-by: Michel Lind <salimma@centosproject.org>
This commit is contained in:
parent
6bcd641b94
commit
8a748e32c2
1 changed files with 19 additions and 6 deletions
25
wprof.spec
25
wprof.spec
|
|
@ -2,6 +2,11 @@
|
|||
Version: 0.5
|
||||
%forgemeta
|
||||
|
||||
# we need to declare this to show it in the version string
|
||||
# since we 'backport' the first two commits after 0.5, just
|
||||
# use the commit hash of the latest commit we use
|
||||
%global wprof_commit 23cbea909d4365c804b1a8d3744d8afc2f314280
|
||||
|
||||
# upstream build system requires the use of these sources
|
||||
%global blazesym_url https://github.com/libbpf/blazesym
|
||||
%global blazesym_commit ae290f612af8f0243b2a3f53ec7c0cf304e0bbad
|
||||
|
|
@ -195,7 +200,7 @@ popd
|
|||
# build flags not set by default
|
||||
%set_build_flags
|
||||
%endif
|
||||
%make_build -C src
|
||||
%make_build -C src GIT_SHA=%{wprof_commit}
|
||||
|
||||
for proj in blazesym src/demangle src/wpb; do
|
||||
pushd ${proj}
|
||||
|
|
@ -206,18 +211,26 @@ for proj in blazesym src/demangle src/wpb; do
|
|||
done
|
||||
|
||||
for proj in blazesym bpftool libbpf strobelight-libs usdt; do
|
||||
mv ${proj}/LICENSE LICENSE.proj
|
||||
mv ${proj}/LICENSE ./LICENSE.${proj}
|
||||
# collect license texts, first one wins
|
||||
if ls ${proj}/LICENSE.* >/dev/null 2>&1; then
|
||||
mv -n ${proj}/LICENSE.* .
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
%install
|
||||
%make_install -C src prefix=%{_prefix}
|
||||
%if 0%{?rhel} && 0%{?rhel} < 10
|
||||
# build flags not set by default
|
||||
%set_build_flags
|
||||
%endif
|
||||
%make_install -C src prefix=%{_prefix} GIT_SHA=%{wprof_commit}
|
||||
|
||||
|
||||
%files
|
||||
# strobelight-libs has the same licenses as libbpf
|
||||
%license LICENSE* bpftool/LICENSE.* libbpf/LICENSE.*
|
||||
%license blazesym/LICENSE.blazesym.dependencies src/demangle/LICENSE.demangle.dependencies src/wpb/LICENSE.wpb.dependencies
|
||||
%license LICENSE*
|
||||
# blazesym vendored deps already got collected earlier
|
||||
%license src/demangle/LICENSE.demangle.dependencies src/wpb/LICENSE.wpb.dependencies
|
||||
%doc README.md UTRACE.md
|
||||
%{_bindir}/wprof
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue