]> git.pld-linux.org Git - packages/ocaml-zarith.git/blobdiff - ocaml-zarith.spec
- rebuild with ocaml 4.04.1
[packages/ocaml-zarith.git] / ocaml-zarith.spec
index 49cdf5ee69d0b847bfa88d91f24e72abfce577a4..181b900e73779115e7deb32b5f3578a2c61eb7cb 100644 (file)
@@ -1,14 +1,20 @@
 #
 # Conditional build:
 #
 # Conditional build:
-%bcond_without opt             # build opt
+%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
+
+%define                module  zarith
 Summary:       Zarith: arbitrary-precision integers
 Summary:       Zarith: arbitrary-precision integers
-Name:          zarith
+Name:          ocaml-zarith
 Version:       1.2.1
 Version:       1.2.1
-Release:       1
+Release:       5
 License:       GPL
 Group:         Applications/Math
 License:       GPL
 Group:         Applications/Math
-Source0:       http://forge.ocamlcore.org/frs/download.php/1199/%{name}-%{version}.tgz
+Source0:       http://forge.ocamlcore.org/frs/download.php/1199/%{module}-%{version}.tgz
 # Source0-md5: b507aaf2469103bb9e54291ff8def5c7
 URL:           http://forge.ocamlcore.org/projects/zarith
 BuildRequires: bash
 # Source0-md5: b507aaf2469103bb9e54291ff8def5c7
 URL:           http://forge.ocamlcore.org/projects/zarith
 BuildRequires: bash
@@ -35,7 +41,7 @@ This package contains files needed to develop OCaml programs using
 zarith library.
 
 %prep
 zarith library.
 
 %prep
-%setup -q
+%setup -q -n %{module}-%{version}
 
 %build
 CFLAGS="%{rpmcflags}" \
 
 %build
 CFLAGS="%{rpmcflags}" \
@@ -43,7 +49,7 @@ CFLAGS="%{rpmcflags}" \
        -installdir $RPM_BUILD_ROOT/%{_libdir}/ocaml \
        -gmp
 
        -installdir $RPM_BUILD_ROOT/%{_libdir}/ocaml \
        -gmp
 
-%{__make} VERBOSE=1
+%{__make} -j1 VERBOSE=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -54,11 +60,11 @@ install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
        DESTDIR=$RPM_BUILD_ROOT
 
 # move to dir pld ocamlfind looks
        DESTDIR=$RPM_BUILD_ROOT
 
 # move to dir pld ocamlfind looks
-install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{name}
-mv $OCAMLFIND_DESTDIR/%{name}/META \
-       $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{name}
-cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{name}/META
-directory="+%{name}"
+install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
+mv $OCAMLFIND_DESTDIR/%{module}/META \
+       $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
+cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
+directory="+%{module}"
 EOF
 
 %clean
 EOF
 
 %clean
@@ -68,17 +74,20 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
 %{_libdir}/ocaml/stublibs/*.so.owner
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
 %{_libdir}/ocaml/stublibs/*.so.owner
-%dir %{_libdir}/ocaml/%{name}
-%{_libdir}/ocaml/%{name}/*.cmxs
-%{_libdir}/ocaml/site-lib/%{name}
+%dir %{_libdir}/ocaml/%{module}
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/%{module}/*.cmxs
+%endif
+%{_libdir}/ocaml/site-lib/%{module}
 
 %files devel
 %defattr(644,root,root,755)
 %doc LICENSE
 
 %files devel
 %defattr(644,root,root,755)
 %doc LICENSE
-%{_libdir}/ocaml/%{name}/*.cm[axi]
-%{_libdir}/ocaml/%{name}/*.mli
-%{_libdir}/ocaml/%{name}/*.h
-%if %{with opt}
-%{_libdir}/ocaml/%{name}/*.[ao]
-%{_libdir}/ocaml/%{name}/*.cmxa
+%{_libdir}/ocaml/%{module}/*.cm[axi]
+%{_libdir}/ocaml/%{module}/*.mli
+%{_libdir}/ocaml/%{module}/*.h
+%{_libdir}/ocaml/%{module}/libzarith.a
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/%{module}/zarith.a
+%{_libdir}/ocaml/%{module}/*.cmxa
 %endif
 %endif
This page took 0.025359 seconds and 4 git commands to generate.