# # Conditional build: %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) # not yet available on x32 (ocaml 4.02.1), update when upstream will support it %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 %undefine with_ocaml_opt %endif Summary: Cairo binding for OCaml Summary(pl.UTF-8): Wiązania Cairo dla OCamla Name: ocaml-cairo Version: 1.2.0 Release: 10 License: LGPL v2.1 Group: Libraries #Source0Download: http://cgit.freedesktop.org/cairo-ocaml/ Source0: http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-%{version}.tar.bz2 # Source0-md5: 5d0096328f210a6ed032fec68e1bc141 Patch0: %{name}-install.patch URL: http://cairographics.org/cairo-ocaml/ BuildRequires: autoconf >= 2.50 BuildRequires: automake BuildRequires: cairo-devel >= 1.2.0 BuildRequires: freetype-devel >= 2.0 BuildRequires: gtk+2-devel >= 2:2.8 BuildRequires: libsvg-cairo-devel BuildRequires: ocaml >= 3.04-7 BuildRequires: ocaml-lablgtk2-devel BuildRequires: pkgconfig %requires_eq ocaml-runtime Requires: cairo >= 1.2.0 Requires: ocaml-lablgtk2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description This package contains files needed to run OCaml bytecode executables using Cairo library. %description -l pl.UTF-8 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w OCamlu używających biblioteki Cairo. %package devel Summary: Cairo binding for OCaml - development part Summary(pl.UTF-8): Wiązania Cairo dla OCamla - cześć programistyczna Group: Development/Libraries Requires: %{name} = %{version}-%{release} %requires_eq ocaml %description devel This package contains files needed to develop OCaml programs using Cairo library. %description devel -l pl.UTF-8 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających biblioteki Cairo. %prep %setup -q -n cairo-ocaml-%{version} %patch0 -p1 %build %{__aclocal} -I support %{__autoconf} %configure %{!?with_ocaml_opt:%{__sed} -i -e 's/OCAMLOPT .*=.*/OCAMLOPT=/' config.make} %{__make} -j1 CC="%{__cc} %{rpmcflags} -fPIC" all %{__make} -j1 doc %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT cp -r test/{Makefile,*.ml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/cairo cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/cairo/META < $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/cairo-lablgtk/META < $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/pangocairo/META < $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/svgcairo/META <