Blame SPECS/libtracefs.spec

295c37
# git tag
295c37
#%%global commit 4f24f98960c223e56329519bb90a90f0b2ad813f
295c37
#%%global commitdate 20201120
295c37
#%%global shortcommit %%(c=%%{commit}; echo ${c:0:7})
295c37
295c37
# LTO causes linking issues randomly like
295c37
# lto1: internal compiler error: resolution sub id 0x7136344381f3059f not in object file
295c37
# So disabling LTO at this moment.
295c37
295c37
%global _lto_cflags %nil
295c37
295c37
Name: libtracefs
295c37
Version: 1.3.1
295c37
Release: 2%{?dist}
295c37
License: LGPLv2+ and GPLv2+
295c37
Summary: Library for access kernel tracefs
295c37
295c37
URL: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
295c37
# If upstream does not provide tarballs, to generate:
295c37
# git clone git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
295c37
# cd libtracefs
295c37
# git archive --prefix=libtracefs-%%{version}/ -o libtracefs-%%{version}.tar.gz %%{git_commit}
295c37
#Source0: libtracefs-%%{version}.tar.gz
295c37
#Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-%%{commit}.tar.gz
295c37
Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-%{version}.tar.gz
295c37
Patch0:  libtracefs-1.0.2-harden-linking.patch
295c37
BuildRequires:  gcc
295c37
BuildRequires:  make
295c37
BuildRequires:  pkgconfig(libtraceevent)
295c37
295c37
%description
295c37
libtracefs is a library for accessing kernel tracefs
295c37
295c37
%package devel
295c37
Summary: Development headers of %{name}
295c37
Requires: %{name}%{_isa} = %{version}-%{release}
295c37
295c37
%description devel
295c37
Development headers of %{name}
295c37
295c37
%prep
295c37
%setup -q
295c37
%patch0 -p1
295c37
295c37
%build
295c37
%set_build_flags
295c37
export GCCLDFLAGS="-Wl,-z,now"
295c37
%make_build prefix=%{_prefix} libdir=%{_libdir} all 
295c37
295c37
%install
295c37
%set_build_flags
295c37
export GCCLDFLAGS="-Wl,-z,now"
295c37
%make_install prefix=%{_prefix} libdir=%{_libdir}
295c37
rm -rf %{buildroot}/%{_libdir}/libtracefs.a
295c37
295c37
%files
295c37
%license LICENSES/LGPL-2.1
295c37
%license LICENSES/GPL-2.0
295c37
%{_libdir}/%{name}.so.1
295c37
%{_libdir}/%{name}.so.1.3.1
295c37
295c37
%files devel
295c37
%{_includedir}/tracefs/tracefs.h
295c37
%{_libdir}/pkgconfig/%{name}.pc
295c37
%{_libdir}/%{name}.so
295c37
295c37
%changelog
295c37
* Thu Feb 2 2023 Michael Petlan <mpetlan@redhat.com> - 1.3.1-2
295c37
- Remove conflict with trace-cmd
295c37
  Related: rhbz#2159965
295c37
295c37
* Mon Nov 23 2020 Zamir SUN <sztsian@gmail.com> - 1.3.1-1
295c37
- Initial libtracefs
295c37
  Related: rhbz#2075198