spirv-tools/spirv-tools.spec
2018-02-14 11:36:18 +00:00

110 lines
3.1 KiB
RPMSpec

%global commit 9e19fc0f31ceaf1f6bc907dbf17dcfded85f2ce8
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20180205
%global gitrel .%{commit_date}.git%{shortcommit}
Name: spirv-tools
Version: 2018.1
Release: 0.2%{?gitrel}%{?dist}
Summary: API and commands for processing SPIR-V modules
License: ASL 2.0
URL: https://github.com/KhronosGroup/SPIRV-Tools
Source0: %url/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz
# Based on https://github.com/KhronosGroup/SPIRV-Tools/commit/4e4a254bc85ea41af93a048f1713ef27e04c01ab
Patch0: fix_pkconfig_pc_file.patch
BuildRequires: cmake3
BuildRequires: gcc-c++
BuildRequires: ninja-build
BuildRequires: python2-devel
BuildRequires: python2-simplejson
BuildRequires: spirv-headers-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description
The package includes an assembler, binary module parser,
disassembler, and validator for SPIR-V..
%package libs
Summary: Library files for %{name}
Provides: %{name}-libs%{?_isa} = 2018.1.0
%description libs
library files for %{name}
%package devel
Summary: Development files for %{name}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
Development files for %{name}
%prep
%autosetup -p1 -n SPIRV-Tools-%{commit}
%build
%__mkdir_p %_target_platform
pushd %_target_platform
%cmake3 -DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE:FILEPATH=%{_bindir}/python%{python2_version} \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
-DSPIRV_WERROR=OFF \
-DSPIRV-Headers_SOURCE_DIR=%{_prefix} \
-GNinja ..
%ninja_build
popd
%install
%ninja_install -C %_target_platform
%ldconfig_scriptlets libs
%files
%license LICENSE
%doc README.md CHANGES
%{_bindir}/spirv-as
%{_bindir}/spirv-cfg
%{_bindir}/spirv-dis
%{_bindir}/spirv-lesspipe.sh
%{_bindir}/spirv-link
%{_bindir}/spirv-opt
%{_bindir}/spirv-stats
%{_bindir}/spirv-val
%files libs
%{_libdir}/libSPIRV-Tools-link.so
%{_libdir}/libSPIRV-Tools-opt.so
%{_libdir}/libSPIRV-Tools.so
%files devel
%{_includedir}/spirv-tools/
%{_libdir}/pkgconfig/SPIRV-Tools.pc
%changelog
* Wed Feb 14 2018 Leigh Scott <leigh123linux@googlemail.com> - 2018.1-0.2.20180205.git9e19fc0
- Add isa to the provides
* Fri Feb 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 2018.1-0.1.20180205.git9e19fc0
- Fix version
- Fix pkgconfig file
- Add version provides to -libs package
* Fri Feb 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 2016.7-0.5.20180205.git9e19fc0
- Update for vulkan 1.0.68.0
- Try building as shared object
- Split libs into -libs subpackage
* Fri Feb 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 2016.7-0.4.20171023.git5834719
- Use ninja to build
* Mon Jan 22 2018 Leigh Scott <leigh123linux@googlemail.com> - 2016.7-0.3.20171023.git5834719
- Add python prefix to fix the stupid Bodhi tests
* Wed Jan 03 2018 Leigh Scott <leigh123linux@googlemail.com> - 2016.7-0.2.20171023.git5834719
- Split binaries into main package
* Thu Jul 13 2017 Leigh Scott <leigh123linux@googlemail.com> - 2016.7-0.1.20171023.git5834719
- First build