Blame SPECS/vulkan.spec

9523ad
e73726
%global srcname Vulkan-Loader
9523ad
e73726
%global commit1 05d12a9461dd0a76053bdd42f062a37a10d56afb
9523ad
%global srcname1 glslang
9523ad
e73726
%global commit2 8bea0a266ac9b718aa0818d9e3a47c0b77c2cb23
27651f
%global srcname2 spirv-headers
9523ad
e73726
%global ver3 2019.1
27651f
%global srcname3 spirv-tools
9523ad
e73726
%global srcname4 Vulkan-Headers
e73726
%global srcname5 Vulkan-ValidationLayers
e73726
%global srcname6 Vulkan-Tools
e73726
9523ad
Name:           vulkan
e73726
Version:        1.1.97.0
27651f
Release:        1%{?dist}
9523ad
Summary:        Vulkan loader and validation layers
9523ad
9523ad
License:        ASL 2.0
9523ad
URL:            https://github.com/KhronosGroup
9523ad
9523ad
Source0:        %url/%{srcname}/archive/sdk-%{version}.tar.gz#/%{srcname}-sdk-%{version}.tar.gz
9523ad
Source1:        %url/%{srcname1}/archive/%{commit1}.tar.gz#/%{srcname1}-%{commit1}.tar.gz
9523ad
Source2:        %url/%{srcname2}/archive/%{commit2}.tar.gz#/%{srcname2}-%{commit2}.tar.gz
e73726
Source3:        %url/%{srcname3}/archive/%{ver3}.tar.gz#/%{srcname3}-%{ver3}.tar.gz
e73726
Source4:        %url/%{srcname4}/archive/sdk-%{version}.tar.gz#/%{srcname4}-sdk-%{version}.tar.gz
e73726
Source5:        %url/%{srcname5}/archive/sdk-%{version}.tar.gz#/%{srcname5}-sdk-%{version}.tar.gz
e73726
Source6:        %url/%{srcname6}/archive/sdk-%{version}.tar.gz#/%{srcname6}-sdk-%{version}.tar.gz
e73726
Source7:        spirv_tools_commit_id.h
e73726
Source8:        cmake-3.4.3.tar.gz
b40a32
e73726
Patch0: fix_shared.patch
e73726
Patch1: spirv-tools-fix.patch
e73726
Patch2: layers-no-rpath.patch
9523ad
9523ad
BuildRequires:  gcc
9523ad
BuildRequires:  gcc-c++
9523ad
BuildRequires:  bison
9523ad
BuildRequires:  cmake
9523ad
BuildRequires:  /usr/bin/chrpath
9523ad
BuildRequires:  pkgconfig(libsystemd)
9523ad
BuildRequires:  pkgconfig(pciaccess)
9523ad
%if 0%{?fedora}
9523ad
BuildRequires:  python3
e73726
%else
e73726
BuildRequires:  rh-python36-python
e73726
%endif
9523ad
BuildRequires:  pkgconfig(wayland-client)
9523ad
BuildRequires:  pkgconfig(wayland-cursor)
9523ad
BuildRequires:  pkgconfig(wayland-server)
9523ad
BuildRequires:  pkgconfig(wayland-egl)
9523ad
BuildRequires:  pkgconfig(x11)
9523ad
BuildRequires:  pkgconfig(xcb)
9523ad
BuildRequires:  pkgconfig(xrandr)
9523ad
9523ad
Requires:       vulkan-filesystem = %{version}-%{release}
9523ad
9523ad
%if 0%{?fedora}
9523ad
Recommends:     mesa-vulkan-drivers
9523ad
%endif
9523ad
9523ad
%description
9523ad
Vulkan is a new generation graphics and compute API that provides
9523ad
high-efficiency, cross-platform access to modern GPUs used in a wide variety of
9523ad
devices from PCs and consoles to mobile phones and embedded platforms.
9523ad
9523ad
This package contains the reference ICD loader and validation layers for
9523ad
Vulkan.
9523ad
9523ad
%package devel
9523ad
Summary:        Vulkan development package
9523ad
Requires:       %{name}%{?_isa} = %{version}-%{release}
9523ad
9523ad
%description devel
9523ad
Development headers for Vulkan applications.
9523ad
9523ad
%package filesystem
9523ad
Summary:        Vulkan filesystem package
9523ad
BuildArch:      noarch
9523ad
9523ad
%description filesystem
9523ad
Filesystem for Vulkan.
9523ad
9523ad
%prep
e73726
%setup -T -D -b 0 -n %{srcname}-sdk-%{version}
e73726
%setup -T -D -b 8 -n cmake-3.4.3
e73726
%setup -T -D -b 2 -n SPIRV-Headers-%{commit2}
e73726
%setup -T -D -b 3 -n SPIRV-Tools-%{ver3}
e73726
%patch1 -p1
e73726
%setup -T -D -b 1 -n glslang-%{commit1}
e73726
%setup -T -D -b 4 -n %{srcname4}-sdk-%{version}
e73726
%setup -T -D -b 5 -n %{srcname5}-sdk-%{version}
e73726
%patch0 -p1
e73726
%patch2 -p1
e73726
%setup -T -D -b 6 -n %{srcname6}-sdk-%{version}
e73726
cd -
e73726
e73726
%build
b40a32
e73726
# enable python 3.6
e73726
set +e
e73726
source scl_source enable rh-python36
e73726
set -e
9523ad
e73726
cd ../cmake-3.4.3
e73726
BUILD_DIR=`pwd`/cmake_build
e73726
cmake . -DCMAKE_INSTALL_PREFIX=$BUILD_DIR
e73726
make
e73726
make install
e73726
cd -
e73726
e73726
export PATH=$BUILD_DIR/bin:$PATH
e73726
%global __cmake $BUILD_DIR/bin/cmake
e73726
e73726
# install into somewhere outside the buildroot temporarily
e73726
export DESTDIR=../../install
e73726
export USRDIR=$PWD/../install/usr
e73726
cd ..
e73726
pushd %{srcname4}-sdk-%{version}
e73726
mkdir -p build
e73726
cd build
e73726
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
e73726
%make_build
e73726
make install
e73726
cd -
e73726
popd
9523ad
e73726
pushd SPIRV-Headers-%{commit2}
e73726
mkdir -p build
e73726
cd build
e73726
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
e73726
%make_build
e73726
make install
e73726
cd -
e73726
popd
e73726
e73726
pushd SPIRV-Tools-%{ver3}
e73726
mkdir -p build
e73726
cd build
e73726
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DSPIRV-Headers_SOURCE_DIR=$USRDIR
e73726
%make_build
e73726
make install
e73726
cd -
e73726
popd
e73726
e73726
pushd %{srcname}-sdk-%{version}
e73726
mkdir -p build
e73726
cd build
e73726
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR
e73726
%make_build
e73726
make install
e73726
cd -
e73726
popd
e73726
e73726
pushd glslang-%{commit1}
e73726
mkdir -p build
e73726
cd build
e73726
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_SKIP_RPATH:BOOL=yes -DBUILD_SHARED_LIBS=OFF
9523ad
%make_build
9523ad
make install
e73726
cd -
9523ad
popd
b40a32
27651f
# hack to avoid running of memory on aarch64 and i686 build
27651f
%ifarch %{ix86} aarch64
27651f
# Decrease debuginfo verbosity to reduce memory consumption even more
27651f
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
27651f
%endif
e73726
e73726
pushd %{srcname5}-sdk-%{version}
e73726
mkdir -p build
e73726
cd build
e73726
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR -DGLSLANG_INSTALL_DIR=$USRDIR
e73726
%make_build
e73726
cd -
e73726
popd
e73726
e73726
pushd %{srcname6}-sdk-%{version}
e73726
mkdir -p build
e73726
cd build
e73726
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR -DGLSLANG_INSTALL_DIR=$USRDIR -DBUILD_CUBE:BOOL=OFF
9523ad
%make_build
e73726
cd -
9523ad
popd
9523ad
9523ad
%install
e73726
e73726
cd ..
e73726
pushd %{srcname4}-sdk-%{version}/build
9523ad
%{make_install}
9523ad
popd
9523ad
e73726
pushd %{srcname}-sdk-%{version}/build
e73726
%{make_install}
e73726
popd
e73726
e73726
pushd SPIRV-Tools-%{ver3}/build
e73726
%{make_install}
e73726
popd
e73726
e73726
pushd %{srcname5}-sdk-%{version}/build
e73726
# this doesn't use the macro as we don't want to trigger cmake rebuilds here
e73726
DESTDIR=$RPM_BUILD_ROOT cmake -P cmake_install.cmake
e73726
popd
e73726
e73726
pushd %{srcname6}-sdk-%{version}/build
e73726
# this doesn't use the macro as we don't want to trigger cmake rebuilds here
e73726
DESTDIR=$RPM_BUILD_ROOT cmake -P cmake_install.cmake
e73726
popd
e73726
cd -
b40a32
# create the filesystem
b40a32
mkdir -p %{buildroot}%{_sysconfdir}/vulkan/{explicit,implicit}_layer.d/ \
b40a32
%{buildroot}%{_datadir}/vulkan/{explicit,implicit}_layer.d/ \
b40a32
%{buildroot}{%{_sysconfdir},%{_datadir}}/vulkan/icd.d
9523ad
e73726
# don't want spirv-tools
e73726
rm -f %{buildroot}%{_bindir}/spirv-*
e73726
rm -f %{buildroot}%{_libdir}/pkgconfig/SPIRV*
e73726
rm -rf %{buildroot}%{_includedir}/spirv-tools
e73726
rm -f %{buildroot}%{_libdir}/libSPIRV-Tools-link.so
e73726
rm -f %{buildroot}%{_libdir}/libSPIRV-Tools-reduce.so
e73726
rm -f %{buildroot}%{_libdir}/libSPIRV-Tools-shared.so
e73726
e73726
# remove unused includes and registry
e73726
rm -rf %{buildroot}%{_datadir}/vulkan/registry
e73726
rm -f %{buildroot}%{_includedir}/vk*.h %{buildroot}%{_includedir}/hash*.h %{buildroot}%{_includedir}/*.cpp
e73726
9523ad
# remove RPATH
9523ad
chrpath -d %{buildroot}%{_bindir}/vulkaninfo
9523ad
9523ad
%post -p /sbin/ldconfig
9523ad
%postun -p /sbin/ldconfig
9523ad
9523ad
%files
e73726
%license LICENSE.txt
9523ad
%doc README.md CONTRIBUTING.md
9523ad
%{_bindir}/vulkaninfo
9523ad
%{_datadir}/vulkan/explicit_layer.d/*.json
9523ad
%{_libdir}/libVkLayer_*.so
b40a32
%{_libdir}/libvulkan.so.*
e73726
%{_libdir}/libSPIRV*so
9523ad
9523ad
%files devel
b40a32
%{_includedir}/vulkan/
b40a32
%{_libdir}/pkgconfig/vulkan.pc
b40a32
%{_libdir}/libvulkan.so
9523ad
9523ad
%files filesystem
b40a32
%dir %{_sysconfdir}/vulkan/
b40a32
%dir %{_sysconfdir}/vulkan/explicit_layer.d/
b40a32
%dir %{_sysconfdir}/vulkan/icd.d/
b40a32
%dir %{_sysconfdir}/vulkan/implicit_layer.d/
b40a32
%dir %{_datadir}/vulkan/
b40a32
%dir %{_datadir}/vulkan/explicit_layer.d/
b40a32
%dir %{_datadir}/vulkan/icd.d/
b40a32
%dir %{_datadir}/vulkan/implicit_layer.d/
9523ad
9523ad
%changelog
e73726
* Tue Feb 19 2019 Dave Airlie <airlied@redhat.com> 1.1.97.0-1
e73726
- Update to 1.1.97.0
e73726
- rework spec for new upstream layout
e73726
27651f
* Tue May 08 2018 Dave Airlie <airlied@redhat.com> 1.1.73.0-1
27651f
- Update to 1.1.73.0 release
27651f
- fixup spec for spirv-tools etc
27651f
b40a32
* Tue Oct 10 2017 Dave Airlie <airlied@redhat.com> - 1.0.61.1-2
b40a32
- fix 32-bit textrels
b40a32
b40a32
* Thu Sep 21 2017 Dave Airlie <airlied@redhat.com> - 1.0.61.1-1
b40a32
- Update to 1.0.61.1 release
b40a32
- bring spec updates in from Fedora spec.
b40a32
9523ad
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.39.1-2
9523ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9523ad
9523ad
* Tue Jan 31 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.0.39.1-1
9523ad
- Update to 1.0.39.1 release
9523ad
9523ad
* Tue Jan 24 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.0.39.0-1
9523ad
- Update to 1.0.39.0 release
9523ad
- Add build requires libXrandr-devel
9523ad
9523ad
* Fri Dec 16 2016 leigh scott <leigh123linux@googlemail.com> - 1.0.37.0-1
9523ad
- Update to 1.0.37.0 release
9523ad
- Disable Mir as it's lame ubuntu rubbish
9523ad
9523ad
* Fri Dec 02 2016 leigh scott <leigh123linux@googlemail.com> - 1.0.34.0-0.1.gitd4cd34f
9523ad
- Update to latest git
9523ad
9523ad
* Thu Dec 01 2016 leigh scott <leigh123linux@googlemail.com> - 1.0.30.0-2
9523ad
- Fix VkLayer undefined symbol: util_GetExtensionProperties
9523ad
9523ad
* Sat Oct 15 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.30.0-1
9523ad
- Update to 1.0.30.0 release
9523ad
9523ad
* Mon Oct 10 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-4
9523ad
- Build with wayland support (rhbz 1383115)
9523ad
9523ad
* Tue Sep 27 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-3
9523ad
- Move unversioned libraries
9523ad
- Disable vkjson build
9523ad
- Fix license tag
9523ad
9523ad
* Sun Sep 11 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-2
9523ad
- Make layers conditional. 
9523ad
9523ad
* Sun Sep 11 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-1
9523ad
- Update to 1.0.26.0 release
9523ad
9523ad
* Thu Sep 08 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-0.3.gitfbb8667
9523ad
- Clean up
9523ad
9523ad
* Thu Sep 08 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-0.2.gitfbb8667
9523ad
- Change build requires python3
9523ad
- Use release for cmake
9523ad
- Make build verbose
9523ad
9523ad
* Wed Sep 07 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-0.1.gitfbb8667
9523ad
- Update to latest git
9523ad
9523ad
* Tue Feb 16 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0.3-0.1.git1affe90
9523ad
- Add ldconfig in post/postun
9523ad
- Use upstream tarball from commit + patches
9523ad
- Fix versioning. In fact it was never released
9523ad
- Fixup mixing of spaces/tabs
9523ad
- Remove rpath from vulkaninfo
9523ad
- Make filesystem subpkg noarch (it is really noarch)
9523ad
- BuildRequire gcc and gcc-c++ explicitly
9523ad
- Require main pkg with isa tag
9523ad
- Fix perms and perm of README.md
9523ad
- Use %%license tag
9523ad
9523ad
* Tue Feb 16 2016 Adam Jackson <ajax@redhat.com> - 1.0.3-0
9523ad
- Update loader to not build cube or tri. Drop bundled LunarGLASS and llvm
9523ad
  since they're only needed for those demos.
9523ad
9523ad
* Tue Feb 16 2016 Adam Jackson <ajax@redhat.com> - 1.0.3-0
9523ad
- Initial packaging