[projects/template-specs] - removed duplicate debug_packages disabling, added dune example

qboosh qboosh at pld-linux.org
Sat Sep 25 16:56:52 CEST 2021


commit 2800a26172048111278466104c6a328bcc1a6226
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 25 17:01:35 2021 +0200

    - removed duplicate debug_packages disabling, added dune example

 ocaml.spec | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/ocaml.spec b/ocaml.spec
index f88b869..2970d1c 100644
--- a/ocaml.spec
+++ b/ocaml.spec
@@ -1,17 +1,13 @@
 #
 # Conditional build:
-%bcond_without	ocaml_opt	# skip building native optimized binaries (bytecode is always built)
+%bcond_without	ocaml_opt	# 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
 
-%if %{without ocaml_opt}
-%define		_enable_debug_packages	0
-%endif
-
-%define		module	%{module}
+%define		module	TEMPLATE
 Summary:	%{module} binding for OCaml
 Summary(pl.UTF-8):	Wiązania %{module} dla OCamla
 Name:		ocaml-%{module}
@@ -20,10 +16,11 @@ Release:	1
 License:	- (enter GPL/LGPL/BSD/BSD-like/other license name here)
 Group:		Libraries
 Source0:	%{module}-%{version}.tar.gz
-URL:		-
 # Source0-md5:	-
+URL:		-
 #BuildRequires:	-devel
 BuildRequires:	ocaml >= 1:4.00
+#BuildRequires:	ocaml-dune
 %requires_eq	ocaml-runtime
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -64,6 +61,9 @@ biblioteki TEMPLATE.
 %{__make} -j1 all %{?with_ocaml_opt:opt} \
 	CC="%{__cc} %{rpmcflags} -fPIC"
 
+# or
+dune build --verbose
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -72,6 +72,9 @@ install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# or
+dune install --destdir=$RPM_BUILD_ROOT
+
 #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 #cp -r foo bar $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/2800a26172048111278466104c6a328bcc1a6226



More information about the pld-cvs-commit mailing list