redhat-rpm-config/tests/brp-llvm-compile-lto-elf/brp-llvm-compile-lto-elf-test-lib/brp-llvm-compile-lto-elf-test-lib.spec
Tom Stellard f77dcdec18 Fix passing of CFLAGS to brp-llvm-compile-lto-elf
This was accidentally broken by d9c7e4eef8.
2022-06-14 07:21:24 -07:00

35 lines
673 B
RPMSpec

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
clang ${CFLAGS} -c %{SOURCE0} -o lib.o
ar cr %{name}.a lib.o
ranlib %{name}.a
%install
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}
%{__install} -p -m 644 -t %{buildroot}%{_libdir} %{name}.a
%{__install} -p -m 644 -t %{buildroot}%{_includedir} %{SOURCE1}
%files
%{_libdir}/%{name}.a
%{_includedir}/%{name}.h