commit c69d1f51517306bfd09d51640d8f8f11c70a30b6
Author: Jakub Bogusz <[email protected]>
Date:   Thu Nov 6 21:29:14 2014 +0100

    - new, separated from ocaml distribution after 3.12

 ocaml-dbm-destdir.patch | 23 +++++++++++++
 ocaml-dbm.spec          | 92 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 115 insertions(+)
---
diff --git a/ocaml-dbm.spec b/ocaml-dbm.spec
new file mode 100644
index 0000000..64da10d
--- /dev/null
+++ b/ocaml-dbm.spec
@@ -0,0 +1,92 @@
+#
+# Conditional build:
+%bcond_without opt             # build opt
+
+%define                module  dbm
+Summary:       DBM binding for OCaml
+Summary(pl.UTF-8):     Wiązania DBM dla OCamla
+Name:          ocaml-dbm
+Version:       1.0
+Release:       1
+License:       LGPL v2 with linking exception
+Group:         Libraries
+Source0:       
https://forge.ocamlcore.org/frs/download.php/728/camldbm-%{version}.tgz
+# Source0-md5: 79a297c0e0c54fbb3c7e795359e5f902
+Patch0:                %{name}-destdir.patch
+URL:           https://forge.ocamlcore.org/projects/camldbm/
+BuildRequires: db-devel
+BuildRequires: ocaml >= 3.12
+%requires_eq   ocaml-runtime
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                debug_package   %{nil}
+
+%description
+This OCaml library is a binding to the NDBM/GDBM Unix "databases".
+
+%description -l pl.UTF-8
+Ta biblioteka OCamla to wiązania do uniksowych "baz danych" NDBM/GDBM.
+
+%package devel
+Summary:       DBM binding for OCaml - development part
+Summary(pl.UTF-8):     Wiązania DBM dla OCamla - cześć programistyczna
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+%requires_eq   ocaml
+
+%description devel
+This package contains files needed to develop OCaml programs using
+DBM library.
+
+%description devel -l pl.UTF-8
+Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
+DBM biblioteki.
+
+%prep
+%setup -q -n camldbm-%{version}
+%patch0 -p1
+
+%build
+# instead of unpredictable configure
+cat >Makefile.config <<EOF
+OCAML_STDLIB=%{_libdir}/ocaml
+DBM_INCLUDES=
+DBM_LINK=-ldb
+DBM_DEFINES=
+EOF
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/dbm
+cp META $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/dbm
+cat >>$RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/dbm/META <<EOF 
+directory="^"
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changelog LICENSE README
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcamldbm.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/ocaml/dbm.cma
+%{_libdir}/ocaml/dbm.cmi
+%{_libdir}/ocaml/dbm.mli
+%if %{with opt}
+%{_libdir}/ocaml/dbm.a
+%{_libdir}/ocaml/dbm.cmxa
+%{_libdir}/ocaml/dbm.cmxs
+%endif
+%{_libdir}/ocaml/libcamldbm.a
+%{_libdir}/ocaml/site-lib/dbm
diff --git a/ocaml-dbm-destdir.patch b/ocaml-dbm-destdir.patch
new file mode 100644
index 0000000..f698c44
--- /dev/null
+++ b/ocaml-dbm-destdir.patch
@@ -0,0 +1,23 @@
+--- camldbm-1.0/Makefile.orig  2011-11-22 16:56:49.000000000 +0100
++++ camldbm-1.0/Makefile       2014-11-06 21:00:16.398248365 +0100
+@@ -57,13 +57,13 @@
+       $(OCAMLDEP) *.ml *.mli > .depend
+ 
+ install::
+-      if test -f dllcamldbm.$(SO); then cp dllcamldbm.$(SO) $(STUBLIBDIR)/; 
fi 
+-      cp libcamldbm.$(A) $(LIBDIR)/
+-      cd $(LIBDIR) && ranlib libcamldbm.$(A)
+-      cp dbm.cma dbm.cmxa dbm.cmi dbm.mli $(LIBDIR)/
+-      cp dbm.$(A) $(LIBDIR)/
+-      cd $(LIBDIR) && ranlib dbm.$(A)
+-      if test -f dbm.cmxs; then cp dbm.cmxs $(LIBDIR)/; fi
++      if test -f dllcamldbm.$(SO); then cp dllcamldbm.$(SO) 
$(DESTDIR)$(STUBLIBDIR)/; fi 
++      cp libcamldbm.$(A) $(DESTDIR)$(LIBDIR)/
++      cd $(DESTDIR)$(LIBDIR) && ranlib libcamldbm.$(A)
++      cp dbm.cma dbm.cmxa dbm.cmi dbm.mli $(DESTDIR)$(LIBDIR)/
++      cp dbm.$(A) $(DESTDIR)$(LIBDIR)/
++      cd $(DESTDIR)$(LIBDIR) && ranlib dbm.$(A)
++      if test -f dbm.cmxs; then cp dbm.cmxs $(DESTDIR)$(LIBDIR)/; fi
+ 
+ clean::
+       rm -f *.cm* *.$(O) *.$(A) *.$(SO)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocaml-dbm.git/commitdiff/c69d1f51517306bfd09d51640d8f8f11c70a30b6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to