Use jbuilder --profile release to disable warn-error.
Use jbuilder install instead of hand-installing. Use %doc and %license. Remove some binaries which are no longer installed.
This commit is contained in:
parent
393497fc9e
commit
6ed96a0047
@ -1,3 +1,6 @@
|
||||
# FIXME: Broken in 1.0.1 for unknown reasons.
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: ocaml-camomile
|
||||
Version: 1.0.1
|
||||
Release: 3%{?dist}
|
||||
@ -59,30 +62,30 @@ applications that use %{name}.
|
||||
ulimit -Hs 65536
|
||||
ulimit -Ss 65536
|
||||
%endif
|
||||
jbuilder build --verbose
|
||||
jbuilder build --verbose --profile release
|
||||
|
||||
|
||||
%install
|
||||
# We have to do this by hand because jbuilder doesn't work.
|
||||
export DESTDIR=$RPM_BUILD_ROOT
|
||||
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}
|
||||
ocamlfind install camomile _build/install/default/lib/camomile/*
|
||||
cp -r -L _build/install/default/share/camomile $RPM_BUILD_ROOT%{_datadir}
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
cp _build/default/Camomile/tools/camomilecharmap.exe $RPM_BUILD_ROOT%{_bindir}/camomilecharmap
|
||||
cp _build/default/Camomile/tools/camomilelocaledef.exe $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef
|
||||
%endif
|
||||
jbuilder install \
|
||||
--destdir=%{buildroot} \
|
||||
--libdir=%{_libdir}/ocaml \
|
||||
--verbose \
|
||||
--profile release
|
||||
|
||||
# Remove /usr/doc because we will use %%doc rules instead.
|
||||
rm -rf %{buildroot}/usr/doc
|
||||
|
||||
# Install the *.mli files by hand.
|
||||
cp _build/install/default/lib/camomile/library/*.mli %{buildroot}%{_libdir}/ocaml/camomile/
|
||||
|
||||
|
||||
%check
|
||||
jbuilder runtest
|
||||
jbuilder runtest --profile release
|
||||
|
||||
|
||||
%files
|
||||
%doc README
|
||||
%doc README.md CHANGES.md
|
||||
%license LICENSE.md
|
||||
%{_libdir}/ocaml/camomile
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%exclude %{_libdir}/ocaml/camomile/*.a
|
||||
@ -91,13 +94,11 @@ jbuilder runtest
|
||||
%endif
|
||||
%exclude %{_libdir}/ocaml/camomile/*.mli
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_bindir}/camomilecharmap
|
||||
%{_bindir}/camomilelocaledef
|
||||
%endif
|
||||
|
||||
|
||||
%files devel
|
||||
%doc README web/dochtml/*
|
||||
%license LICENSE.md
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/camomile/*.a
|
||||
%{_libdir}/ocaml/camomile/*.cmxa
|
||||
@ -107,13 +108,16 @@ jbuilder runtest
|
||||
|
||||
|
||||
%files data
|
||||
%doc README
|
||||
%license LICENSE.md
|
||||
%{_datadir}/camomile/
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Apr 29 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-3
|
||||
- Bump release and rebuild.
|
||||
* Tue Apr 30 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-3
|
||||
- Use jbuilder --profile release to disable warn-error.
|
||||
- Use jbuilder install instead of hand-installing.
|
||||
- Use %%doc and %%license.
|
||||
- Remove some binaries which are no longer installed.
|
||||
|
||||
* Mon Apr 29 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-2
|
||||
- OCaml 4.08.0 (beta 3) rebuild.
|
||||
|
Loading…
Reference in New Issue
Block a user