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}
7 Name: mingw32-ocaml-lablgtk
10 Summary: MinGW Windows port of LablGTK, OCaml interface to Gtk+
12 License: LGPLv2 with exceptions
13 Group: Development/Libraries
15 URL: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html
16 Source0: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%{version}.tar.gz
18 Patch1000: mingw32-ocaml-lablgtk-2.10.1-build-hacks.patch
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
23 BuildRequires: mingw32-filesystem >= 38
24 BuildRequires: mingw32-gcc
25 BuildRequires: mingw32-binutils
26 BuildRequires: mingw32-glib2
27 BuildRequires: mingw32-gtk2
28 BuildRequires: mingw32-pango
30 BuildRequires: mingw32-ocaml >= 3.11.0
31 BuildRequires: mingw32-ocaml-lablgl >= 1.03
33 BuildRequires: pkgconfig
35 # These are all in the native package, but missing as dependencies.
36 #BuildRequires: ncurses-devel
37 #BuildRequires: gnome-panel-devel
38 #BuildRequires: gtkglarea2-devel
39 #BuildRequires: gtkspell-devel
40 #BuildRequires: libXmu-devel
41 #BuildRequires: libglade2-devel
42 #BuildRequires: libgnomecanvas-devel
43 #BuildRequires: libgnomeui-devel
44 #BuildRequires: librsvg2-devel
48 LablGTK is is an Objective Caml interface to gtk+.
50 It uses the rich type system of Objective Caml 3 to provide a strongly
51 typed, yet very comfortable, object-oriented interface to gtk+. This
52 is not that easy if you know the dynamic typing approach taken by
55 This is the MinGW Windows port of this package. Currently it does not
56 support Togl (Tk integration).
60 %setup -q -n lablgtk-%{version}
64 # version information in META file is wrong
65 perl -pi -e 's|version="1.3.1"|version="%{version}"|' META
69 %{_mingw32_configure} \
70 CAMLC=i686-pc-mingw32-ocamlc \
72 CAMLOPT=i686-pc-mingw32-ocamlopt \
74 OCAMLDEP=i686-pc-mingw32-ocamldep \
75 OCAMLLIB=%{_libdir}/%{_mingw32_target}-ocaml \
76 CAMLMKTOP=i686-pc-mingw32-ocamlmktop \
77 CAMLMKLIB=i686-pc-mingw32-ocamlmklib \
83 --without-gnomecanvas \
87 --without-gtksourceview
89 perl -pi -e "s|-O|$RPM_OPT_FLAGS|" src/Makefile
94 rm -rf $RPM_BUILD_ROOT
96 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
97 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2
98 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/stublibs
101 BINDIR=$RPM_BUILD_ROOT%{_mingw32_bindir} \
102 LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
103 INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2 \
104 DLLDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/stublibs
105 cp META $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2
107 # Remove unnecessary *.ml files (ones which have a *.mli).
108 pushd $RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml/lablgtk2
110 b=`basename $f .ml`; \
111 if [ -f "$b.mli" ]; then \
119 rm -rf $RPM_BUILD_ROOT
123 %defattr(-,root,root)
124 %{_mingw32_bindir}/lablgtk2
125 %{_libdir}/%{_mingw32_target}-ocaml/lablgtk2/
129 * Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.10.1-1
130 - Initial RPM release.