# # spec file for package ocaml-findlib # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2010-2011 Andrew Psaltis # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: ocaml-findlib Version: 1.8.1 Release: 0 %{?ocaml_preserve_bytecode} Summary: Objective CAML package manager and build helper License: MIT Group: Development/Languages/OCaml Url: http://projects.camlcity.org/projects/findlib.html Source0: findlib-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build # Requires: ocaml-compiler-libs Requires: ocaml-runtime # Provides: ocamlfind = %{version} BuildRequires: gawk BuildRequires: m4 BuildRequires: ncurses-devel BuildRequires: ocaml >= 4.02.0 BuildRequires: ocaml-camlp4-devel >= 4.02.0 BuildRequires: ocaml-ocamlbuild BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-rpm-macros >= 4.02.1 %description Findlib is a library manager for Objective Caml. It provides a convention how to store libraries, and a file format ("META") to describe the properties of libraries. There is also a tool (ocamlfind) for interpreting the META files, so that it is very easy to use libraries in programs and scripts. %package devel Summary: Development files for ocaml-findlib Group: Development/Languages/OCaml Requires: %{name} = %{version} Provides: %{name}-camlp4 = %{version}-%{release} Obsoletes: %{name}-camlp4 < %{version}-%{release} %description devel The ocaml-findlib-devel package contains libraries and signature files for developing applications that use ocaml-findlib. %prep %setup -q -n findlib-%{version} %build (cd tools/extract_args && make) tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmktop ocamlopt ocamldep ocamldoc ||: ./configure -config %{_libdir}/ocaml/ocamlfind.conf \ -bindir %{_bindir} \ -sitelib `ocamlc -where` \ -mandir %{_mandir} \ -with-toolbox make all %if 0%{?ocaml_native_compiler} make opt %endif rm doc/guide-html/TIMESTAMP %install make install prefix=$RPM_BUILD_ROOT rm -rfv $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild > files > files.devel find $RPM_BUILD_ROOT%{_libdir}/ocaml -name META | \ sed 's@^%{buildroot}@@' | \ tee -a files find $RPM_BUILD_ROOT%{_libdir}/ocaml -type d | \ sed 's@^%{buildroot}@%%dir @' | \ tee -a files sed -i~ '/\/\(camlp4\|findlib\|num-top\)/{ w files.devel d }' files diff -u "$_"~ "$_" && exit 2 cat files.devel %files -f files %doc doc/README %license LICENSE %{_libdir}/ocaml/ocamlfind.conf %{_bindir}/* %{_mandir}/man?/* # %{_libdir}/ocaml/topfind %if 0%{?ocaml_native_compiler} %{_libdir}/ocaml/*/*.cmxs %endif %files devel -f files.devel %doc doc/README doc/guide-html %{_libdir}/ocaml/*/Makefile.config # %dir %{_libdir}/ocaml %if 0%{?ocaml_native_compiler} %{_libdir}/ocaml/*/*.a %{_libdir}/ocaml/*/*.cmxa %endif %{_libdir}/ocaml/*/*.cma %{_libdir}/ocaml/*/*.cmi %{_libdir}/ocaml/*/*.mli %changelog