Blame SPECS/vulkan.spec

9523ad
%global use_git 0
9523ad
9523ad
%global commit  d4cd34fd49caa759cf01cafa5fa271401b17c3b9
9523ad
%global shortcommit %(c=%{commit}; echo ${c:0:7})
9523ad
%global srcname Vulkan-LoaderAndValidationLayers
9523ad
b40a32
%global commit1 3a21c880500eac21cdf79bef5b80f970a55ac6af
9523ad
%global srcname1 glslang
9523ad
b40a32
%global commit2 2bb92e6fe2c6aa410152fc6c63443f452acb1a65
b40a32
%global srcname2 SPIRV-Headers
9523ad
b40a32
%global commit3 7e2d26c77b606b21af839b37fd21381c4a669f23
b40a32
%global srcname3 SPIRV-Tools
9523ad
9523ad
Name:           vulkan
b40a32
Version:        1.0.61.1
9523ad
%if 0%{?use_git}
b40a32
Release:        0.1.git%{shortcommit}%{?dist}
9523ad
%else
9523ad
Release:        2%{?dist}
9523ad
%endif
9523ad
Summary:        Vulkan loader and validation layers
9523ad
9523ad
License:        ASL 2.0
9523ad
URL:            https://github.com/KhronosGroup
9523ad
9523ad
%if 0%{?use_git}
9523ad
Source0:        %url/%{srcname}/archive/%{commit}.tar.gz#/%{srcname}-%{commit}.tar.gz
9523ad
%else
9523ad
Source0:        %url/%{srcname}/archive/sdk-%{version}.tar.gz#/%{srcname}-sdk-%{version}.tar.gz
9523ad
%endif
9523ad
Source1:        %url/%{srcname1}/archive/%{commit1}.tar.gz#/%{srcname1}-%{commit1}.tar.gz
9523ad
Source2:        %url/%{srcname2}/archive/%{commit2}.tar.gz#/%{srcname2}-%{commit2}.tar.gz
9523ad
Source3:        %url/%{srcname3}/archive/%{commit3}.tar.gz#/%{srcname3}-%{commit3}.tar.gz
b40a32
9523ad
Patch0:         0003-layers-Don-t-set-an-rpath.patch
9523ad
Patch1:         0008-demos-Don-t-build-tri-or-cube.patch
9523ad
Patch2:		hacked-python2.patch
b40a32
Patch3:		no-smoke-demo.patch
b40a32
Patch4:		0001-loader-Fix-TEXTREL-on-32-bit-linux-loader.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
9523ad
BuildRequires:  pkgconfig(wayland-client)
9523ad
BuildRequires:  pkgconfig(wayland-cursor)
9523ad
BuildRequires:  pkgconfig(wayland-server)
9523ad
BuildRequires:  pkgconfig(wayland-egl)
9523ad
%else
9523ad
BuildRequires:  python
9523ad
%endif
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
9523ad
%if 0%{?use_git}
9523ad
%autosetup -p1 -n %{srcname}-%{commit}
9523ad
%else
9523ad
%autosetup -p1 -n %{srcname}-sdk-%{version}
9523ad
%endif
b40a32
9523ad
mkdir -p build/ external/glslang/build/install external/spirv-tools/build/ external/spirv-tools/external/spirv-headers
9523ad
tar -xf %{SOURCE1} -C external/glslang --strip 1
b40a32
tar -xf %{SOURCE2} -C external/spirv-tools/external/spirv-headers --strip 1
b40a32
tar -xf %{SOURCE3} -C external/spirv-tools --strip 1
9523ad
# fix spurious-executable-perm
9523ad
chmod 0644 README.md
9523ad
chmod 0644 external/glslang/SPIRV/spirv.hpp
9523ad
chmod +x scripts/lvl_genvk.py
9523ad
# fix wrong-script-end-of-line-encoding
9523ad
sed -i 's/\r//' README.md
9523ad
9523ad
# sigh inttypes
9523ad
sed -i 's/inttypes.h/cinttypes/' layers/*.{cpp,h}
9523ad
9523ad
%build
9523ad
pushd external/glslang/build/
9523ad
CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS ; 
9523ad
CXXFLAGS="$RPM_OPT_FLAGS" ; export CXXFLAGS ; 
9523ad
LDFLAGS="$RPM_LD_FLAGS" ; export LDFLAGS ;
b40a32
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
9523ad
%make_build
9523ad
make install
9523ad
popd
b40a32
9523ad
pushd external/spirv-tools/build/
9523ad
cmake -DSPIRV_WERROR=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
9523ad
%make_build
9523ad
popd
b40a32
9523ad
pushd build/
9523ad
%cmake -DCMAKE_BUILD_TYPE=Release \
9523ad
       -DCMAKE_SKIP_INSTALL_RPATH:BOOL=yes \
9523ad
       -DCMAKE_SKIP_RPATH:BOOL=yes \
9523ad
       -DBUILD_VKJSON=OFF \
b40a32
       -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_datadir} \
9523ad
       -DBUILD_WSI_MIR_SUPPORT=OFF \
9523ad
%if 0%{?rhel}
9523ad
       -DBUILD_WSI_WAYLAND_SUPPORT=OFF \
9523ad
%endif
9523ad
 ..
9523ad
%make_build
9523ad
popd
9523ad
9523ad
%install
9523ad
pushd build/
9523ad
%{make_install}
9523ad
popd
9523ad
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
9523ad
# remove RPATH
9523ad
chrpath -d %{buildroot}%{_bindir}/vulkaninfo
9523ad
9523ad
%post -p /sbin/ldconfig
9523ad
%postun -p /sbin/ldconfig
9523ad
9523ad
%files
9523ad
%license LICENSE.txt COPYRIGHT.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.*
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
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