diff --git a/README.md b/README.md index fc5573c..c740282 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # ocaml-findlib +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. +The information in META includes version string, compiler options for using the library, and dependencies on other libraries. +Writing META files is straight-forward, and comes close to filling out a template. +The ocamlfind tool makes it very easy to use libraries from O'Caml programs. +Basically, ocamlfind is a compiler driver that interprets some additional command-line switches for selecting libraries. +It is also possible to use ocamlfind as query tool to extract data from the library base. +After years of development, Findlib is now the de-facto standard for library management in O'Caml. +A lot of free software for O'Caml now requires that Findlib is available on the system. +Distributions like GODI and Debian ensure that all libraries come with META files. + diff --git a/ocaml-findlib.spec b/ocaml-findlib.spec new file mode 100644 index 0000000..a6bf77f --- /dev/null +++ b/ocaml-findlib.spec @@ -0,0 +1,127 @@ +%global __os_install_post %{nil} + +Name: ocaml-findlib +Version: 1.4.1 +Release: 1mamba +Summary: A library manager for OCaml +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://projects.camlcity.org/projects/findlib.html +Source: http://download.camlcity.org/download/findlib-%{version}.tar.gz +License: MIT +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildRequires: ocaml >= 4.00.1 +BuildRequires: ocaml-labltk >= 4.00.1 +%if "%{stage1}" != "1" +BuildRequires: ocaml-pcre +%endif +Requires: ocaml +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%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. +The information in META includes version string, compiler options for using the library, and dependencies on other libraries. +Writing META files is straight-forward, and comes close to filling out a template. +The ocamlfind tool makes it very easy to use libraries from O'Caml programs. +Basically, ocamlfind is a compiler driver that interprets some additional command-line switches for selecting libraries. +It is also possible to use ocamlfind as query tool to extract data from the library base. +After years of development, Findlib is now the de-facto standard for library management in O'Caml. +A lot of free software for O'Caml now requires that Findlib is available on the system. +Distributions like GODI and Debian ensure that all libraries come with META files. + +%package devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: ocaml-labltk >= 4.00.1 + +%description devel +This package contains libraries and header files for developing applications that use %{name}. + +%prep +%setup -q -n findlib-%{version} + +%build +# note: -with-toolbox requires %{_bindir}/ocamlopt +./configure \ + -bindir %{_bindir} \ + -mandir %{_mandir} \ + -sitelib `ocamlc -where` \ + -with-toolbox \ + -config %{_sysconfdir}/ocaml/findlib.conf + +%make +%make opt + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeoldinstall prefix=%{buildroot} + +cp src/findlib/ocamlfind %{buildroot}%{_bindir}/ocamlfind + +# prevent prelink from stripping ocamlfind +mkdir -p %{buildroot}%{_sysconfdir}/prelink.conf.d +echo "-b %{_bindir}/ocamlfind" \ + > %{buildroot}%{_sysconfdir}/prelink.conf.d/ocaml-ocamlfind.conf + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%attr(0555,root,root) %{_bindir}/ocamlfind +%attr(0555,root,root) %{_bindir}/safe_camlp4 +%{_libdir}/ocaml/*/META +%dir %{_libdir}/ocaml/findlib +%dir %{_libdir}/ocaml/topfind +%{_libdir}/ocaml/findlib/*.cma +%{_libdir}/ocaml/findlib/*.cmi +%{_libdir}/ocaml/num-top/*.cma +%{_libdir}/ocaml/num-top/*.cmi +%{_mandir}/man1/ocamlfind.* +%{_mandir}/man5/META.* +%{_mandir}/man5/findlib.conf.* +%{_mandir}/man5/site-lib.* +%config %{_sysconfdir}/ocaml/findlib.conf +%config(noreplace) %{_sysconfdir}/prelink.conf.d/ocaml-ocamlfind.conf +%doc LICENSE + +%files devel +%defattr(-,root,root,-) +%doc LICENSE doc/README doc/guide-html +%{_libdir}/ocaml/findlib/*.a +%{_libdir}/ocaml/findlib/*.cmxa +%{_libdir}/ocaml/findlib/*.mli +%{_libdir}/ocaml/findlib/Makefile.config +%{_libdir}/ocaml/findlib/make_wizard +%{_libdir}/ocaml/findlib/make_wizard.pattern + +%changelog +* Tue Mar 04 2014 Automatic Build System 1.4.1-1mamba +- automatic update by autodist + +* Sun Jun 23 2013 openmamba WebBuild System 1.4-2mamba +- add missing build requirement and requirement for ocaml-labltk + +* Tue Jun 18 2013 openmamba WebBuild System 1.4-1mamba +- update to 1.4 + +* Wed Jan 23 2013 Silvan Calarco 1.3.3-3mamba +- also avoid prelinking of safe_camlp4 + +* Sun Oct 14 2012 Silvan Calarco 1.3.3-2mamba +- fix ocamlfind owner + +* Wed Aug 15 2012 Automatic Build System 1.3.3-1mamba +- automatic version update by autodist + +* Sun Jun 17 2012 Silvan Calarco 1.3.2-2mamba +- fix ocamlfind permissions to avoid prelink which seems to causes it not to work + +* Sat Jun 16 2012 Silvan Calarco 1.3.2-1mamba +- package created by autospec