From b003e03da8af3f91e8d85bbd2acd5232b01735ca Mon Sep 17 00:00:00 2001 From: Ben Rosser Date: Wed, 7 Aug 2019 10:32:16 -0400 Subject: [PATCH] Initial import. --- .gitignore | 1 + ocaml-mmap.spec | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 77 insertions(+) create mode 100644 .gitignore create mode 100644 ocaml-mmap.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..59d4445 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/mmap-v1.1.0.tar.gz diff --git a/ocaml-mmap.spec b/ocaml-mmap.spec new file mode 100644 index 0000000..6dfc493 --- /dev/null +++ b/ocaml-mmap.spec @@ -0,0 +1,75 @@ +Name: ocaml-mmap +Version: 1.1.0 +Release: 2%{?dist} +Summary: File mapping functionality + +%global libname mmap + +# License is LGPL 2.1 with standard OCaml exceptions +License: LGPLv2+ with exceptions +URL: https://github.com/mirage/mmap +Source0: https://github.com/mirage/mmap/archive/v%{version}/mmap-v%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: ocaml-findlib + +BuildRequires: ocaml-dune + +%description +This project provides a Mmap.map_file functions for mapping files +in memory. This function is the same as the Unix.map_file function +added in OCaml >= 4.06. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and +signature files for developing applications that use %{name}. + +%prep +%autosetup -n %{libname}-%{version} + +%build +# It might be nice to have a %jbuilder macro that just does this. +dune build -p %{libname} %{?_smp_mflags} + +%install +mkdir -p %{buildroot}%{_libdir}/ocaml/%{libname}/ +cp -aLr _build/install/default/lib/%{libname}/* %{buildroot}%{_libdir}/ocaml/%{libname}/ + +%check +dune runtest + +%files +%license LICENSE +%doc README.md CHANGES.md +%{_libdir}/ocaml/%{libname} +%ifarch %{ocaml_native_compiler} +%exclude %{_libdir}/ocaml/%{libname}/*.a +%exclude %{_libdir}/ocaml/%{libname}/*.cmxa +%exclude %{_libdir}/ocaml/%{libname}/*.cmx +%endif +%exclude %{_libdir}/ocaml/%{libname}/*.mli + + +%files devel +#license LICENSE +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/%{libname}/*.a +%{_libdir}/ocaml/%{libname}/*.cmxa +%{_libdir}/ocaml/%{libname}/*.cmx +%endif +%{_libdir}/ocaml/%{libname}/*.mli + + +%changelog +* Tue Aug 06 2019 Ben Rosser - 1.1.0-2 +- Switched to github tag archive with tests, license file. +- Added missing isa to devel package requirement. +- Added "dune runtest" to check section. +- Cleaned up files paths to use ocaml/libname rather than ocaml/*. + +* Tue Jul 30 2019 Ben Rosser - 1.1.0-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..f17d694 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mmap-v1.1.0.tar.gz) = 8540a5ca1cde87cb5c7bf9b987aac1b180e95c13578db2aa6775908df416c4ce6bba7bdd8ee616c9a50d175b58ee84234e7ed7ecc6276b3af6aac0b6ef09c37c