init
This commit is contained in:
parent
aa1cb892c7
commit
ae3d220656
BIN
0.3.7.tar.gz
Normal file
BIN
0.3.7.tar.gz
Normal file
Binary file not shown.
17
ocaml-gettext-0.3.7-bytes-fix.patch
Normal file
17
ocaml-gettext-0.3.7-bytes-fix.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff -ur ocaml-gettext-0.3.7.old/libgettext-ocaml/gettextMo_int32.ml ocaml-gettext-0.3.7/libgettext-ocaml/gettextMo_int32.ml
|
||||||
|
--- ocaml-gettext-0.3.7.old/libgettext-ocaml/gettextMo_int32.ml 2017-03-01 22:03:24.000000000 +0000
|
||||||
|
+++ ocaml-gettext-0.3.7/libgettext-ocaml/gettextMo_int32.ml 2017-11-08 18:33:04.486280040 +0000
|
||||||
|
@@ -104,11 +104,11 @@
|
||||||
|
(Int32.to_int length,Int32.to_int offset)
|
||||||
|
in
|
||||||
|
if 0 <= ioffset + ilength && ioffset + ilength < in_channel_length chn then
|
||||||
|
- let str = String.make ilength 'X'
|
||||||
|
+ let str = Bytes.make ilength 'X'
|
||||||
|
in
|
||||||
|
seek_in chn ioffset;
|
||||||
|
really_input chn str 0 ilength;
|
||||||
|
- str
|
||||||
|
+ Bytes.to_string str
|
||||||
|
else
|
||||||
|
(* We use this exception, because that what should happen if we try to
|
||||||
|
read the string *)
|
||||||
110
ocaml-gettext.spec
Normal file
110
ocaml-gettext.spec
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
Name: ocaml-gettext
|
||||||
|
Version: 0.3.7
|
||||||
|
Release: 7
|
||||||
|
Summary: Internationalization library for OCaml
|
||||||
|
License: LGPLv2+ with exceptions
|
||||||
|
URL: https://github.com/gildor478/ocaml-gettext
|
||||||
|
Source0: https://github.com/gildor478/ocaml-gettext/archive/%{version}.tar.gz
|
||||||
|
Patch0001: ocaml-gettext-0.3.7-bytes-fix.patch
|
||||||
|
BuildRequires: ocaml >= 4.00.1 ocaml-findlib-devel >= 1.3.3-3 ocaml-ocamldoc
|
||||||
|
BuildRequires: ocaml-camlp4-devel ocaml-fileutils-devel >= 0.4.4-4 docbook-style-xsl
|
||||||
|
BuildRequires: libxslt libxml2 chrpath autoconf ocaml-ounit-devel
|
||||||
|
BuildRequires: ocaml-camomile-devel >= 0.8.6-3 ocaml-camomile-data autoconf, automake
|
||||||
|
Requires: ocaml-camomile-data
|
||||||
|
Provides: ocaml-gettext-camomile = %{version}-%{release}
|
||||||
|
Obsoletes: ocaml-gettext-camomile < %{version}-%{release}
|
||||||
|
|
||||||
|
%global __ocaml_requires_opts -i Asttypes -i Parsetree
|
||||||
|
%global __ocaml_provides_opts -i Pr_gettext
|
||||||
|
|
||||||
|
%description
|
||||||
|
The package is used to support for internationalization of Ocaml programs.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for ocaml-gettext and camomile
|
||||||
|
Requires: ocaml-gettext = %{version}-%{release}
|
||||||
|
Requires: ocaml-fileutils-devel >= 0.4.0
|
||||||
|
Requires: ocaml-gettext-camomile = %{version}-%{release}
|
||||||
|
Provides: ocaml-gettext-camomile-devel = %{version}-%{release}
|
||||||
|
Obsoletes: ocaml-gettext-camomile-devel < %{version}-%{release}
|
||||||
|
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The ocaml-gettext-devel package contains development and libraries and files for
|
||||||
|
ocaml-gettext and camomile.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
autoreconf -i
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
unset MAKEFLAGS
|
||||||
|
CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --enable-test \
|
||||||
|
--with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
|
||||||
|
make all
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
cd test
|
||||||
|
../_build/bin/test
|
||||||
|
cd -
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
||||||
|
install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
||||||
|
install -d $RPM_BUILD_ROOT%{_bindir}
|
||||||
|
|
||||||
|
ocamlfind install gettext _build/lib/gettext/*
|
||||||
|
ocamlfind install gettext-stub _build/lib/gettext-stub/*
|
||||||
|
ocamlfind install gettext-camomile _build/lib/gettext-camomile/*
|
||||||
|
cp _build/bin/ocaml-gettext $RPM_BUILD_ROOT%{_bindir}/
|
||||||
|
chmod 0755 $RPM_BUILD_ROOT%{_bindir}/ocaml-gettext
|
||||||
|
cp _build/bin/ocaml-xgettext $RPM_BUILD_ROOT%{_bindir}/
|
||||||
|
chmod 0755 $RPM_BUILD_ROOT%{_bindir}/ocaml-xgettext
|
||||||
|
|
||||||
|
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc COPYING
|
||||||
|
%{_libdir}/ocaml/gettext/*.cma
|
||||||
|
%{_libdir}/ocaml/gettext/*.cmi
|
||||||
|
%{_libdir}/ocaml/gettext/*.cmo
|
||||||
|
%{_libdir}/ocaml/gettext/META
|
||||||
|
%{_libdir}/ocaml/stublibs/*.so
|
||||||
|
%{_libdir}/ocaml/stublibs/*.so.owner
|
||||||
|
%{_libdir}/ocaml/gettext-stub/*.cma
|
||||||
|
%{_libdir}/ocaml/gettext-stub/*.cmi
|
||||||
|
%{_libdir}/ocaml/gettext-stub/META
|
||||||
|
%{_libdir}/ocaml/gettext-camomile/*.cma
|
||||||
|
%{_libdir}/ocaml/gettext-camomile/*.cmi
|
||||||
|
%{_libdir}/ocaml/gettext-camomile/META
|
||||||
|
%exclude %{_libdir}/ocaml/gettext-stub/*.o
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc README CHANGELOG TODO
|
||||||
|
%{_libdir}/ocaml/gettext/*.a
|
||||||
|
%{_libdir}/ocaml/gettext/*.cmxa
|
||||||
|
%{_libdir}/ocaml/gettext/*.cmx
|
||||||
|
%{_libdir}/ocaml/gettext-stub/*.a
|
||||||
|
%{_libdir}/ocaml/gettext-stub/*.cmxa
|
||||||
|
%{_libdir}/ocaml/gettext-stub/*.cmx
|
||||||
|
%{_libdir}/ocaml/gettext/*.ml
|
||||||
|
%{_libdir}/ocaml/gettext/*.mli
|
||||||
|
%{_libdir}/ocaml/gettext-stub/*.ml
|
||||||
|
%{_bindir}/ocaml-gettext
|
||||||
|
%{_libdir}/ocaml/gettext-camomile/*.a
|
||||||
|
%{_libdir}/ocaml/gettext-camomile/*.cmxa
|
||||||
|
%{_libdir}/ocaml/gettext-camomile/*.cmx
|
||||||
|
%{_libdir}/ocaml/gettext-camomile/*.mli
|
||||||
|
%{_bindir}/ocaml-xgettext
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Feb 27 2020 zhujunhao <zhujunhao5@huawei.com> - 0.3.7-7
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user