diff --git a/.gitignore b/.gitignore index b7d9284..0710394 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ ocaml-curses-1.0.3.tar.gz /ocaml-curses-1.0.4.tar.gz +/curses-1.0.11.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100755 index 0000000..2c7ed80 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-* +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/ocaml-curses.spec b/ocaml-curses.spec index f0eac76..acd84de 100644 --- a/ocaml-curses.spec +++ b/ocaml-curses.spec @@ -1,21 +1,20 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +# OCaml packages not built on i686 since OCaml 5 / Fedora 39. +ExcludeArch: %{ix86} Name: ocaml-curses -Version: 1.0.4 -Release: 19%{?dist} +Version: 1.0.11 +Release: 16%{?dist} Summary: OCaml bindings for ncurses -License: LGPLv2+ +License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception -URL: http://savannah.nongnu.org/projects/ocaml-tmk/ -Source0: http://download.savannah.gnu.org/releases/ocaml-tmk/%{name}-%{version}.tar.gz +URL: https://github.com/mbacarella/curses +VCS: git:%{url}.git +Source0: %{url}/archive/%{version}/curses-%{version}.tar.gz -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel >= 1.3.3-3 -BuildRequires: ncurses-devel -BuildRequires: gawk - -# Doesn't include a configure script, so we have to make one. -BuildRequires: autoconf, automake, libtool +BuildRequires: ocaml >= 4.02.0 +BuildRequires: ocaml-dune >= 2.7 +BuildRequires: ocaml-dune-configurator-devel +BuildRequires: pkgconfig(ncurses) %description @@ -24,13 +23,8 @@ OCaml bindings for ncurses. %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - -# On aarch64, it is reported that ncurses-devel is not pulled in -# implicitly by ocaml (as is the case on x86-64 for some reason). In -# any case, it is likely that people installing ocaml-curses-devel -# will desire ncurses-devel, hence: -Requires: ncurses-devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: ncurses-devel%{?_isa} %description devel @@ -39,54 +33,117 @@ developing applications that use %{name}. %prep -%setup -q - -autoreconf +%autosetup -n curses-%{version} %build -%configure --enable-widec -make all -%if %opt -make opt -%endif +%dune_build %install -export DESTDIR=$RPM_BUILD_ROOT -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs -%if %opt -ocamlfind install curses META *.cmi *.cmx *.cma *.cmxa *.a *.so *.mli -%else -ocamlfind install curses META *.cmi *.cma *.a *.so *.mli -%endif +%dune_install -%files -%doc COPYING -%{_libdir}/ocaml/curses -%if %opt -%exclude %{_libdir}/ocaml/curses/*.a -%exclude %{_libdir}/ocaml/curses/*.cmxa -%exclude %{_libdir}/ocaml/curses/*.cmx -%endif -%exclude %{_libdir}/ocaml/curses/*.mli -%{_libdir}/ocaml/stublibs/*.so -%{_libdir}/ocaml/stublibs/*.so.owner +%check +%dune_check -%files devel -%doc COPYING -%if %opt -%{_libdir}/ocaml/curses/*.a -%{_libdir}/ocaml/curses/*.cmxa -%{_libdir}/ocaml/curses/*.cmx -%endif -%{_libdir}/ocaml/curses/*.mli +%files -f .ofiles +%doc CHANGES.md README.md +%license COPYING + + +%files devel -f .ofiles-devel +%license COPYING %changelog +* Mon Oct 13 2025 Richard W.M. Jones - 1.0.11-16 +- OCaml 5.4.0 rebuild + +* Thu Jul 24 2025 Fedora Release Engineering - 1.0.11-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jul 11 2025 Jerry James - 1.0.11-14 +- Rebuild to fix OCaml dependencies + +* Fri Jan 17 2025 Fedora Release Engineering - 1.0.11-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jan 9 2025 Jerry James - 1.0.11-12 +- OCaml 5.3.0 rebuild for Fedora 42 +- Add VCS field + +* Thu Jul 18 2024 Fedora Release Engineering - 1.0.11-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jun 19 2024 Richard W.M. Jones - 1.0.11-10 +- OCaml 5.2.0 ppc64le fix + +* Wed May 29 2024 Richard W.M. Jones - 1.0.11-9 +- OCaml 5.2.0 for Fedora 41 + +* Thu Jan 25 2024 Fedora Release Engineering - 1.0.11-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.0.11-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Dec 18 2023 Richard W.M. Jones - 1.0.11-6 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + +* Tue Dec 12 2023 Richard W.M. Jones - 1.0.11-5 +- OCaml 5.1.1 rebuild for Fedora 40 + +* Thu Oct 05 2023 Richard W.M. Jones - 1.0.11-4 +- OCaml 5.1 rebuild for Fedora 40 + +* Thu Jul 20 2023 Fedora Release Engineering - 1.0.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 11 2023 Richard W.M. Jones - 1.0.11-2 +- OCaml 5.0 rebuild for Fedora 39 + +* Mon Jul 10 2023 Jerry James - 1.0.11-1 +- Version 1.0.11 +- New project URLs +- Convert License tag to SPDX +- Build with dune +- Add %%check script + +* Tue Apr 25 2023 Florian Weimer - 1.0.4-30 +- Port configure script to C99 + +* Tue Jan 24 2023 Richard W.M. Jones - 1.0.4-29 +- Rebuild OCaml packages for F38 + +* Thu Jan 19 2023 Fedora Release Engineering - 1.0.4-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 1.0.4-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jun 18 2022 Richard W.M. Jones - 1.0.4-26 +- OCaml 4.14.0 rebuild + +* Fri Feb 04 2022 Richard W.M. Jones - 1.0.4-25 +- OCaml 4.13.1 rebuild to remove package notes + +* Thu Jan 20 2022 Fedora Release Engineering - 1.0.4-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Oct 04 2021 Richard W.M. Jones - 1.0.4-23 +- OCaml 4.13.1 build + +* Thu Jul 22 2021 Fedora Release Engineering - 1.0.4-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Mar 1 14:31:54 GMT 2021 Richard W.M. Jones - 1.0.4-21 +- OCaml 4.12.0 build + +* Tue Jan 26 2021 Fedora Release Engineering - 1.0.4-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Sep 01 2020 Richard W.M. Jones - 1.0.4-19 - OCaml 4.11.1 rebuild diff --git a/sources b/sources index 66bdcee..bee858a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ocaml-curses-1.0.4.tar.gz) = a49838f1d32bf96fda6c612ac1b38316f61c49aa015e61e49681eacf863234f36ffe71d4305dd34f8e3b0a5dc6d9757919a107bcfdf46bd90df128e975560948 +SHA512 (curses-1.0.11.tar.gz) = 343113ab56ce339d8dc534087c27c88513a15a7d4337187f0d8e939c05730c6f2f4e6ddb2bfa6eed96b38d8e0271762d34be0ecf94bbfcbaeef29c12a362c672 diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..c4fae27 --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,10 @@ +#!/bin/bash - +set -e +set -x + +# Compile trivial curses program. +echo 'open Curses;; ignore (initscr ()); endwin ()' > cursestest.ml +ocamlfind ocamlopt -package curses cursestest.ml -linkpkg -o cursestest +# We can't run this because there is no controlling terminal in +# the test environment. +#./cursestest diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100755 index 0000000..a184de7 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - ocaml + - ocaml-findlib + - ocaml-curses-devel + tests: + - simple: + dir: . + run: ./basic-test.sh