# If you change so_ver, then you have to update baselibs.conf as well. %define so_ver 2_2 Name: glew Version: 2.2.0 Release: 1%{?dist} Summary: OpenGL Extension Wrangler Library # was http://glew.sourceforge.net/ License: BSD-3-Clause AND GPL-2.0-or-later AND MIT Group: Development/Libraries/C and C++ URL: https://github.com/nigels-com/glew Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz Source1: baselibs.conf Source2: %{name}.rpmlintrc Patch0: glew-2.2.0-mesa-24.patch BuildRequires: pkgconfig BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xi) BuildRequires: libxmu-devel ExclusiveArch: x86_64 aarch64 riscv64 %description The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. %package -n libGLEW%{so_ver} Summary: OpenGL Extension Wrangler Library Group: System/Libraries %description -n libGLEW%{so_ver} The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. %package devel Summary: Development files for glew Group: Development/Libraries/C and C++ Requires: libGLEW%{so_ver} = %{version} Requires: pkgconfig(egl) Requires: pkgconfig(x11) Requires: pkgconfig(xproto) # Don't require GLU, because there is GLEW_NO_GLU option Recommends: pkgconfig(glu) %description devel The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. %prep %autosetup -p1 %build %make_build POPT="%{optflags} -fPIE -pie" GLEW_DEST=%{_prefix} LIBDIR=%{_libdir} LDFLAGS.EXTRA= STRIP= %install make DESTDIR=%{buildroot} GLEW_DEST=%{_prefix} LIBDIR=%{_libdir} PKGDIR=%{_libdir}/pkgconfig install.all install -m 0644 include/GL/eglew.h "%{buildroot}/%{_includedir}/GL/" chmod +x %{buildroot}%{_libdir}/*.so.* rm %{buildroot}%{_libdir}/*.a %post -n libGLEW%{so_ver} -p /sbin/ldconfig %postun -n libGLEW%{so_ver} -p /sbin/ldconfig %files %license LICENSE.txt %doc doc/* %{_bindir}/glewinfo %{_bindir}/visualinfo %files -n libGLEW%{so_ver} %{_libdir}/libGLEW.so.* %files devel %{_includedir}/GL/ %{_libdir}/libGLEW.so %{_libdir}/pkgconfig/glew.pc