diff --git a/csv-1.7.tar.gz b/csv-1.7.tar.gz new file mode 100644 index 0000000..0c7d452 Binary files /dev/null and b/csv-1.7.tar.gz differ diff --git a/ocaml-csv.spec b/ocaml-csv.spec new file mode 100644 index 0000000..483c377 --- /dev/null +++ b/ocaml-csv.spec @@ -0,0 +1,52 @@ +Name: ocaml-csv +Version: 1.7 +Release: 6 +Summary: A pure OCaml library to read and write CSV files +License: LGPLv2+ +URL: https://github.com/Chris00/ocaml-csv/ +Source0: https://github.com/Chris00/ocaml-csv/files/1394287/csv-1.7.tar.gz + +BuildRequires: gawk ocaml >= 4.00.1 ocaml-extlib-devel >= 1.5.3-2 ocaml-findlib-devel >= 1.3.3-3 +BuildRequires: ocaml-ocamlbuild ocaml-ocamldoc + +%description +The comma-separated values format -- or CSV for short -- is a simple tabular format supported by +all major spreadsheets. This library implements pure OCaml functions to read and write files in +this format (including Excel extensions) as well as some convenience functions to manipulate such +data. + +%package devel +Summary: Development documents for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The package provides libraries and some other development documents for developing applications +that use %{name}. + +%prep +%autosetup -p1 -n csv-%{version} + +%build +ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --disable-tests --prefix %{_prefix} +ocaml setup.ml -build + +%install +export DESTDIR=$RPM_BUILD_ROOT OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +install -d $OCAMLFIND_DESTDIR +ocaml setup.ml -install + +install -d $DESTDIR%{_bindir} +install -m 0755 csvtool.native $DESTDIR%{_bindir}/csvtool + +%files +%doc AUTHORS.txt LICENSE.txt README.txt +%{_bindir}/csvtool +%{_libdir}/ocaml/csv +%exclude %{_libdir}/ocaml/csv/*.{a,cmx,cmxa,mli} + +%files devel +%{_libdir}/ocaml/csv/*.{a,cmx,cmxa,mli} + +%changelog +* Wed Feb 26 2020 zhouyihang - 1.7-6 +- Package init