X-Git-Url: http://git.pld-linux.org/?p=packages%2Focaml-SDL.git;a=blobdiff_plain;f=ocaml-SDL.spec;h=7302fc27d8072cb1c6debc7368d07862f0cf4716;hp=b692a55072b6dc17db6f796038a14626f913999c;hb=451016dc49c95172a6029f4158085739eb85a037;hpb=b741b82885739f6af8c020e67f75a70015c06a6b diff --git a/ocaml-SDL.spec b/ocaml-SDL.spec index b692a55..7302fc2 100644 --- a/ocaml-SDL.spec +++ b/ocaml-SDL.spec @@ -1,19 +1,31 @@ +# +# Conditional build: +%bcond_without ocaml_opt # skip building 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.1 -Release: 0.1 -License: GPL +Version: 0.9.1 +Release: 2 +License: LGPL v2+ Group: Libraries -Source0: http://dl.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz -# Source0-md5: 3829b20bd975e3bef5195a54e2cd04cb +Source0: http://downloads.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz +# Source0-md5: c3086423991fcdc1ba468afd52fc112b URL: http://ocamlsdl.sourceforge.net/ -BuildRequires: SDL-devel +BuildRequires: SDL-devel >= 1.2.0 +BuildRequires: SDL_image-devel BuildRequires: SDL_mixer-devel BuildRequires: SDL_ttf-devel -BuildRequires: SDLimage-devel -BuildRequires: glut-devel -BuildRequires: ocaml >= 3.07 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: ocaml >= %{ocaml_ver} +BuildRequires: ocaml-findlib +BuildRequires: ocaml-lablgl-devel %requires_eq ocaml-runtime BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -24,9 +36,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.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. + %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 - cześć programistyczna Group: Development/Libraries Requires: %{name} = %{version}-%{release} %requires_eq ocaml @@ -38,69 +57,59 @@ 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.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. + %prep -%setup -q -n ocamlsdl +%setup -q -n ocamlsdl-%{version} %build -%{__make} -C gl \ - CC="%{__cc}" \ - CFLAGS="%{rpmcflags} -fPIC" -%{__make} -C hgl \ - CC="%{__cc}" \ - CFLAGS="%{rpmcflags} -fPIC" -%{__make} -C glfw \ - CC="%{__cc}" \ - CFLAGS="%{rpmcflags} -fPIC" \ - X11LIBS="-L/usr/X11R6/%{_lib}" -%{__make} -C glut \ - CC="%{__cc}" \ - CFLAGS="%{rpmcflags} -fPIC" \ - X11LIBS="-L/usr/X11R6/%{_lib}" +cp -f /usr/share/automake/config.* support +%{__aclocal} -I support +%{__autoconf} +%configure +%{__make} \ + %{!?with_ocaml_opt:OCAMLOPT=} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{gl,stublibs} - -install lib/*.cm[ixa]* lib/*.a $RPM_BUILD_ROOT%{_libdir}/ocaml/gl -install lib/dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs - -install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -cp -r demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} - -install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlgl-gl -cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlgl-gl/META < $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlgl-$f/META <