From 4391d106ffadfdbe90a707ef46df671e1d5134aa Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 07:52:00 +0100 Subject: [PATCH] package created using the webbuild interface [release 0.5.1-1mamba;Thu May 26 2016] --- README.md | 1 + ocaml-ctypes.spec | 82 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 ocaml-ctypes.spec diff --git a/README.md b/README.md index f578e4b..0f9ca26 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # ocaml-ctypes +Combinators for binding to C libraries without writing any C. diff --git a/ocaml-ctypes.spec b/ocaml-ctypes.spec new file mode 100644 index 0000000..98a2664 --- /dev/null +++ b/ocaml-ctypes.spec @@ -0,0 +1,82 @@ +## this macro only works for packages with name matching the regexp "ocaml-.*" +%define ocamlpck ctypes + +Name: ocaml-ctypes +Version: 0.5.1 +Release: 1mamba +Summary: Combinators for binding to C libraries without writing any C +Group: System/Libraries/OCaml +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/ocamllabs/ocaml-ctypes +## GITSOURCE https://github.com/ocamllabs/ocaml-ctypes.git 0.5.1 +Source: https://github.com/ocamllabs/ocaml-ctypes.git/%{version}/ocaml-ctypes-%{version}.tar.bz2 +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libffi-devel +## AUTOBUILDREQ-END +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +Requires: ocaml-runtime +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Combinators for binding to C libraries without writing any C. + +## remove the following two blocks if there's no devel files +%package devel +Group: Development/Libraries/OCaml +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +This package contains libraries and signature files for developing applications that use %{name}. + +%prep +%setup -q + +%build +%make -j1 all + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir) +export DLLDIR=$OCAMLFIND_DESTDIR/stublibs + +install -d $OCAMLFIND_DESTDIR/%{ocamlpck} +install -d $OCAMLFIND_DESTDIR/stublibs + +make install + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_libdir}/ocaml/stublibs/* +%dir %{_libdir}/ocaml/%{ocamlpck} +%{_libdir}/ocaml/%{ocamlpck}/META +%{_libdir}/ocaml/%{ocamlpck}/*.cma +%{_libdir}/ocaml/%{ocamlpck}/*.cmi +%{_libdir}/ocaml/%{ocamlpck}/*.cmt +%{_libdir}/ocaml/%{ocamlpck}/*.cmti +%{_libdir}/ocaml/%{ocamlpck}/*.cmxs +%{_libdir}/ocaml/stublibs/*.so* +#%doc COPYING + +%files devel +%defattr(-,root,root) +%{_libdir}/ocaml/%{ocamlpck}/CHANGES.md +%{_libdir}/ocaml/%{ocamlpck}/*.a +%{_libdir}/ocaml/%{ocamlpck}/*.h +%{_libdir}/ocaml/%{ocamlpck}/*.cmx +%{_libdir}/ocaml/%{ocamlpck}/*.cmxa +%{_libdir}/ocaml/%{ocamlpck}/*.mli +# %doc CHANGES README + +%changelog +* Thu May 26 2016 Silvan Calarco 0.5.1-1mamba +- package created using the webbuild interface