]> git.pld-linux.org Git - packages/ocaml-ctypes.git/commitdiff
- work around rpmbuild parsing issues
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 1 Mar 2015 12:01:27 +0000 (13:01 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 1 Mar 2015 12:01:27 +0000 (13:01 +0100)
ocaml-ctypes.spec

index 1e5c0d6fd7fbeed8d762f2ccd0a83377db68bb66..f4436d1e1c3750302846a787e7c54b41efc2fe77 100644 (file)
@@ -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]
This page took 0.231286 seconds and 4 git commands to generate.