diff --git a/README.md b/README.md index 82eda17..bab0cdc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # spirv-llvm-translator +A tool and a library for bi-directional translation between SPIR-V and LLVM IR. + diff --git a/spirv-llvm-translator.spec b/spirv-llvm-translator.spec new file mode 100644 index 0000000..2ad3e30 --- /dev/null +++ b/spirv-llvm-translator.spec @@ -0,0 +1,82 @@ +Name: spirv-llvm-translator +Version: 15.0.0 +Release: 1mamba +Summary: A tool and a library for bi-directional translation between SPIR-V and LLVM IR +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator +Source: https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git/v%{version}/SPIRV-LLVM-Translator-%{version}.tar.bz2 +License: NCSA +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libllvm-devel +BuildRequires: libspirv-tools-devel +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRequires: cmake +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description +A tool and a library for bi-directional translation between SPIR-V and LLVM IR. + +%package -n lib%{name} +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n lib%{name} +This package contains shared libraries for %{name}. + +%package -n lib%{name}-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: spirv-headers +Requires: pkg-config + +%description -n lib%{name}-devel +This package contains libraries and header files for developing applications that use %{name}. + + +%debug_package + +%prep +%setup -q -n SPIRV-LLVM-Translator-%{version} + +%build +%cmake -d build \ + -DLLVM_EXTERNAL_LIT=/usr/bin/lit \ + -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=%{_includedir}/spirv/ + +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall -C build + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libLLVMSPIRVLib.so.* +%doc LICENSE.TXT + +%files -n lib%{name}-devel +%defattr(-,root,root) +%{_bindir}/llvm-spirv +%dir %{_includedir}/LLVMSPIRVLib +%{_includedir}/LLVMSPIRVLib/* +%{_libdir}/libLLVMSPIRVLib.so +%{_libdir}/pkgconfig/LLVMSPIRVLib.pc +%doc README.md + + +%changelog +* Tue Dec 27 2022 Silvan Calarco 15.0.0-1mamba +- package created using the webbuild interface