2022-05-23 23:46:48 +00:00
|
|
|
Name: brp-llvm-compile-lto-elf-test-lib
|
|
|
|
Version: 1
|
|
|
|
Release: 1
|
|
|
|
Summary: Library package for testing brp-llvm-compile-lto-elf
|
|
|
|
License: MIT
|
|
|
|
|
|
|
|
BuildRequires: clang binutils
|
|
|
|
Source0: %{name}.c
|
|
|
|
Source1: %{name}.h
|
|
|
|
|
|
|
|
# FIXME: I'm not sure why this doesn't work
|
|
|
|
%undefine _package_note_file
|
|
|
|
|
|
|
|
%global toolchain clang
|
|
|
|
|
|
|
|
%description
|
|
|
|
%{summary}
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
2023-09-29 07:33:12 +00:00
|
|
|
clang ${CFLAGS} -c %{SOURCE0} -o %{name}.o
|
|
|
|
ar cr %{name}.a %{name}.o
|
2022-05-23 23:46:48 +00:00
|
|
|
ranlib %{name}.a
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
|
|
mkdir -p %{buildroot}%{_includedir}
|
|
|
|
|
2023-09-29 07:33:12 +00:00
|
|
|
%{__install} -p -m 644 -t %{buildroot}%{_libdir} %{name}.o
|
2022-05-23 23:46:48 +00:00
|
|
|
%{__install} -p -m 644 -t %{buildroot}%{_libdir} %{name}.a
|
|
|
|
%{__install} -p -m 644 -t %{buildroot}%{_includedir} %{SOURCE1}
|
|
|
|
|
|
|
|
%files
|
2023-09-29 07:33:12 +00:00
|
|
|
%{_libdir}/%{name}.o
|
2022-05-23 23:46:48 +00:00
|
|
|
%{_libdir}/%{name}.a
|
|
|
|
%{_includedir}/%{name}.h
|