package init
This commit is contained in:
parent
8e55dc2638
commit
dac911878e
20
fileutils-0.5.2-fix-bytes.patch
Normal file
20
fileutils-0.5.2-fix-bytes.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- ocaml-fileutils-0.5.2.old/src/FileUtilCP.ml 2017-05-23 21:12:19.000000000 +0100
|
||||||
|
+++ ocaml-fileutils-0.5.2/src/FileUtilCP.ml 2017-11-08 17:36:42.271524209 +0000
|
||||||
|
@@ -138,7 +138,7 @@
|
||||||
|
end
|
||||||
|
in
|
||||||
|
|
||||||
|
- let buffer = String.make 1024 ' ' in
|
||||||
|
+ let buffer = Bytes.make 1024 ' ' in
|
||||||
|
|
||||||
|
let cp_file st_src dst_exists fn_src fn_dst =
|
||||||
|
let mode = int_of_permission st_src.permission in
|
||||||
|
@@ -176,7 +176,7 @@
|
||||||
|
try
|
||||||
|
while (read :=
|
||||||
|
handle_exception
|
||||||
|
- (Unix.read fd_src buffer 0) (String.length buffer)
|
||||||
|
+ (Unix.read fd_src buffer 0) (Bytes.length buffer)
|
||||||
|
(fun e -> `ErrorRead(fn_src, e));
|
||||||
|
!read <> 0) do
|
||||||
|
let written =
|
||||||
BIN
ocaml-fileutils-0.5.2.tar.gz
Normal file
BIN
ocaml-fileutils-0.5.2.tar.gz
Normal file
Binary file not shown.
62
ocaml-fileutils.spec
Normal file
62
ocaml-fileutils.spec
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
Name: ocaml-fileutils
|
||||||
|
Version: 0.5.2
|
||||||
|
Release: 6
|
||||||
|
Summary: API to manipulate files (POSIX like) and filenames
|
||||||
|
License: LGPLv2 with exceptions
|
||||||
|
URL: https://github.com/gildor478/ocaml-fileutils
|
||||||
|
Source0: http://forge.ocamlcore.org/frs/download.php/1695/ocaml-fileutils-0.5.2.tar.gz
|
||||||
|
|
||||||
|
Patch0001: fileutils-0.5.2-fix-bytes.patch
|
||||||
|
|
||||||
|
BuildRequires: ocaml >= 4.00.1 ocaml-findlib-devel >= 1.3.3-3
|
||||||
|
BuildRequires: ocaml-ocamlbuild ocaml-ocamldoc ocaml-ounit-devel
|
||||||
|
|
||||||
|
%description
|
||||||
|
This library provides an API to perform POSIX like operations on files like:
|
||||||
|
mv
|
||||||
|
cp
|
||||||
|
rm
|
||||||
|
mkdir
|
||||||
|
touch
|
||||||
|
which...
|
||||||
|
|
||||||
|
It also providesa module to manipulate abstract filenames:
|
||||||
|
classification
|
||||||
|
make_relative: made a filename relative to another
|
||||||
|
make_absolute
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
|
%build
|
||||||
|
ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix %{_prefix} --enable-tests
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
export DESTDIR=$RPM_BUILD_ROOT OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||||
|
install -d $OCAMLFIND_DESTDIR/stublibs
|
||||||
|
|
||||||
|
make htmldir=. install
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc AUTHORS.txt CHANGELOG.txt COPYING.txt README.txt TODO.txt
|
||||||
|
%{_libdir}/ocaml/fileutils
|
||||||
|
%exclude %{_libdir}/ocaml/fileutils/*.{a,cmx,cmxa,ml,mli}
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_libdir}/ocaml/fileutils/*.{a,cmx,cmxa,ml,mli}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Feb 26 2020 zhouyihang<zhouyihang1@huawei.com> - 0.5.2-6
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user