[packages/ocamldsort] - add ocaml_opt bcond
baggins
baggins at pld-linux.org
Sat Jul 25 15:09:43 CEST 2015
commit 5ef47fa9d901ae60541e1a591d9609455dd3e0fa
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Jul 25 15:09:31 2015 +0200
- add ocaml_opt bcond
ocamldsort.spec | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/ocamldsort.spec b/ocamldsort.spec
index 0872c43..ed1bfb0 100644
--- a/ocamldsort.spec
+++ b/ocamldsort.spec
@@ -1,8 +1,17 @@
+#
+# Conditional build:
+%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
+
+# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
+%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%undefine with_ocaml_opt
+%endif
+
Summary: Dependency sort tool for ocaml sources
Summary(pl.UTF-8): Program do sortowania zależności dla ocamla
Name: ocamldsort
Version: 0.15.0
-Release: 2
+Release: 3
License: GPL
Group: Libraries
Source0: ftp://quatramaran.ens.fr/pub/ara/ocamldsort/%{name}-%{version}.tar.gz
@@ -44,8 +53,12 @@ Bardziej zaawansowane przykłady znajdują się w pliku readme.
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
-install ocamldsort.opt ${RPM_BUILD_ROOT}%{_bindir}/ocamldsort
-install ocamldsort.1 ${RPM_BUILD_ROOT}%{_mandir}/man1
+%if %{with ocaml_opt}
+install ocamldsort.opt $RPM_BUILD_ROOT%{_bindir}/ocamldsort
+%else
+install ocamldsort $RPM_BUILD_ROOT%{_bindir}/ocamldsort
+%endif
+install ocamldsort.1 $RPM_BUILD_ROOT%{_mandir}/man1
%clean
rm -rf $RPM_BUILD_ROOT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocamldsort.git/commitdiff/5ef47fa9d901ae60541e1a591d9609455dd3e0fa
More information about the pld-cvs-commit
mailing list