X-Git-Url: http://git.pld-linux.org/?p=packages%2Focaml-findlib.git;a=blobdiff_plain;f=ocaml-findlib.spec;h=505f5b43ac7ba0c6919de5a4931ea0765bda1496;hp=a67c3932577a8ce339791af1330f8539b113505a;hb=7daadaa;hpb=d17c97606c302d717bed853c912feae01e00328c diff --git a/ocaml-findlib.spec b/ocaml-findlib.spec index a67c393..505f5b4 100644 --- a/ocaml-findlib.spec +++ b/ocaml-findlib.spec @@ -1,26 +1,38 @@ -%define ocaml_ver 1:3.09.2 +# +# Conditional build: +%bcond_without ocaml_opt # build opt + +%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 +%undefine with_ocaml_opt +%endif + +%define ocaml_ver 1:4.02 Summary: OCaml module manager Summary(pl.UTF-8): Zarządca modułów OCamla Name: ocaml-findlib -Version: 1.5.1 -Release: 1 +Version: 1.5.5 +Release: 9 License: distributable Group: Development/Tools Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz -# Source0-md5: 6bf0d0da66104bc8bdcb3018bd13a202 -Patch0: %{name}-destdir.patch -Patch1: %{name}-bytes.patch +# Source0-md5: 703eae112f9e912507c3a2f8d8c48498 +Patch0: %{name}-bytes.patch URL: http://www.ocaml-programming.de/packages/ BuildRequires: m4 BuildRequires: ncurses-devel BuildRequires: ocaml >= %{ocaml_ver} -BuildRequires: ocaml-bytes-devel BuildRequires: ocaml-camlp4 BuildRequires: ocaml-labltk-devel BuildRequires: sed >= 4.0 %requires_eq ocaml BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%if %{without ocaml_opt} +%define no_install_post_strip 1 +# debug package strips binaries which renders ocamlfind broken +%define _enable_debug_packages 0 +%endif + %description The "findlib" library provides a scheme to manage reusable software components (packages), and includes tools that support this scheme. @@ -38,7 +50,6 @@ Summary: OCaml module manager Summary(pl.UTF-8): Zarządca modułów OCamla Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: ocaml-bytes-devel %description devel The "findlib" library provides a scheme to manage reusable software @@ -59,7 +70,6 @@ Ten pakiet zawiera biblioteki i skompilowane interfejsy findliba. %prep %setup -q -n findlib-%{version} %patch0 -p1 -%patch1 -p1 %build ./configure \ @@ -70,7 +80,7 @@ Ten pakiet zawiera biblioteki i skompilowane interfejsy findliba. sed -i -e 's/-g//' Makefile -%{__make} -j1 all opt +%{__make} -j1 all %{?with_ocaml_opt:opt} %install rm -rf $RPM_BUILD_ROOT @@ -80,8 +90,10 @@ rm -rf $RPM_BUILD_ROOT %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib/*.mli -# fake, the real one is already provided by ocaml-bytes -%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/bytes/META +# now provided by ocaml-labltk.spec (might not exist if building without ocaml-labltk installed) +%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/labltk +# now provided by ocaml-dbm.spec (might not exist if building without ocaml-dbm installed) +%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/dbm # in PLD only META files are stored in site-lib/pkg sed -i -e 's|/site-lib||' $RPM_BUILD_ROOT%{_libdir}/ocaml/topfind @@ -122,11 +134,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/site-lib/stublibs # META files for base ocaml packages %{_libdir}/ocaml/site-lib/bigarray -%{_libdir}/ocaml/site-lib/camlp4 -%{_libdir}/ocaml/site-lib/dbm +%{_libdir}/ocaml/site-lib/bytes +%{_libdir}/ocaml/site-lib/compiler-libs %{_libdir}/ocaml/site-lib/dynlink %{_libdir}/ocaml/site-lib/graphics -%{_libdir}/ocaml/site-lib/labltk %{_libdir}/ocaml/site-lib/num %{_libdir}/ocaml/site-lib/num-top %{_libdir}/ocaml/site-lib/ocamlbuild @@ -134,6 +145,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/site-lib/str %{_libdir}/ocaml/site-lib/threads %{_libdir}/ocaml/site-lib/unix +# camlp4 4.02 doesn't provide its META itself +%{_libdir}/ocaml/site-lib/camlp4 %{_mandir}/man1/ocamlfind.1* %{_mandir}/man5/META.5* %{_mandir}/man5/findlib.conf.5* @@ -142,8 +155,13 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(644,root,root,755) %{_libdir}/ocaml/findlib/Makefile.config -%{_libdir}/ocaml/findlib/*.cm[ixa]* -%{_libdir}/ocaml/findlib/*.a +%{_libdir}/ocaml/findlib/*.cm[xi] +%{_libdir}/ocaml/findlib/*.cma +%if %{with ocaml_opt} +%{_libdir}/ocaml/findlib/*.[ao] +%{_libdir}/ocaml/findlib/*.cmxa +%{_libdir}/ocaml/findlib/*.cmxs +%endif %dir %{_libdir}/ocaml/num-top %{_libdir}/ocaml/num-top/*.cm[ia] %{_libdir}/ocaml/ocamlfind