Build from git releases.

- OCaml 4.05.0 rebuild.
- Use ocaml_native_compiler instead of opt.
- Do not disable debuginfo.
This commit is contained in:
Richard W.M. Jones 2017-08-07 22:54:35 +01:00
parent 447d19a040
commit 0a2b1623e6
4 changed files with 31 additions and 37 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ camomile-0.7.2.tar.bz2
/camomile-0.8.1.tar.bz2 /camomile-0.8.1.tar.bz2
/camomile-0.8.3.tar.bz2 /camomile-0.8.3.tar.bz2
/camomile-0.8.5.tar.bz2 /camomile-0.8.5.tar.bz2
/camomile-3f4d657d.tar.gz

View File

@ -1,11 +0,0 @@
--- camomile-0.8.5/Makefile.in.orig 2015-07-21 14:28:26.837692955 +0100
+++ camomile-0.8.5/Makefile.in 2015-07-21 14:28:47.560716204 +0100
@@ -70,7 +70,7 @@
# Generic targets
#################
-all : byte $(OCAMLBEST) opt unidata unimaps charmap_data locale_data
+all : byte $(OCAMLBEST) unidata unimaps charmap_data locale_data
# Build the library
###################

View File

@ -1,31 +1,31 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) # Currently building git releases from
%if ! %opt # https://github.com/yoriyuki/Camomile
%global debug_package %{nil} %global commit 3f4d657d50c17213f3338ca75efb30d728704df3
%endif %global shortcommit 3f4d657d
Name: ocaml-camomile Name: ocaml-camomile
Version: 0.8.5 Version: 0.8.6
Release: 25%{?dist} Release: 0.1.git%{shortcommit}%{?dist}
Summary: Unicode library for OCaml Summary: Unicode library for OCaml
# Several files are MIT and UCD licensed, but the overall work is LGPLv2+ # Several files are MIT and UCD licensed, but the overall work is LGPLv2+
# and the LGPL/GPL supercedes compatible licenses. # and the LGPL/GPL supercedes compatible licenses.
# https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html # https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html
License: LGPLv2+ License: LGPLv2+
URL: http://sourceforge.net/projects/camomile/ URL: https://github.com/yoriyuki/Camomile
Source0: http://downloads.sourceforge.net/camomile/camomile-%{version}.tar.bz2 Source0: https://github.com/yoriyuki/Camomile/archive/%{commit}/camomile-%{shortcommit}.tar.gz
# Use ocamlopt -g option to enable debuginfo. # Use ocamlopt -g option to enable debuginfo.
Patch1: camomile-0.8.3-enable-debug.patch Patch1: camomile-0.8.3-enable-debug.patch
# Don't compile native code when ocamlopt not detected.
Patch2: camomile-0.8.5-bytecode.patch
BuildRequires: ocaml >= 3.12.1-12 BuildRequires: ocaml >= 3.12.1-12
BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-camlp4-devel
# While we are building from git pre-releases we must run autoconf.
BuildRequires: autoconf
# The base package requires the data files. Note that it is possible # The base package requires the data files. Note that it is possible
# to install the data files on their own to support other packages # to install the data files on their own to support other packages
# that need the mappings, and some packages (eg. guestfs-browser) do # that need the mappings, and some packages (eg. guestfs-browser) do
@ -60,13 +60,16 @@ applications that use %{name}.
%prep %prep
%setup -q -n camomile-%{version} %setup -q -n Camomile-%{commit}
cd Camomile
%patch1 -p1 %patch1 -p1
%patch2 -p1
autoconf
%build %build
cd Camomile
# Parallel builds don't work. # Parallel builds don't work.
unset MAKEFLAGS unset MAKEFLAGS
./configure --prefix=%{_prefix} --datadir=%{_datadir} --libdir=%{_libdir} ./configure --prefix=%{_prefix} --datadir=%{_datadir} --libdir=%{_libdir}
@ -76,35 +79,36 @@ make man
%install %install
cd Camomile
export DESTDIR=$RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_bindir}
make install prefix=$RPM_BUILD_ROOT%{_prefix} DATADIR=$RPM_BUILD_ROOT%{_datadir} make install
%if %opt %ifarch %{ocaml_native_compiler}
cp tools/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap cp tools/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap
cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef
%endif %endif
%files %files
%doc README %doc Camomile/README
%{_libdir}/ocaml/camomile %{_libdir}/ocaml/camomile
%if %opt %ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/camomile/*.a %exclude %{_libdir}/ocaml/camomile/*.a
%exclude %{_libdir}/ocaml/camomile/*.cmxa %exclude %{_libdir}/ocaml/camomile/*.cmxa
%exclude %{_libdir}/ocaml/camomile/*.cmx %exclude %{_libdir}/ocaml/camomile/*.cmx
%endif %endif
%exclude %{_libdir}/ocaml/camomile/*.mli %exclude %{_libdir}/ocaml/camomile/*.mli
%if %opt %ifarch %{ocaml_native_compiler}
%{_bindir}/camomilecharmap %{_bindir}/camomilecharmap
%{_bindir}/camomilelocaledef %{_bindir}/camomilelocaledef
%endif %endif
%files devel %files devel
%doc README dochtml/* %doc Camomile/README Camomile/dochtml/*
%if %opt %ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/camomile/*.a %{_libdir}/ocaml/camomile/*.a
%{_libdir}/ocaml/camomile/*.cmxa %{_libdir}/ocaml/camomile/*.cmxa
%{_libdir}/ocaml/camomile/*.cmx %{_libdir}/ocaml/camomile/*.cmx
@ -113,16 +117,16 @@ cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef
%files data %files data
%doc README %doc Camomile/README
%{_datadir}/camomile/ %{_datadir}/camomile/
%changelog %changelog
* Mon Aug 07 2017 Richard W.M. Jones <rjones@redhat.com> - 0.8.5-25 * Mon Aug 07 2017 Richard W.M. Jones <rjones@redhat.com> - 0.8.6-0.1
- Bump release and rebuild. - Build from git releases.
* Mon Aug 07 2017 Richard W.M. Jones <rjones@redhat.com> - 0.8.5-24
- OCaml 4.05.0 rebuild. - OCaml 4.05.0 rebuild.
- Use ocaml_native_compiler instead of opt.
- Do not disable debuginfo.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-23 * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

View File

@ -1 +1 @@
1e25b6cd4efd26ab38a667db18d83f02 camomile-0.8.5.tar.bz2 SHA512 (camomile-3f4d657d.tar.gz) = 32141ce1b1ab4d199092838a8fc57341a0c2fab395f4d6530d9e4e28a8dab6fcc85841149ec0f9e614606c78a305f5a1aa862124e447fd67597389b2370b5907