bcc38e7c77e0fa50012e128ee3354620911f7b90
[platform/upstream/freeglut.git] / packaging / freeglut.spec
1 %define debug 0
2
3 Name:           freeglut
4 Version:        2.8.0
5 Release:        0
6 License:        MIT
7 Summary:        Freely licensed alternative to the GLUT library
8 Url:            http://freeglut.sourceforge.net/
9 Group:          System/Libraries
10 Source:         %{name}-%{version}.tar.bz2
11 BuildRequires:  gcc-c++
12 BuildRequires:  libtool
13 BuildRequires:  mesa-devel
14 BuildRequires:  pkgconfig
15 BuildRequires:  pkgconfig(glu)
16 BuildRequires:  pkgconfig(libdrm)
17 BuildRequires:  pkgconfig(xi)
18
19 %description
20 Freeglut is a completely open source alternative to the OpenGL Utility
21 Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
22 support the sample programs in the second edition OpenGL Redbook. Since
23 then, GLUT has been used in a wide variety of practical applications
24 because it is simple, universally available, and highly portable.
25
26 GLUT (and freeglut) allow the user to create and manage windows
27 containing OpenGL contexts and also read the mouse, keyboard, and
28 joystick functions on a wide range of platforms.
29
30 %package -n libglut
31 Summary:        Freely licensed alternative to the GLUT library
32 Group:          Development/Libraries/X11
33
34 %description -n libglut
35 Freeglut is a completely open source alternative to the OpenGL Utility
36 Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
37 support the sample programs in the second edition OpenGL Redbook. Since
38 then, GLUT has been used in a wide variety of practical applications
39 because it is simple, universally available, and highly portable.
40
41 GLUT (and freeglut) allow the user to create and manage windows
42 containing OpenGL contexts and also read the mouse, keyboard, and
43 joystick functions on a wide range of platforms.
44
45 %package devel
46 Summary:        Development libraries, includes and man pages for freeglut (GLUT Library)
47 Group:          Development/Libraries/X11
48 Requires:       libglut = %{version}
49 Requires:       mesa-devel
50
51 %description devel
52 This package contains all necessary include files and libraries needed
53 to compile and link applications for the freeglut library.
54
55 In addition, it also includes manual pages which describe all functions
56 provided by the freeglut library.
57
58 Freeglut is a completely open source alternative to the OpenGL Utility
59 Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
60 support the sample programs in the second edition OpenGL Redbook. Since
61 then, GLUT has been used in a wide variety of practical applications
62 because it is simple, universally available, and highly portable.
63
64 GLUT (and freeglut) allow the user to create and manage windows
65 containing OpenGL contexts and also read the mouse, keyboard, and
66 joystick functions on a wide range of platforms.
67
68 %package demo
69 Summary:        Demonstration applications for the freeglut library
70 Group:          System/X11/Utilities
71
72 %description demo
73 This package contains demonstration applications for the freeglut library.
74
75 Freeglut is a completely open source alternative to the OpenGL Utility
76 Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to
77 support the sample programs in the second edition OpenGL Redbook. Since
78 then, GLUT has been used in a wide variety of practical applications
79 because it is simple, universally available, and highly portable.
80
81 GLUT (and freeglut) allow the user to create and manage windows
82 containing OpenGL contexts and also read the mouse, keyboard, and
83 joystick functions on a wide range of platforms.
84
85 %prep
86 %setup -q
87
88 %build
89 ./autogen.sh
90 %configure \
91   --enable-replace-glut \
92 %if %debug
93   --enable-debug \
94 %endif
95   --disable-static
96 make %{?_smp_mflags}  -C src
97 make %{?_smp_mflags}  -C include
98
99 %install
100 make install -C src DESTDIR=%{buildroot}
101 make install -C include DESTDIR=%{buildroot}
102 rm -rf %{buildroot}%{_libdir}/libglut.la
103
104 %post -n libglut -p /sbin/ldconfig
105
106 %postun -n libglut -p /sbin/ldconfig
107
108 %files  -n libglut
109 %defattr(-,root,root)
110 %doc COPYING
111 %{_libdir}/libglut.so.*
112
113 %files devel
114 %defattr(-,root,root)
115 %{_includedir}/GL
116 %{_libdir}/libglut.so