- Use _service file

- use macros from ocaml-rpm-macros
- Fix build with ocaml-dose.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-dose?expand=0&rev=9
This commit is contained in:
2019-10-09 19:58:56 +00:00
committed by Git OBS Bridge
parent 00d52797f3
commit 89d2511b25
6 changed files with 69 additions and 34 deletions
+7
View File
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Oct 9 05:48:16 UTC 2019 - ohering@suse.de
- Use _service file
- use macros from ocaml-rpm-macros
- Fix build with ocaml-dose.patch
-------------------------------------------------------------------
Fri May 4 18:49:57 UTC 2018 - andy@onthewings.net
+17 -31
View File
@@ -16,26 +16,24 @@
#
%define _name dose3
%define _version 5.0.1
Name: ocaml-dose
Version: 3.5.0.1
Version: 5.0.1
Release: 0
%{?ocaml_preserve_bytecode}
Summary: An OCaml dependency toolkit
License: LGPL-3.0+
Group: Development/Languages/OCaml
Url: http://www.mancoosi.org/software/
Source: http://gforge.inria.fr/frs/download.php/file/36063/%{_name}-%{_version}.tar.gz
Url: https://github.com/IRILL/dose3
Source0: %{name}-%{version}.tar.xz
Patch0: %{name}.patch
BuildRequires: ocaml
BuildRequires: ocaml-cppo
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml-rpm-macros
BuildRequires: ocaml-rpm-macros >= 20191009
BuildRequires: ocamlfind(ocamlgraph)
BuildRequires: ocamlfind(cudf)
BuildRequires: ocamlfind(re)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Dose3 is a framework made of several OCaml libraries for managing distribution
@@ -57,22 +55,23 @@ Requires: %{name} = %{version}
This package contains development files for package %{name}.
%prep
%setup -q -n %{_name}-%{_version}
%autosetup -p1
%build
# Fix name of these manpages
mv doc/manpages/{debcoinstall,deb-coinstall}.pod
mv doc/manpages/{strongdeps,strong-deps}.pod
%build
%configure --with-ocamlgraph
make
%make_build -j 1
%install
make DESTDIR=%{buildroot} install
%make_install
# Edit links that points to buildroot
ln -sf %{_bindir}/distcheck %{buildroot}%{_bindir}/debcheck
ln -sf %{_bindir}/distcheck %{buildroot}%{_bindir}/eclipsecheck
ln -sf %{_bindir}/distcheck %{buildroot}%{_bindir}/rpmcheck
ln -sf distcheck %{buildroot}%{_bindir}/debcheck
ln -sf distcheck %{buildroot}%{_bindir}/eclipsecheck
ln -sf distcheck %{buildroot}%{_bindir}/rpmcheck
# Install man pages
install -d %{buildroot}%{_mandir}/man{1,5,8}
@@ -80,31 +79,18 @@ for section in {1,5,8} ; do
install -m0644 doc/manpages/*.${section} %{buildroot}%{_mandir}/man${section}
done
%ocaml_create_file_list
%check
make testlib
%files
%defattr(-,root,root)
%files -f %{name}.files
%doc CHANGES CREDITS README.architecture
%license COPYING Copyright
%{_bindir}/*
%{_mandir}/man1/*.1%{ext_man}
%{_mandir}/man5/*.5%{ext_man}
%{_mandir}/man8/*.8%{ext_man}
%dir %{_libdir}/ocaml/%{_name}
%if 0%{?ocaml_native_compiler}
%{_libdir}/ocaml/%{_name}/*.cmxs
%endif
%files devel
%defattr(-,root,root)
%license COPYING Copyright
%{_libdir}/ocaml/%{_name}/META
%{_libdir}/ocaml/%{_name}/*.cma
%{_libdir}/ocaml/%{_name}/*.cmi
%if 0%{?ocaml_native_compiler}
%{_libdir}/ocaml/%{_name}/*.a
%{_libdir}/ocaml/%{_name}/*.cmxa
%endif
%files devel -f %{name}.files.devel
%changelog
+18
View File
@@ -0,0 +1,18 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="exclude">.cvsignore</param>
<param name="exclude">doc/webpages</param>
<param name="exclude">experimental</param>
<param name="filename">ocaml-dose</param>
<param name="revision">5.0.1</param>
<param name="scm">git</param>
<param name="submodules">disable</param>
<param name="url">https://github.com/IRILL/dose3.git</param>
<param name="versionformat">5.0.1</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:558af92b0ec5dd219e67802c95a850cab9582df381bddd2cfe431049aaf3db03
size 297433
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c253d04b50b679ab2b901be1331c1f7410336d9c6322bb391f29ec949d7430b
size 231236
+24
View File
@@ -0,0 +1,24 @@
--- a/common/criteria_lexer.mll
+++ b/common/criteria_lexer.mll
@@ -18,7 +18,7 @@
let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any character *)
(* find the terminating delimiter *)
let endpos =
- try String.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with
+ try Bytes.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with
|Invalid_argument _ ->
raise (Format822.Syntax_error (
Format822.error lexbuf "String too short"))
@@ -27,9 +27,9 @@
Format822.error lexbuf (Printf.sprintf "cannot find: %c" c)))
in
let len = endpos - (lexbuf.lex_start_pos + 3) in
- let s = String.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in
- lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((String.length s)+4);
- s
+ let s = Bytes.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in
+ lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((Bytes.length s)+4);
+ Bytes.to_string s
}