Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:aevseev:desktop
spirv-tools
spirv-tools.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File spirv-tools.spec of Package spirv-tools
%define realname SPIRV-Tools %define realver 2023.6.rc1 %define srcext tar.gz %bcond_without ninja %define so_ver 13 # turn off the generation of debuginfo rpm (RH9) ?? %global debug_package %{nil} %if 0%{?rhel} >= 8 %define python3_pkg platform-python %define python3 %{_libexecdir}/platform-python %else %define python3_pkg python3 %define python3 %{_bindir}/python3 %endif # Common info Name: spirv-tools Version: %{realver} Release: wiz%{?extraver:0.}1%{?dist} License: Apache-2.0 Group: Development/Tools/Other URL: https://github.com/KhronosGroup/SPIRV-Tools Summary: API and commands for processing SPIR-V modules # Install-time parameters Requires: lib%{realname} = %{version}-%{release} Provides: %{realname} = %{version}-%{release} Obsoletes: %{realname} < %{version}-%{release} # Build-time parameters BuildRequires: cmake >= 2.8.12 BuildRequires: pkg-config BuildRequires: gcc-c++ BuildRequires: %{python3_pkg} BuildRequires: spirv-headers %if %{with ninja} BuildRequires: ninja %endif BuildRoot: %{_tmppath}/%{name}-root Source0: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v%{realver}%{?extraver}.%{srcext}#/%{realname}-%{realver}%{?extraver}.%{srcext} %description The SPIR-V Tools package provides an API and commands for processing SPIR-V modules. The package includes an assembler, binary module parser, disassembler, validator, and optimizer for SPIR-V. Except for the optimizer, all are based on a common static library. The library contains all of the implementation details, and is used in the standalone tools whilst also enabling integration into other code bases directly. The optimizer implementation resides in its own library, which depends on the core library. %package -n lib%{realname} Group: System/Libraries Summary: Shared libraries for %{realname} %description -n lib%{realname} The SPIR-V Tools package provides an API and commands for processing SPIR-V modules. This package provides shared libraries for %{realname}. %package devel Group: Development/Languages/C and C++ Summary: Development stuff for %{realname} Requires: lib%{realname} = %{version}-%{release} %description devel The SPIR-V Tools package provides an API and commands for processing SPIR-V modules. This package provides headers and libraries to build software using %{realname}. # Preparation step (unpackung and patching if necessary) %prep %setup -q -n %{realname}-%{realver}%{?extraver} # Build step (compile/build binaries, documentation, etc) %build _CFLAGS='%{optflags} %{?gcc_lto}' _LDFLAGS='-Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro %{?gcc_lto}' _CMAKE_ARGS=( -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="$_CFLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$_CFLAGS" -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$_LDFLAGS" -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="$_LDFLAGS" -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$_LDFLAGS" -DCMAKE_VERBOSE_MAKEFILE=YES ) mkdir tmp_build cd tmp_build cmake .. \ %if %{with ninja} -G Ninja \ %endif "${_CMAKE_ARGS[@]}" \ \ -DSPIRV_TOOLS_BUILD_STATIC=NO \ -DSPIRV_TOOLS_LIBRARY_TYPE=SHARED \ -DSPIRV_SKIP_TESTS=YES \ -DSPIRV-Headers_SOURCE_DIR=%{_prefix} \ \ -DPYTHON_EXECUTABLE=%{python3} %if %{with ninja} ninja -v %{?_smp_mflags} %else %{__make} %{?_smp_mflags} %endif # Install built stuff %install %if %{with ninja} DESTDIR=%{buildroot} ninja -v -C tmp_build install %else %{__make} -C tmp_build install DESTDIR=%{buildroot} %endif # Fix shebang %{__sed} -ri '1 s|^#!/usr/bin/env.+$|#!/bin/sh|' %{buildroot}%{_bindir}/spirv-lesspipe.sh # Files list %files %defattr(-,root,root) %license LICENSE %doc CHANGES README.md %{_bindir}/spirv-* %files -n lib%{realname} %defattr(-,root,root) %{_libdir}/lib%{realname}*.so %files devel %defattr(-,root,root) %license LICENSE %doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md %{_includedir}/%{name}/ %{_libdir}/pkgconfig/%{realname}-shared.pc %{_libdir}/pkgconfig/%{realname}.pc %dir %{_libdir}/cmake/%{realname}-diff %dir %{_libdir}/cmake/%{realname}-link %dir %{_libdir}/cmake/%{realname}-lint %dir %{_libdir}/cmake/%{realname}-opt %dir %{_libdir}/cmake/%{realname}-reduce %dir %{_libdir}/cmake/%{realname}-tools %dir %{_libdir}/cmake/%{realname} %dir %{_libdir}/cmake %{_libdir}/cmake/%{realname}-diff/*.cmake %{_libdir}/cmake/%{realname}-link/*.cmake %{_libdir}/cmake/%{realname}-lint/*.cmake %{_libdir}/cmake/%{realname}-opt/*.cmake %{_libdir}/cmake/%{realname}-reduce/*.cmake %{_libdir}/cmake/%{realname}-tools/*.cmake %{_libdir}/cmake/%{realname}/*.cmake %post -n lib%{realname} -p /sbin/ldconfig %postun -n lib%{realname} -p /sbin/ldconfig %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor