From 26de232b0fe8728e03b22b7df11d0237dd732c10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 23 Nov 2013 20:41:30 +0200 Subject: [PATCH] new, version 0.5.3 created from fedora ocaml-curl package b10381aa955298194dbfeecee21707acb8ed054f --- ocaml-ocurl.spec | 94 +++++++++++++++++++++++++++++++++ ocurl-0.5.3-include-o-cmx.patch | 12 +++++ 2 files changed, 106 insertions(+) create mode 100644 ocaml-ocurl.spec create mode 100644 ocurl-0.5.3-include-o-cmx.patch diff --git a/ocaml-ocurl.spec b/ocaml-ocurl.spec new file mode 100644 index 0000000..78b99d0 --- /dev/null +++ b/ocaml-ocurl.spec @@ -0,0 +1,94 @@ +# +# Conditional build: +%bcond_without opt # build opt + +%define debug_package %{nil} +Summary: OCaml Curl library (ocurl) +Name: ocaml-curl +Version: 0.5.3 +Release: 0.1 +License: MIT +Group: Libraries +Source0: http://downloads.sourceforge.net/ocurl/ocurl-%{version}.tgz +Patch1: ocurl-0.5.3-include-o-cmx.patch +URL: http://sourceforge.net/projects/ocurl +BuildRequires: curl-devel >= 7.12.0 +BuildRequires: gawk +BuildRequires: ocaml >= 3.10.0-7 +BuildRequires: ocaml-findlib-devel +ExcludeArch: sparc64 s390 s390x +# Explicitly require Curl (fixes #711261). Since ocaml-curl uses +# -custom rather than ocamlmklib, automatic detection is infeasible. +Requires: curl-devel >= 7.12.0 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +The Ocaml Curl Library (Ocurl) is an interface library for the +programming language Ocaml to the networking library libcurl. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%setup -qc +mv ocurl/* . +%patch1 -p1 + +# Files in the archive have spurious +x mode. +find -type f | xargs chmod 0644 +chmod 0755 configure install-sh + +%build +%configure \ + --with-findlib + +%{__make} -j1 all \ +%if %{with opt} + OCBYTE="ocamlc.opt -g" \ + OCOPT="ocamlopt.opt -g" +%endif + +%install +rm -rf $RPM_BUILD_ROOT +export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +# Install curl.mli +cp -p curl.mli $OCAMLFIND_DESTDIR/curl + +# Make clean in the examples dir so our docs don't contain binaries. +%{__make} -C examples clean + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc COPYING +%{_libdir}/ocaml/curl +%if %{with 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(644,root,root,755) +%doc examples/* +%if %{with opt} +%{_libdir}/ocaml/curl/*.a +%{_libdir}/ocaml/curl/*.o +%{_libdir}/ocaml/curl/*.cmx +%{_libdir}/ocaml/curl/*.cmxa +%endif +%{_libdir}/ocaml/curl/*.mli 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) -- 2.44.0