3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
6 %undefine with_ocaml_opt
9 %define ocaml_ver 1:3.09.2
10 Summary: SDL binding for OCaml
11 Summary(pl.UTF-8): Wiązania SDL dla OCamla
17 Source0: http://downloads.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz
18 # Source0-md5: c3086423991fcdc1ba468afd52fc112b
19 Patch0: safe-string.patch
20 URL: http://ocamlsdl.sourceforge.net/
21 BuildRequires: SDL-devel >= 1.2.0
22 BuildRequires: SDL_image-devel
23 BuildRequires: SDL_mixer-devel
24 BuildRequires: SDL_ttf-devel
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: ocaml >= %{ocaml_ver}
28 BuildRequires: ocaml-findlib
29 BuildRequires: ocaml-lablgl-devel
30 %requires_eq ocaml-runtime
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Simply speaking, OCamlSDL is an attempt to write a software interface
35 between the ML programming language and the SDL C library.
37 This package contains files needed to run bytecode executables using
40 %description -l pl.UTF-8
41 OCamlSDL to próba napisania interfejsu programowego między językiem
42 programowania ML a biblioteką C SDL.
44 Ten pakiet zawiera pliki potrzebne do uruchamiania wykonywalnego
45 bytecodu używającego tej biblioteki.
48 Summary: SDL binding for OCaml - development part
49 Summary(pl.UTF-8): Wiązania SDL dla OCamla - cześć programistyczna
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
55 Simply speaking, OCamlSDL is an attempt to write a software interface
56 between the ML programming language and the SDL C library.
58 This package contains files needed to develop OCaml programs using
61 %description devel -l pl.UTF-8
62 OCamlSDL to próba napisania interfejsu programowego między językiem
63 programowania ML a biblioteką C SDL.
65 Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
66 używających tej biblioteki.
69 %setup -q -n ocamlsdl-%{version}
73 cp -f /usr/share/automake/config.* support
74 %{__aclocal} -I support
78 %{!?with_ocaml_opt:OCAMLOPT=}
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
85 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
86 %{!?with_ocaml_opt:OCAMLOPT=}
88 # ocamlfind-specific, useless in rpm
89 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
92 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc AUTHORS NEWS README
97 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlstub.so
98 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlgfxstub.so
99 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlloaderstub.so
100 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlmixerstub.so
101 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlttfstub.so
104 %defattr(644,root,root,755)
106 %dir %{_libdir}/ocaml/sdl
107 %{_libdir}/ocaml/sdl/META
108 %{_libdir}/ocaml/sdl/libsdl*.a
109 %{_libdir}/ocaml/sdl/sdl*.cma
110 %{_libdir}/ocaml/sdl/sdl*.cmi
112 %{_libdir}/ocaml/sdl/sdl*.mli
113 %if %{with ocaml_opt}
114 %{_libdir}/ocaml/sdl/sdl*.a
115 %{_libdir}/ocaml/sdl/sdl*.cmx
116 %{_libdir}/ocaml/sdl/sdl*.cmxa