]> git.pld-linux.org Git - SPECS.git/blob - glfw2.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / glfw2.spec
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
6 Name:           glfw2
7 Version:        2.7.9
8 Release:        1
9 License:        BSD-like
10 Group:          Libraries
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)
24
25 %description
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
30 input.
31
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.
35
36 GLFW is available for Windows, MacOS X, Unix-like systems such as
37 Linux and FreeBSD, and for AmigaOS and DOS.
38
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.
45
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ń.
49
50 GLFW jest dostępny dla Windows, MacOS X, systemów uniksowych takich
51 jak Linux czy FreeBSD oraz dla AmigaOS i DOS-a.
52
53 %package devel
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
61
62 %description devel
63 Header files for GLFW 2 library.
64
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe biblioteki GLFW 2.
67
68 %package static
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}
73
74 %description static
75 Static GLFW 2 library.
76
77 %description static -l pl.UTF-8
78 Statyczna biblioteka GLFW 2.
79
80 %prep
81 %setup -q -n glfw-%{version}
82 %patch0 -p1
83 %patch1 -p1
84 %patch2 -p1
85
86 %build
87 CC="%{__cc}" \
88 LFLAGS="%{rpmldflags}" \
89 CFLAGS="%{rpmcflags}" \
90 sh ./compile.sh
91
92 %{__make} -C lib/x11 -f Makefile.x11 \
93         PREFIX=%{_prefix} \
94         LIBDIR=%{_libdir}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
99
100 %{__make} -C lib/x11 -f Makefile.x11 dist-install \
101         DESTDIR=$RPM_BUILD_ROOT \
102         PREFIX=%{_prefix} \
103         LIBDIR=%{_libdir}
104
105 install examples/{*.c,*.tga,Makefile.x11} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
106
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
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %files
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
125
126 %files devel
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}
133
134 %files static
135 %defattr(644,root,root,755)
136 %{_libdir}/libglfw2.a
This page took 0.101608 seconds and 3 git commands to generate.