1 # NOTE: this spec contains the last glfw 2.x for backward compatibility,
2 # built as parallel-installable with glfw 3.x.
3 # The only change required at build time is to change "-lglfw" to "-lglfw2".
4 Summary: Free, portable framework for OpenGL application development
5 Summary(pl.UTF-8): Wolnodostępny, przenośny szkielet do tworzenia aplikacji OpenGL
11 Source0: http://downloads.sourceforge.net/glfw/glfw-%{version}.tar.bz2
12 # Source0-md5: 96e12be48801984f0f0c23e38549b277
13 Patch0: %{name}-opt.patch
14 Patch1: %{name}-libdir.patch
15 Patch2: %{name}-soname.patch
16 URL: http://glfw.sourceforge.net/
17 BuildRequires: OpenGL-GLU-devel
18 BuildRequires: OpenGL-GLX-devel
19 BuildRequires: libtool
20 BuildRequires: sed >= 4.0
21 BuildRequires: xorg-lib-libX11-devel
22 BuildRequires: xorg-lib-libXxf86vm-devel
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 GLFW is a free, Open Source, portable framework for OpenGL application
27 development. In short, it is a single library providing a powerful,
28 portable API for otherwise operating system specific tasks such as
29 opening an OpenGL window, and reading keyboard, mouse and joystick
32 It also provides functions for reading a high precision timer,
33 accessing OpenGL extensions, creating and synchronizing threads,
34 reading textures from files and more.
36 GLFW is available for Windows, MacOS X, Unix-like systems such as
37 Linux and FreeBSD, and for AmigaOS and DOS.
39 %description -l pl.UTF-8
40 GLFW to wolnodostępny, mający otwarte źródła, przenośny szkielet do
41 tworzenia aplikacji OpenGL. W skrócie jest to pojedyncza biblioteka
42 udostępniająca potężne, przenośne API do zadań zależnych od systemu
43 operacyjnego, takich jak otwieranie okna OpenGL, odczyt wejścia z
44 klawiatury, myszy i joysticka.
46 Zawiera także funkcje do odczytu zegara o wysokiej rozdzielczości,
47 dostępu do rozszerzeń OpenGL, tworzenia i synchronizowania wątków,
48 odczytu tekstur z plików i innych zadań.
50 GLFW jest dostępny dla Windows, MacOS X, systemów uniksowych takich
51 jak Linux czy FreeBSD oraz dla AmigaOS i DOS-a.
54 Summary: Header files for GLFW 2 library
55 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GLFW 2
56 Group: Development/Libraries
57 Requires: %{name} = %{version}-%{release}
58 Requires: OpenGL-GLX-devel
59 Requires: xorg-lib-libX11-devel
60 Requires: xorg-lib-libXxf86vm-devel
63 Header files for GLFW 2 library.
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe biblioteki GLFW 2.
69 Summary: Static GLFW 2 library
70 Summary(pl.UTF-8): Statyczna biblioteka GLFW 2
71 Group: Development/Libraries
72 Requires: %{name}-devel = %{version}-%{release}
75 Static GLFW 2 library.
77 %description static -l pl.UTF-8
78 Statyczna biblioteka GLFW 2.
81 %setup -q -n glfw-%{version}
88 LFLAGS="%{rpmldflags}" \
89 CFLAGS="%{rpmcflags}" \
92 %{__make} -C lib/x11 -f Makefile.x11 \
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
100 %{__make} -C lib/x11 -f Makefile.x11 dist-install \
101 DESTDIR=$RPM_BUILD_ROOT \
105 install examples/{*.c,*.tga,Makefile.x11} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
107 # make it parallel-installable with glfw 3.x (from glfw.spec)
108 %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libglfw.so,libglfw.so.%{version}}
109 ln -sf libglfw.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libglfw.so.2
110 ln -sf libglfw.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libglfw2.so
111 %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libglfw.a,libglfw2.a}
112 %{__sed} -i -e 's,-lglfw,-lglfw2,' $RPM_BUILD_ROOT%{_pkgconfigdir}/libglfw.pc
115 rm -rf $RPM_BUILD_ROOT
117 %post -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
121 %defattr(644,root,root,755)
122 %doc COPYING.txt readme.html
123 %attr(755,root,root) %{_libdir}/libglfw.so.2.*.*
124 %attr(755,root,root) %ghost %{_libdir}/libglfw.so.2
127 %defattr(644,root,root,755)
128 %doc docs/{Reference,UsersGuide}.pdf
129 %attr(755,root,root) %{_libdir}/libglfw2.so
130 %{_includedir}/GL/glfw.h
131 %{_pkgconfigdir}/libglfw.pc
132 %{_examplesdir}/%{name}-%{version}
135 %defattr(644,root,root,755)
136 %{_libdir}/libglfw2.a