]> git.pld-linux.org Git - packages/ocaml-SDL.git/blobdiff - ocaml-SDL.spec
- typo
[packages/ocaml-SDL.git] / ocaml-SDL.spec
index 5a834afb1acf56977f043ecc89591001c84e2627..da305d36bdb93dfa96d59d8aad82ed8e620fe8c4 100644 (file)
@@ -1,20 +1,36 @@
+#
+# Conditional build:
+%bcond_without ocaml_opt       # native optimized binaries (bytecode is always built)
+
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
+%undefine      with_ocaml_opt
+%endif
+
+%define                ocaml_ver       1:3.09.2
 Summary:       SDL binding for OCaml
-Summary(pl):   Wi±zania SDL dla OCamla
+Summary(pl.UTF-8):     Wiązania SDL dla OCamla
 Name:          ocaml-SDL
-Version:       0.7.2
-Release:       1
-License:       GPL
+Version:       0.9.1
+Release:       8
+License:       LGPL v2+
 Group:         Libraries
-Source0:       http://dl.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz
-# Source0-md5: 0707a9cf80bd9cfe18ad660dc077bad6
+Source0:       http://downloads.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz
+# Source0-md5: c3086423991fcdc1ba468afd52fc112b
+Patch0:                safe-string.patch
+Patch1:                %{name}-info.patch
 URL:           http://ocamlsdl.sourceforge.net/
-BuildRequires: SDL-devel
+BuildRequires: SDL-devel >= 1.2.0
+BuildRequires: SDL_gfx-devel
 BuildRequires: SDL_image-devel
 BuildRequires: SDL_mixer-devel
 BuildRequires: SDL_ttf-devel
-BuildRequires: ocaml >= 3.07
-BuildRequires: ocaml-findlib-devel
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: ocaml >= %{ocaml_ver}
+BuildRequires: ocaml-findlib
 BuildRequires: ocaml-lablgl-devel
+BuildRequires: rpm-build >= 4.6
+BuildRequires: texinfo
 %requires_eq   ocaml-runtime
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -25,16 +41,16 @@ between the ML programming language and the SDL C library.
 This package contains files needed to run bytecode executables using
 this library.
 
-%description -l pl
-OCamlSDL to próba napisania interfejsu programowego miêdzy jêzykiem
-programowania ML a bibliotek± C SDL.
+%description -l pl.UTF-8
+OCamlSDL to próba napisania interfejsu programowego między językiem
+programowania ML a biblioteką C SDL.
 
 Ten pakiet zawiera pliki potrzebne do uruchamiania wykonywalnego
-bytecodu u¿ywaj±cego tej biblioteki.
+bytecodu używającego tej biblioteki.
 
 %package devel
 Summary:       SDL binding for OCaml - development part
-Summary(pl):   Wi±zania SDL dla OCamla - cze¶æ programistyczna
+Summary(pl.UTF-8):     Wiązania SDL dla OCamla - część programistyczna
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 %requires_eq   ocaml
@@ -46,37 +62,89 @@ between the ML programming language and the SDL C library.
 This package contains files needed to develop OCaml programs using
 this library.
 
-%description devel -l pl
-OCamlSDL to próba napisania interfejsu programowego miêdzy jêzykiem
-programowania ML a bibliotek± C SDL.
+%description devel -l pl.UTF-8
+OCamlSDL to próba napisania interfejsu programowego między językiem
+programowania ML a biblioteką C SDL.
+
+Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
+używających tej biblioteki.
+
+%package apidocs
+Summary:       API documentation for OCaml SDL library
+Summary(pl.UTF-8):     Dokumentacja API biblioteki OCamla SDL
+Group:         Documentation
+BuildArch:     noarch
 
-Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
-u¿ywaj±cych tej biblioteki.
+%description apidocs
+API documentation for OCaml SDL library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki OCamla SDL.
 
 %prep
 %setup -q -n ocamlsdl-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
+cp -f /usr/share/automake/config.* support
+%{__aclocal} -I support
+%{__autoconf}
 %configure
-%{__make}
+%{__make} \
+       %{!?with_ocaml_opt:OCAMLOPT=}
+
+cd doc
+makeinfo --no-split ocamlsdl.texi
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
 
 %{__make} install \
-       OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+       OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
+       %{!?with_ocaml_opt:OCAMLOPT=}
+
+install -d $RPM_BUILD_ROOT%{_infodir}
+cp -p doc/ocamlsdl.info $RPM_BUILD_ROOT%{_infodir}
+
+# ocamlfind-specific, useless in rpm
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post  devel -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%postun        devel -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
+%doc AUTHORS NEWS README
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlstub.so
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlgfxstub.so
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlloaderstub.so
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlmixerstub.so
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlttfstub.so
+%dir %{_libdir}/ocaml/sdl
+%{_libdir}/ocaml/sdl/META
+%{_libdir}/ocaml/sdl/sdl*.cma
 
 %files devel
 %defattr(644,root,root,755)
-%doc README AUTHORS NEWS doc/html doc/ocaml*
-%dir %{_libdir}/ocaml/sdl
-%{_libdir}/ocaml/sdl/*
-%attr(755,root,root) %{_libdir}/ocaml/stublibs/*.owner
+%{_libdir}/ocaml/sdl/libsdl*.a
+%{_libdir}/ocaml/sdl/sdl*.cmi
+# doc?
+%{_libdir}/ocaml/sdl/sdl*.mli
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/sdl/sdl*.a
+%{_libdir}/ocaml/sdl/sdl*.cmx
+%{_libdir}/ocaml/sdl/sdl*.cmxa
+%endif
+%{_infodir}/ocamlsdl.info*
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html/*
This page took 0.094228 seconds and 4 git commands to generate.