commit 1bb42f44bd7f9ab412b05c7534ce603ac3267c373a8953d5aa252482caff3dcc Author: Adrian Schröter Date: Fri May 3 17:20:50 2024 +0200 Sync from SUSE:SLFO:Main ocaml-libvirt revision c7b9f717e14f995de8e0bb0746535a53 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_service b/_service new file mode 100644 index 0000000..c67c84d --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + ocaml-libvirt + ce1be8712bc9f54b293374fe44d0f510873bd4b6 + git + disable + https://github.com/libvirt/libvirt-ocaml.git + @PARENT_TAG@ + [v]?([^+]+)(.*) + \1 + + + *.tar + xz + + + diff --git a/ocaml-libvirt-0.6.1.7.tar.xz b/ocaml-libvirt-0.6.1.7.tar.xz new file mode 100644 index 0000000..0adbca8 --- /dev/null +++ b/ocaml-libvirt-0.6.1.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ed6140d46bd5f00bb124c48ecbbcded09d20ef977b76a70e668dc32a6a3080d +size 82876 diff --git a/ocaml-libvirt.changes b/ocaml-libvirt.changes new file mode 100644 index 0000000..cd21681 --- /dev/null +++ b/ocaml-libvirt.changes @@ -0,0 +1,60 @@ +------------------------------------------------------------------- +Fri Mar 3 03:03:03 UTC 2023 - ohering@suse.de + +- Update to version 0.6.1.7 + turn caml_copy_*() return blocks into root values +- rebase ocaml-libvirt.patch + +------------------------------------------------------------------- +Mon Apr 4 04:04:04 UTC 2022 - ohering@suse.de + +- Use upstream libvirt.git +- Add ocaml-libvirt.patch to build with dune + +------------------------------------------------------------------- +Fri Nov 1 12:34:56 UTC 2019 - ohering@suse.de + +- Require current dune macros +- Update to version 0.6.1.5, via _service file + +------------------------------------------------------------------- +Tue Jul 25 13:04:54 UTC 2017 - ohering@suse.de + +- Use Group: Development/Languages/OCaml + +------------------------------------------------------------------- +Mon Jul 17 12:48:58 UTC 2017 - ohering@suse.de + +- Wrap specfile conditionals to fix quilt setup + +------------------------------------------------------------------- +Mon Jul 17 10:48:58 UTC 2017 - ohering@suse.de + +- Remove autodeps for pre openSUSE 12.1 releases + +------------------------------------------------------------------- +Wed May 31 07:07:33 UTC 2017 - olaf@aepfle.de + +- Replace tabs with spaces in generated _oasis file + +------------------------------------------------------------------- +Mon May 30 06:39:17 UTC 2016 - ohering@suse.de + +- Fix build with ocaml-4.03 (fate#320836) + +------------------------------------------------------------------- +Tue Nov 10 10:18:47 UTC 2015 - ohering@suse.de + +- Add hardcoded Provides for pre 12.1 repos + +------------------------------------------------------------------- +Mon Dec 8 20:48:52 UTC 2014 - mlatimer@suse.com + +- Update spec file to use ocaml-rpm-macros, remove + ExclusiveArch, and ensure bytecode is built + +------------------------------------------------------------------- +Fri Dec 5 18:17:39 UTC 2014 - mlatimer@suse.com + +- Initial commit using version 0.6.1.4 + diff --git a/ocaml-libvirt.patch b/ocaml-libvirt.patch new file mode 100644 index 0000000..e2d2e31 --- /dev/null +++ b/ocaml-libvirt.patch @@ -0,0 +1,96 @@ +--- /dev/null ++++ b/dune-project +@@ -0,0 +1,25 @@ ++(lang dune 1.11) ++ ++(name libvirt) ++ ++(generate_opam_files true) ++ ++(license "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception") ++ ++(authors "Richard W.M. Jones ") ++ ++(maintainers "Richard W.M. Jones ") ++ ++(homepage "https://libvirt.org/ocaml/") ++ ++(package ++ (name libvirt) ++ (synopsis "OCaml bindings for libvirt") ++ (description ++ "OCaml bindings for libvirt, allowing you to write OCaml programs and scripts which control virtualisation features.") ++ (depends ++ (dune ++ (>= 1.11)) ++ dune.configurator ++ (ocaml ++ (>= 4.02.0)))) +--- /dev/null ++++ b/examples/dune +@@ -0,0 +1,4 @@ ++(executables ++ (public_names domain_events get_all_domain_stats get_cpu_stats list_domains ++ list_secrets node_info) ++ (libraries libvirt)) +--- /dev/null ++++ b/libvirt/config/discover.ml +@@ -0,0 +1,17 @@ ++module C = Configurator.V1 ++ ++let () = ++C.main ~name:"libvirt" (fun c -> ++ ++let conf = ++ match C.Pkg_config.get c with ++ | None -> C.die "'pkg-config' missing" ++ | Some pc -> ++ match (C.Pkg_config.query pc ~package:"libvirt") with ++ | None -> C.die "'pkg-config libvirt' missing" ++ | Some deps -> deps ++ in ++ ++ C.C_define.gen_header_file c ~fname:"config.h" []; ++ C.Flags.write_sexp "c_flags.sexp" (conf.cflags @ [ "-I"; "." ]); ++ C.Flags.write_sexp "c_library_flags.sexp" conf.libs) +--- /dev/null ++++ b/libvirt/config/dune +@@ -0,0 +1,3 @@ ++(executable ++ (name discover) ++ (libraries dune.configurator)) +--- /dev/null ++++ b/libvirt/dune +@@ -0,0 +1,32 @@ ++(library ++ (name mllibvirt) ++ (public_name libvirt) ++ (synopsis "binding for libvirt") ++ (modules Libvirt Libvirt_version) ++ (wrapped false) ++ (libraries unix) ++ (c_names libvirt_c_common libvirt_c_oneoffs libvirt_generated) ++ (c_flags ++ "-DCAML_NAME_SPACE" ++ (:include c_flags.sexp)) ++ (c_library_flags ++ (:include c_library_flags.sexp))) ++ ++(rule ++ (target libvirt_version.ml) ++ (action ++ (write-file %{target} ++ "let version = \"%{version:libvirt}\"\nlet package = \"libvirt\"\n"))) ++ ++(rule ++ (target libvirt_generated.c) ++ (deps generator.pl) ++ (action ++ (run perl -w generator.pl))) ++ ++(rule ++ (targets c_flags.sexp c_library_flags.sexp) ++ (deps ++ (:discover config/discover.exe)) ++ (action ++ (run %{discover}))) diff --git a/ocaml-libvirt.spec b/ocaml-libvirt.spec new file mode 100644 index 0000000..03ba4c3 --- /dev/null +++ b/ocaml-libvirt.spec @@ -0,0 +1,71 @@ +# +# spec file for package ocaml-libvirt +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: ocaml-libvirt +Version: 0.6.1.7 +Release: 0 +%{?ocaml_preserve_bytecode} +Summary: OCaml binding for libvirt +License: LGPL-2.0-or-later +Group: Development/Languages/OCaml +URL: https://opam.ocaml.org/packages/libvirt +Source0: %name-%version.tar.xz +Patch0: ocaml-libvirt.patch +BuildRequires: ocaml +BuildRequires: ocaml-dune +BuildRequires: ocaml-rpm-macros >= 20230101 +BuildRequires: perl +BuildRequires: ocamlfind(dune.configurator) +BuildRequires: ocamlfind(unix) +BuildRequires: pkgconfig(libvirt) + +%description +OCaml binding for libvirt. + +%package devel +Summary: Development files for %name +Group: Development/Languages/OCaml +Requires: %name = %version +Requires: pkgconfig(libvirt) + +%description devel +The %name-devel package contains libraries and signature files for +developing applications that use %name. + +%prep +%autosetup -p1 + +%build +dune_release_pkgs='libvirt' +%ocaml_dune_setup +%ocaml_dune_build + +%install +%ocaml_dune_install +%ocaml_create_file_list + +%check +dune_test_tolerate_fail='dune_test_tolerate_fail' +%ocaml_dune_test + +%files -f %name.files +%_bindir/* + +%files devel -f %name.files.devel + +%changelog