3 %bcond_without ocaml_opt # 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 Patch1: %{name}-info.patch
21 URL: http://ocamlsdl.sourceforge.net/
22 BuildRequires: SDL-devel >= 1.2.0
23 BuildRequires: SDL_gfx-devel
24 BuildRequires: SDL_image-devel
25 BuildRequires: SDL_mixer-devel
26 BuildRequires: SDL_ttf-devel
27 BuildRequires: autoconf
28 BuildRequires: automake
29 BuildRequires: ocaml >= %{ocaml_ver}
30 BuildRequires: ocaml-findlib
31 BuildRequires: ocaml-lablgl-devel
32 BuildRequires: rpm-build >= 4.6
33 BuildRequires: texinfo
34 %requires_eq ocaml-runtime
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Simply speaking, OCamlSDL is an attempt to write a software interface
39 between the ML programming language and the SDL C library.
41 This package contains files needed to run bytecode executables using
44 %description -l pl.UTF-8
45 OCamlSDL to próba napisania interfejsu programowego między językiem
46 programowania ML a biblioteką C SDL.
48 Ten pakiet zawiera pliki potrzebne do uruchamiania wykonywalnego
49 bytecodu używającego tej biblioteki.
52 Summary: SDL binding for OCaml - development part
53 Summary(pl.UTF-8): Wiązania SDL dla OCamla - cześć programistyczna
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
59 Simply speaking, OCamlSDL is an attempt to write a software interface
60 between the ML programming language and the SDL C library.
62 This package contains files needed to develop OCaml programs using
65 %description devel -l pl.UTF-8
66 OCamlSDL to próba napisania interfejsu programowego między językiem
67 programowania ML a biblioteką C SDL.
69 Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
70 używających tej biblioteki.
73 Summary: API documentation for OCaml SDL library
74 Summary(pl.UTF-8): Dokumentacja API biblioteki OCamla SDL
79 API documentation for OCaml SDL library.
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API biblioteki OCamla SDL.
85 %setup -q -n ocamlsdl-%{version}
90 cp -f /usr/share/automake/config.* support
91 %{__aclocal} -I support
95 %{!?with_ocaml_opt:OCAMLOPT=}
98 makeinfo --no-split ocamlsdl.texi
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
105 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
106 %{!?with_ocaml_opt:OCAMLOPT=}
108 install -d $RPM_BUILD_ROOT%{_infodir}
109 cp -p doc/ocamlsdl.info $RPM_BUILD_ROOT%{_infodir}
111 # ocamlfind-specific, useless in rpm
112 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
115 rm -rf $RPM_BUILD_ROOT
117 %post devel -p /sbin/postshell
118 -/usr/sbin/fix-info-dir -c %{_infodir}
120 %postun devel -p /sbin/postshell
121 -/usr/sbin/fix-info-dir -c %{_infodir}
124 %defattr(644,root,root,755)
125 %doc AUTHORS NEWS README
126 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlstub.so
127 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlgfxstub.so
128 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlloaderstub.so
129 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlmixerstub.so
130 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlttfstub.so
131 %dir %{_libdir}/ocaml/sdl
132 %{_libdir}/ocaml/sdl/META
133 %{_libdir}/ocaml/sdl/sdl*.cma
136 %defattr(644,root,root,755)
137 %{_libdir}/ocaml/sdl/libsdl*.a
138 %{_libdir}/ocaml/sdl/sdl*.cmi
140 %{_libdir}/ocaml/sdl/sdl*.mli
141 %if %{with ocaml_opt}
142 %{_libdir}/ocaml/sdl/sdl*.a
143 %{_libdir}/ocaml/sdl/sdl*.cmx
144 %{_libdir}/ocaml/sdl/sdl*.cmxa
146 %{_infodir}/ocamlsdl.info*
149 %defattr(644,root,root,755)