Fix Name
[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
29
30 # XXX This requires camlp4 which we don't yet have under MinGW.
31 BuildRequires:  mingw32-ocaml-camlp4
32
33 # labltk is used by the native package, but is essentially optional.
34 #BuildRequires: mingw32-ocaml-labtk
35
36
37 %description
38 LablGL is is an Objective Caml interface to OpenGL. Support is
39 included for use inside LablTk, and LablGTK also includes specific
40 support for LablGL.  It can be used either with proprietary OpenGL
41 implementations (SGI, Digital Unix, Solaris...), with XFree86 GLX
42 extension, or with open-source Mesa.
43
44
45 %prep
46 %setup -q -n lablgl-%{version}
47
48 %patch0 -p1
49
50 cat > Makefile.config <<__EOF__
51 CAMLC = %{_mingw32_target}-ocamlc
52 CAMLOPT = %{_mingw32_target}-ocamlopt
53 BINDIR = %{_bindir}
54 #XINCLUDES = -I%{_prefix}/X11R6/include
55 #XLIBS = -lXext -lXmu -lX11
56 #TKINCLUDES = -I%{_includedir}
57 GLINCLUDES = -DHAS_GLEXT_H -DGL_GLEXT_PROTOTYPES -DGLU_VERSION_1_3
58 GLLIBS = -lglu32 -lopengl32
59 GLUTLIBS = -lglut32
60 RANLIB = i686-pc-mingw32-ranlib
61 TOOLCHAIN = msvc
62 XB = .bat
63 XE = .exe
64 XS = .dll
65 MKLIB = ar rcs
66 MKDLL = i686-pc-mingw32-gcc -shared -o
67 LIBDIR = %{_libdir}/%{_mingw32_target}-ocaml
68 DLLDIR = %{_libdir}/%{_mingw32_target}-ocaml/stublibs
69 INSTALLDIR = %{_libdir}/%{_mingw32_target}-ocaml/lablGL
70 #TOGLDIR=Togl
71 #COPTS = $RPM_OPT_FLAGS
72 __EOF__
73
74
75 %build
76 make all opt
77
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 make DESTDIR=$RPM_BUILD_ROOT install
82
83 # Remove static libraries but DON'T remove *.dll.a files.
84 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
85
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90
91 %files
92 %defattr(-,root,root)
93 %{_mingw32_bindir}/foo.dll
94 %{_mingw32_libdir}/foo.dll.a
95 # etc.
96
97
98 %changelog
99 * Thu Nov 13 2008 Your Name <you@example.com> - 1.2.3-1
100 - Initial RPM release.