SHA256
1
0
forked from pool/ocaml-cppo
Olaf Hering 2016-05-25 09:32:10 +00:00 committed by Git OBS Bridge
parent 3e97df42bb
commit 6c67a51b1e

View File

@ -28,7 +28,7 @@ BuildRequires: ocaml
BuildRequires: ocaml-easy-format
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml(ocaml.opt)
BuildRequires: ocaml-rpm-macros >= 4.02.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# ocaml autodep start for pkg: ocaml-cppo
# hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() provides/requires
@ -50,11 +50,22 @@ The implementation of cppo relies on the standard library of OCaml and on the
standard parsing tools Ocamllex and Ocamlyacc, which contribute to the
robustness of cppo across OCaml versions.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%setup -qn cppo-%{version}
%build
make
make BEST=byte all ocamlbuild
%if %{ocaml_native_compiler}
make BEST=opt opt ocamlbuild
%endif
%install
export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir)
@ -64,6 +75,22 @@ make install BINDIR="%{buildroot}%{_bindir}"
%files
%defattr(-,root,root)
%doc Changes LICENSE README.md
%{_bindir}/cppo
%{_libdir}/ocaml/cppo_ocamlbuild
%{_bindir}/*
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%if %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.cmxs
%endif
%files devel
%defattr(-,root,root,-)
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%{_libdir}/ocaml/*/*.a
%if %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.cmxa
%endif
%{_libdir}/ocaml/*/*.cma
%{_libdir}/ocaml/*/*.cmi
%{_libdir}/ocaml/*/META