package init

This commit is contained in:
fun_yang 2019-11-29 14:56:56 +08:00
commit 34fe8df566
3 changed files with 84 additions and 0 deletions

19
glew-2.1.0-install.patch Normal file
View File

@ -0,0 +1,19 @@
diff -up glew-2.1.0/Makefile.install glew-2.1.0/Makefile
--- glew-2.1.0/Makefile.install 2018-08-15 13:51:45.220637107 +0200
+++ glew-2.1.0/Makefile 2018-08-15 13:52:02.168740876 +0200
@@ -231,6 +231,7 @@ install.bin: glew.bin
install.include:
$(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
+ $(INSTALL) -m 0644 include/GL/eglew.h "$(DESTDIR)$(INCDIR)/"
$(INSTALL) -m 0644 include/GL/wglew.h "$(DESTDIR)$(INCDIR)/"
$(INSTALL) -m 0644 include/GL/glew.h "$(DESTDIR)$(INCDIR)/"
$(INSTALL) -m 0644 include/GL/glxew.h "$(DESTDIR)$(INCDIR)/"
@@ -241,6 +242,7 @@ install.pkgconfig: glew.pc
$(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(PKGDIR)/"
uninstall:
+ $(RM) "$(DESTDIR)$(INCDIR)/eglew.h"
$(RM) "$(DESTDIR)$(INCDIR)/wglew.h"
$(RM) "$(DESTDIR)$(INCDIR)/glew.h"
$(RM) "$(DESTDIR)$(INCDIR)/glxew.h"

BIN
glew-2.1.0.tgz Normal file

Binary file not shown.

65
glew.spec Normal file
View File

@ -0,0 +1,65 @@
Name: glew
Version: 2.1.0
Release: 3
Summary: The OpenGL Extension Wrangler Library
License: BSD and MIT
URL: http://glew.sourceforge.net
Source0: https://sourceforge.net/projects/glew/files/glew/%{version}/glew-%{version}.tgz
Patch0000: glew-2.1.0-install.patch
BuildRequires: libGLU-devel
Provides: libGLEW = %{version}-%{release}
Obsoletes: libGLEW < %{version}-%{release}
%description
OpenGL Extension Wrangler Library (GLEW) is a cross-platform
extension loading library for c / c ++.
GLEW provides a runtime mechanism for determining
which OpenGL extensions are supported on the platform.
The OpenGL core and extensions are exposed in a single header file.
GLEW can be used on a variety of operating systems,
including Windows, Linux, Irix, Solaris, Mac OS X, FreeBSD.
This package contains the demo GLEW program.
The libraries themselves are in libGLEW
%package devel
Summary: Development files for glew
Requires: %{name} = %{version}-%{release} mesa-libGLU-devel
%description devel
Development files for glew
%prep
%autosetup -n %{name}-%{version} -p1
cp /usr/lib/rpm/%{_vendor}/config.guess config/
%build
%make_build CFLAGS.EXTRA="$RPM_OPT_FLAGS -fPIC" includedir=%{_includedir} STRIP= LIBDIR=%{_libdir} PKGDIR=%{_libdir}/pkgconfig
%install
make install.all DESTDIR="$RPM_BUILD_ROOT" LIBDIR=%{_libdir} PKGDIR=%{_libdir}/pkgconfig
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/*.so*
%delete_la_and_a
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%license LICENSE.txt
%{_bindir}/*
%{_libdir}/libGLEW.so.*
%files devel
%{_libdir}/libGLEW.so
%{_libdir}/pkgconfig//glew.pc
%{_includedir}/GL/*.h
%doc doc/*
%changelog
* Wed Nov 20 2019 yangjian<yangjian79@huawei.com> - 2.1.0-3
- Package init