86f426db9f79411a6fd6264437e1bffc99a2f3b7
[fedora-mingw.git] / ocaml-lablgl / mingw32-ocaml-lablgl.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-ocaml-lablgl
8 Version:        1.03
9 Release:        1%{?dist}
10 Summary:        MinGW Windows port of LablGL is an OpenGL interface
11
12 License:        BSD
13 Group:          Development/Libraries
14
15 URL:            http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
16 Source0:        http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-%{version}.tar.gz
17
18 # Patches from native Fedora package:
19 Patch0:         lablgl-tk8.5.patch
20
21 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
22 BuildArch:      noarch
23
24 BuildRequires:  mingw32-filesystem >= 35
25 BuildRequires:  mingw32-gcc
26 BuildRequires:  mingw32-binutils
27
28 BuildRequires:  mingw32-ocaml >= 3.11.0
29
30 # labltk is used by the native package, but is essentially optional.
31 #BuildRequires: mingw32-ocaml-labtk
32
33
34 %description
35 LablGL is is an Objective Caml interface to OpenGL. Support is
36 included for use inside LablTk, and LablGTK also includes specific
37 support for LablGL.  It can be used either with proprietary OpenGL
38 implementations (SGI, Digital Unix, Solaris...), with XFree86 GLX
39 extension, or with open-source Mesa.
40
41
42 %prep
43 %setup -q -n lablgl-%{version}
44
45 %patch0 -p1
46
47 cat > Makefile.config <<__EOF__
48 CAMLC = %{_mingw32_target}-ocamlc
49 CAMLOPT = %{_mingw32_target}-ocamlopt
50 BINDIR = %{_bindir}
51 #XINCLUDES = -I%{_prefix}/X11R6/include
52 #XLIBS = -lXext -lXmu -lX11
53 #TKINCLUDES = -I%{_includedir}
54 GLINCLUDES = -DHAS_GLEXT_H -DGL_GLEXT_PROTOTYPES -DGLU_VERSION_1_3
55 GLLIBS = -lglu32 -lopengl32
56 GLUTLIBS = -lglut32
57 RANLIB = i686-pc-mingw32-ranlib
58 TOOLCHAIN = msvc
59 XB = .bat
60 XE = .exe
61 XS = .dll
62 MKLIB = ar rcs
63 MKDLL = i686-pc-mingw32-gcc -shared -o
64 LIBDIR = %{_libdir}/%{_mingw32_target}-ocaml
65 DLLDIR = %{_libdir}/%{_mingw32_target}-ocaml/stublibs
66 INSTALLDIR = %{_libdir}/%{_mingw32_target}-ocaml/lablGL
67 #TOGLDIR=Togl
68 #COPTS = $RPM_OPT_FLAGS
69 __EOF__
70
71
72 %build
73 make all opt
74
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 make DESTDIR=$RPM_BUILD_ROOT install
79
80 # Remove static libraries but DON'T remove *.dll.a files.
81 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
82
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87
88 %files
89 %defattr(-,root,root)
90 %{_mingw32_bindir}/foo.dll
91 %{_mingw32_libdir}/foo.dll.a
92 # etc.
93
94
95 %changelog
96 * Sun Nov 23 2008 Richard W.M. Jones <rjones@redhat.com> - 1.03-1
97 - Initial RPM release.