From 0a2b1623e6a36aa83cd172960a448e59bb861f19 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Aug 07 2017 22:06:49 +0000 Subject: Build from git releases. - OCaml 4.05.0 rebuild. - Use ocaml_native_compiler instead of opt. - Do not disable debuginfo. --- diff --git a/.gitignore b/.gitignore index e411ca1..443135d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ camomile-0.7.2.tar.bz2 /camomile-0.8.1.tar.bz2 /camomile-0.8.3.tar.bz2 /camomile-0.8.5.tar.bz2 +/camomile-3f4d657d.tar.gz diff --git a/camomile-0.8.5-bytecode.patch b/camomile-0.8.5-bytecode.patch deleted file mode 100644 index 8aabe29..0000000 --- a/camomile-0.8.5-bytecode.patch +++ /dev/null @@ -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 - ################### diff --git a/ocaml-camomile.spec b/ocaml-camomile.spec index 2f99ea0..3014243 100644 --- a/ocaml-camomile.spec +++ b/ocaml-camomile.spec @@ -1,31 +1,31 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%if ! %opt -%global debug_package %{nil} -%endif +# Currently building git releases from +# https://github.com/yoriyuki/Camomile +%global commit 3f4d657d50c17213f3338ca75efb30d728704df3 +%global shortcommit 3f4d657d Name: ocaml-camomile -Version: 0.8.5 -Release: 25%{?dist} +Version: 0.8.6 +Release: 0.1.git%{shortcommit}%{?dist} Summary: Unicode library for OCaml # Several files are MIT and UCD licensed, but the overall work is LGPLv2+ # and the LGPL/GPL supercedes compatible licenses. # https://www.redhat.com/archives/fedora-legal-list/2008-March/msg00005.html License: LGPLv2+ -URL: http://sourceforge.net/projects/camomile/ -Source0: http://downloads.sourceforge.net/camomile/camomile-%{version}.tar.bz2 +URL: https://github.com/yoriyuki/Camomile +Source0: https://github.com/yoriyuki/Camomile/archive/%{commit}/camomile-%{shortcommit}.tar.gz # Use ocamlopt -g option to enable debuginfo. 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-findlib-devel BuildRequires: ocaml-ocamldoc 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 # to install the data files on their own to support other packages # that need the mappings, and some packages (eg. guestfs-browser) do @@ -60,13 +60,16 @@ applications that use %{name}. %prep -%setup -q -n camomile-%{version} +%setup -q -n Camomile-%{commit} +cd Camomile %patch1 -p1 -%patch2 -p1 + +autoconf %build +cd Camomile # Parallel builds don't work. unset MAKEFLAGS ./configure --prefix=%{_prefix} --datadir=%{_datadir} --libdir=%{_libdir} @@ -76,35 +79,36 @@ make man %install +cd Camomile 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} -make install prefix=$RPM_BUILD_ROOT%{_prefix} DATADIR=$RPM_BUILD_ROOT%{_datadir} -%if %opt +make install +%ifarch %{ocaml_native_compiler} cp tools/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %endif %files -%doc README +%doc Camomile/README %{_libdir}/ocaml/camomile -%if %opt +%ifarch %{ocaml_native_compiler} %exclude %{_libdir}/ocaml/camomile/*.a %exclude %{_libdir}/ocaml/camomile/*.cmxa %exclude %{_libdir}/ocaml/camomile/*.cmx %endif %exclude %{_libdir}/ocaml/camomile/*.mli -%if %opt +%ifarch %{ocaml_native_compiler} %{_bindir}/camomilecharmap %{_bindir}/camomilelocaledef %endif %files devel -%doc README dochtml/* -%if %opt +%doc Camomile/README Camomile/dochtml/* +%ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/camomile/*.a %{_libdir}/ocaml/camomile/*.cmxa %{_libdir}/ocaml/camomile/*.cmx @@ -113,16 +117,16 @@ cp tools/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef %files data -%doc README +%doc Camomile/README %{_datadir}/camomile/ %changelog -* Mon Aug 07 2017 Richard W.M. Jones - 0.8.5-25 -- Bump release and rebuild. - -* Mon Aug 07 2017 Richard W.M. Jones - 0.8.5-24 +* Mon Aug 07 2017 Richard W.M. Jones - 0.8.6-0.1 +- Build from git releases. - OCaml 4.05.0 rebuild. +- Use ocaml_native_compiler instead of opt. +- Do not disable debuginfo. * Thu Aug 03 2017 Fedora Release Engineering - 0.8.5-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index bc4cf20..5ee72d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1e25b6cd4efd26ab38a667db18d83f02 camomile-0.8.5.tar.bz2 +SHA512 (camomile-3f4d657d.tar.gz) = 32141ce1b1ab4d199092838a8fc57341a0c2fab395f4d6530d9e4e28a8dab6fcc85841149ec0f9e614606c78a305f5a1aa862124e447fd67597389b2370b5907