diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18763bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.src.rpm +/charInfo_width-1.1.0.tar.gz diff --git a/ocaml-charinfo-width.spec b/ocaml-charinfo-width.spec new file mode 100644 index 0000000..2d22f82 --- /dev/null +++ b/ocaml-charinfo-width.spec @@ -0,0 +1,74 @@ +# version 1.1.0 +%global commit 6a2ed28ba68cddab6927ac27a9b991f01ea85ec5 +%global shortcommit %(c=%{commit}; echo ${c:0:12}) + +Name: ocaml-charinfo-width +Version: 1.1.0 +Release: 1%{?dist} +Summary: Determine column width for a character + +%global libname charInfo_width + +# MIT-licensed according to opam metadata. +# Issue filed here: https://bitbucket.org/zandoye/charinfo_width/issues/1/include-mit-license-copying-file +License: MIT +URL: https://bitbucket.org/zandoye/charinfo_width/ +Source0: https://bitbucket.org/zandoye/charinfo_width/get/%{version}.tar.gz#/%{libname}-%{version}.tar.gz + +BuildRequires: ocaml +BuildRequires: ocaml-findlib +BuildRequires: ocaml-result-devel +BuildRequires: ocaml-camomile-devel + +BuildRequires: ocaml-dune + +%description +Determine column width for a character + +This module is implemented purely in OCaml and the width function +follows the prototype of POSIX's wcwidth. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and +signature files for developing applications that use %{name}. + +%prep +%autosetup -n zandoye-charinfo_width-%{shortcommit} + +%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}/ + +%files +#license LICENSE +%doc README.md CHANGES.md +%{_libdir}/ocaml/%{libname} +%ifarch %{ocaml_native_compiler} +%exclude %{_libdir}/ocaml/*/*.a +%exclude %{_libdir}/ocaml/*/*.cmxa +%exclude %{_libdir}/ocaml/*/*.cmx +%endif +%exclude %{_libdir}/ocaml/*/*.mli + + +%files devel +#license LICENSE +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/*/*.a +%{_libdir}/ocaml/*/*.cmxa +%{_libdir}/ocaml/*/*.cmx +%endif +%{_libdir}/ocaml/*/*.mli + + +%changelog +* Thu Jul 18 2019 Ben Rosser - 1.1.0-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..a64f6e8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (charInfo_width-1.1.0.tar.gz) = 0d04b8b3a29c024b8784cd3d0c81c602a58883cdca152814002afda857f1582f5e9c11d246180543fd0b7bf450b8f27c8d50cedd58af1495d016c105dd05698b