ocaml-findlib/ocaml-findlib.spec

173 lines
6.0 KiB
RPMSpec
Raw Normal View History

%global __os_install_post %{nil}
Name: ocaml-findlib
Version: 1.8.1
Release: 3mamba
Summary: A library manager for OCaml
Group: Development/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://projects.camlcity.org/projects/findlib.html
Source: http://download.camlcity.org/download/findlib-%{version}.tar.gz
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
BuildRequires: ocaml >= 4.09.0-4mamba
BuildRequires: ocaml-labltk >= 8.06.5
%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 \
-no-camlp4
%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
rm -f %{buildroot}%{_libdir}/ocaml/ocamlbuild/META
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%attr(0555,root,root) %{_bindir}/ocamlfind
%{_libdir}/ocaml/*/META
%dir %{_libdir}/ocaml/findlib
%{_libdir}/ocaml/topfind
%{_libdir}/ocaml/findlib/*.cma
%{_libdir}/ocaml/findlib/*.cmi
%{_libdir}/ocaml/findlib/*.cmxs
#%{_libdir}/ocaml/bytes/*.cma
#%{_libdir}/ocaml/bytes/*.cmi
#%{_libdir}/ocaml/bytes/*.cmx
#%{_libdir}/ocaml/bytes/*.cmxs
#%{_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,-)
%{_libdir}/ocaml/findlib/*.a
%{_libdir}/ocaml/findlib/*.cmxa
%{_libdir}/ocaml/findlib/*.mli
#%{_libdir}/ocaml/bytes/*.a
#%{_libdir}/ocaml/bytes/*.cmxa
%{_libdir}/ocaml/findlib/Makefile.config
%ifnarch x86_64
%{_libdir}/ocaml/findlib/make_wizard
%{_libdir}/ocaml/findlib/make_wizard.pattern
%endif
#%doc LICENSE doc/README doc/guide-html
%changelog
* Mon Dec 30 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.1-3mamba
- rebuilt with ocaml 4.09.0-4mamba
* Mon Dec 30 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.1-2mamba
- rebuilt with ocaml 4.09.0
* Wed Aug 14 2019 Automatic Build System <autodist@mambasoft.it> 1.8.1-1mamba
- automatic version update by autodist
* Sat Apr 27 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.0-2mamba
- added option -no-camlp4 to fix META file conflict with camlp4
* Tue Jun 05 2018 Automatic Build System <autodist@mambasoft.it> 1.8.0-1mamba
- automatic version update by autodist
* Mon Aug 07 2017 Automatic Build System <autodist@mambasoft.it> 1.7.3-1mamba
- automatic version update by autodist
* Sun Nov 27 2016 Automatic Build System <autodist@mambasoft.it> 1.7.1-1mamba
- automatic version update by autodist
* Tue Nov 22 2016 Automatic Build System <autodist@mambasoft.it> 1.6.3-1mamba
- automatic version update by autodist
* Tue Apr 19 2016 Automatic Build System <autodist@mambasoft.it> 1.6.2-1mamba
- automatic version update by autodist
* Wed Nov 19 2014 Automatic Build System <autodist@mambasoft.it> 1.5.5-1mamba
- automatic update by autodist
* Fri Nov 14 2014 Automatic Build System <autodist@mambasoft.it> 1.5.3-1mamba
- automatic version update by autodist
* Tue Mar 04 2014 Automatic Build System <autodist@mambasoft.it> 1.4.1-1mamba
- automatic update by autodist
* Sun Jun 23 2013 openmamba WebBuild System <webbuild@openmamba.org> 1.4-2mamba
- add missing build requirement and requirement for ocaml-labltk
* Tue Jun 18 2013 openmamba WebBuild System <webbuild@openmamba.org> 1.4-1mamba
- update to 1.4
* Wed Jan 23 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3.3-3mamba
- also avoid prelinking of safe_camlp4
* Sun Oct 14 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3.3-2mamba
- fix ocamlfind owner
* Wed Aug 15 2012 Automatic Build System <autodist@mambasoft.it> 1.3.3-1mamba
- automatic version update by autodist
* Sun Jun 17 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3.2-2mamba
- fix ocamlfind permissions to avoid prelink which seems to causes it not to work
* Sat Jun 16 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3.2-1mamba
- package created by autospec