[packages/ocaml-dune] - new

baggins baggins at pld-linux.org
Sat Nov 24 15:35:20 CET 2018


commit d5b28b2d9ca8deb21d4887eb964dfc2646ada41f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Nov 24 15:35:00 2018 +0100

    - new

 mandir.patch    | 11 +++++++++++
 ocaml-dune.spec | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)
---
diff --git a/ocaml-dune.spec b/ocaml-dune.spec
new file mode 100644
index 0000000..d42684a
--- /dev/null
+++ b/ocaml-dune.spec
@@ -0,0 +1,61 @@
+#
+# Conditional build:
+%bcond_without	ocaml_opt	# skip building native optimized binaries (bytecode is always built)
+
+# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
+%undefine	with_ocaml_opt
+%endif
+
+%define		module	dune
+Summary:	A composable build system for OCaml
+Name:		ocaml-%{module}
+Version:	1.5.1
+Release:	1
+License:	MIT
+Group:		Libraries
+Source0:	https://github.com/ocaml/dune/archive/%{version}/%{module}-%{version}.tar.gz
+# Source0-md5:	3f14fccc36dd6b852390831a3f2b4137
+Patch0:		mandir.patch
+URL:		https://github.com/ocaml/dune
+BuildRequires:	ocaml >= 3.04-7
+%requires_eq	ocaml-runtime
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		debug_package	%{nil}
+%if %{without ocaml_opt}
+%define		no_install_post_strip	1
+# no opt means no native binary, stripping bytecode breaks such programs
+%define		_enable_debug_packages	0
+%endif
+
+%description
+A composable build system for OCaml.
+
+%prep
+%setup -q -n %{module}-%{version}
+%patch0 -p1
+
+%build
+ocaml configure.ml
+
+%{__make} -j1 release \
+	CC="%{__cc} %{rpmcflags} -fPIC"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.md CHANGES.md README.md
+%attr(755,root,root) %{_bindir}/dune
+%attr(755,root,root) %{_bindir}/jbuilder
+%{_libdir}/ocaml/site-lib/%{module}
+%{_mandir}/man1/dune*.1*
+%{_mandir}/man5/dune*.5*
diff --git a/mandir.patch b/mandir.patch
new file mode 100644
index 0000000..959363f
--- /dev/null
+++ b/mandir.patch
@@ -0,0 +1,11 @@
+--- dune-1.5.1/src/install.ml~	2018-11-07 17:17:25.000000000 +0100
++++ dune-1.5.1/src/install.ml	2018-11-24 15:31:19.691018769 +0100
+@@ -125,7 +125,7 @@
+       ; share_root
+       ; bin          = Path.relative destdir "bin"
+       ; sbin         = Path.relative destdir "sbin"
+-      ; man          = Path.relative destdir "man"
++      ; man          = Path.relative share_root "man"
+       ; toplevel     = Path.relative libdir  "toplevel"
+       ; stublibs     = Path.relative libdir  "stublibs"
+       ; lib          = Path.relative lib_root     package
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocaml-dune.git/commitdiff/d5b28b2d9ca8deb21d4887eb964dfc2646ada41f



More information about the pld-cvs-commit mailing list