[packages/ocaml-ctypes] - work around rpmbuild parsing issues
baggins
baggins at pld-linux.org
Sun Mar 1 13:01:44 CET 2015
commit 7ab0e45d05edf66d57954dea28f3633753b803b3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Mar 1 13:01:27 2015 +0100
- work around rpmbuild parsing issues
ocaml-ctypes.spec | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/ocaml-ctypes.spec b/ocaml-ctypes.spec
index 1e5c0d6..f4436d1 100644
--- a/ocaml-ctypes.spec
+++ b/ocaml-ctypes.spec
@@ -2,17 +2,6 @@
# Conditional build:
%bcond_without ocaml_opt # build opt
-%ifarch x32
-# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
-%undefine▸ with_ocaml_opt
-%endif
-
-%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
-
%define module ctypes
Summary: Library for binding to C libraries using pure OCaml
Name: ocaml-%{module}
@@ -28,6 +17,17 @@ BuildRequires: ocaml >= 3.04-7
%requires_eq ocaml-runtime
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%ifarch x32
+# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
+%undefine▸ with_ocaml_opt
+%endif
+
+%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
ctypes is a library for binding to C libraries using pure OCaml.
The primary aim is to make writing C extensions as straightforward
@@ -52,10 +52,10 @@ This package contains files needed to develop OCaml programs using
TEMPLATE library.
%prep
-%setup -q -n %{module}-%{version}
+%setup -q
%build
-%{__make} -j1 all %{?with_ocaml_opt:opt} \
+%{__make} -j1 all \
CC="%{__cc} %{rpmcflags} -fPIC"
%install
@@ -65,8 +65,8 @@ install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-#install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-#cp -r foo bar $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
# move to dir pld ocamlfind looks
install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
@@ -87,7 +87,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc LICENSE
%{_libdir}/ocaml/%{module}/*.cm[xi]
-%{_libdir}/ocaml/%{module}/*.cmo
%{_libdir}/ocaml/%{module}/*.mli
%if %{with ocaml_opt}
%{_libdir}/ocaml/%{module}/*.[ao]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-ctypes.git/commitdiff/7ab0e45d05edf66d57954dea28f3633753b803b3
More information about the pld-cvs-commit
mailing list