[ocaml-curl] Rebuild for OCaml 4.01.0.
Richard W.M. Jones
rjones at fedoraproject.org
Sat Sep 14 16:55:14 UTC 2013
commit b10381aa955298194dbfeecee21707acb8ed054f
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Sep 14 17:46:52 2013 +0100
Rebuild for OCaml 4.01.0.
- Debuginfo does not work for this package.
- Include *.cmx & *.o files in -devel package (for inlining).
- Modernize the spec file.
ocaml-curl.spec | 45 ++++++++++++++++++++++++--------------
ocurl-0.5.3-include-o-cmx.patch | 12 ++++++++++
2 files changed, 40 insertions(+), 17 deletions(-)
---
diff --git a/ocaml-curl.spec b/ocaml-curl.spec
index ef00755..758c258 100644
--- a/ocaml-curl.spec
+++ b/ocaml-curl.spec
@@ -1,16 +1,17 @@
-%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
-%define debug_package %{nil}
+%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
+%global debug_package %{nil}
Name: ocaml-curl
Version: 0.5.3
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: OCaml Curl library (ocurl)
-
-Group: Development/Libraries
License: MIT
+
URL: http://sourceforge.net/projects/ocurl
Source0: http://downloads.sourceforge.net/ocurl/ocurl-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Patch1: ocurl-0.5.3-include-o-cmx.patch
+
ExcludeArch: sparc64 s390 s390x
BuildRequires: ocaml >= 3.10.0-7
@@ -21,9 +22,6 @@ BuildRequires: gawk
# -custom rather than ocamlmklib, automatic detection is infeasible.
Requires: curl-devel >= 7.12.0
-%define _use_internal_dependency_generator 0
-%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
-%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%description
The Ocaml Curl Library (Ocurl) is an interface library for the
@@ -43,6 +41,7 @@ developing applications that use %{name}.
%prep
%setup -q -n ocurl
+%patch1 -p1
# Files in the archive have spurious +x mode.
find -type f | xargs chmod 0644
@@ -50,12 +49,20 @@ chmod 0755 configure install-sh
%build
+# Parallel builds don't work.
+unset MAKEFLAGS
+
%configure --libdir=%{_libdir} --with-findlib
-make all
+make all \
+%if %opt
+ OCBYTE="ocamlc.opt -g" \
+ OCOPT="ocamlopt.opt -g"
+%else
+
+%endif
%install
-rm -rf $RPM_BUILD_ROOT
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
@@ -68,32 +75,36 @@ cp curl.mli $OCAMLFIND_DESTDIR/curl
make -C examples clean
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%files
-%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/ocaml/curl
%if %opt
%exclude %{_libdir}/ocaml/curl/*.a
+%exclude %{_libdir}/ocaml/curl/*.o
+%exclude %{_libdir}/ocaml/curl/*.cmx
%exclude %{_libdir}/ocaml/curl/*.cmxa
%endif
%exclude %{_libdir}/ocaml/curl/*.mli
%files devel
-%defattr(-,root,root,-)
%doc examples/*
%if %opt
%{_libdir}/ocaml/curl/*.a
+%{_libdir}/ocaml/curl/*.o
+%{_libdir}/ocaml/curl/*.cmx
%{_libdir}/ocaml/curl/*.cmxa
%endif
%{_libdir}/ocaml/curl/*.mli
%changelog
+* Sat Sep 14 2013 Richard W.M. Jones <rjones at redhat.com> - 0.5.3-10
+- Rebuild for OCaml 4.01.0.
+- Debuginfo does not work for this package.
+- Include *.cmx & *.o files in -devel package (for inlining).
+- Modernize the spec file.
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/ocurl-0.5.3-include-o-cmx.patch b/ocurl-0.5.3-include-o-cmx.patch
new file mode 100644
index 0000000..b638104
--- /dev/null
+++ b/ocurl-0.5.3-include-o-cmx.patch
@@ -0,0 +1,12 @@
+--- ocurl.old/Makefile.in 2009-11-07 21:05:52.000000000 +0000
++++ ocurl/Makefile.in 2013-09-14 17:52:00.063133507 +0100
+@@ -70,7 +70,8 @@
+ install:
+ ifeq ($(FINDLIB),ocamlfind)
+ ocamlfind install curl META $(wildcard *.cmi) \
+- $(wildcard *.a) $(wildcard *.cma) $(wildcard *.cmxa)
++ $(wildcard *.a) $(wildcard *.cma) $(wildcard *.cmxa) \
++ $(wildcard *.o) $(wildcard *.cmx)
+ else
+ mkdir -p $(INSTALLDIR)
+ $(INSTALLDATA) curl.cma $(INSTALLDIR)
More information about the scm-commits
mailing list