diff --git a/_service b/_service new file mode 100644 index 0000000..b8d7e61 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + https://github.com/anuragsoni/calendar.git + git + 2.04 + + pervasives-deprecated-408 + ocaml-calendar + + + *.tar + xz + + + diff --git a/calendar-2.04-enable-debug.patch b/calendar-2.04-enable-debug.patch deleted file mode 100644 index dae5783..0000000 --- a/calendar-2.04-enable-debug.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- calendar-2.04/Makefile.in.old 2013-09-14 16:15:43.760253519 +0100 -+++ calendar-2.04/Makefile.in 2013-09-14 16:16:03.233279962 +0100 -@@ -86,7 +86,7 @@ - - CAMLIBS = $(addprefix -I , $(DIRS)) - --CAMLFLAGS= $(CAMLIBS) -+CAMLFLAGS= -g $(CAMLIBS) - BYTEFLAGS= $(CAMLFLAGS) - LINK_OPTFLAGS = $(CAMLFLAGS) -noassert - OPTFLAGS = $(LINK_OPTFLAGS) -for-pack CalendarLib diff --git a/calendar-2.04.tar.gz b/calendar-2.04.tar.gz deleted file mode 100644 index 6fc2aa3..0000000 --- a/calendar-2.04.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bea6faa0337a1c54b0f3c2b9b45c9eb90e2b2747406e6f0b841e1fd20fd4d9f7 -size 271522 diff --git a/ocaml-calendar-2.04.tar.xz b/ocaml-calendar-2.04.tar.xz new file mode 100644 index 0000000..b37d7ca --- /dev/null +++ b/ocaml-calendar-2.04.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48db0ea40ae83fca502435f71eb2276e9c21e945e18bb697e5b84578ef31cae6 +size 76496 diff --git a/ocaml-calendar-buildcompare.patch b/ocaml-calendar-buildcompare.patch deleted file mode 100644 index f770c60..0000000 --- a/ocaml-calendar-buildcompare.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/Makefile.in -+++ b/Makefile.in -@@ -117,7 +117,7 @@ $(LIBDIR)/$(NAMELIB).cmxs: $(LIBDIR)/$(N - - src/version.ml: Makefile - echo "let version = \"$(VERSION)\"" > $@ -- echo "let date = \"`date`\"" >> $@ -+ echo "let date = \"`date --reference=CHANGES`\"" >> $@ - - META: Makefile - echo "name = \"$(NAME)\"" > $@ diff --git a/ocaml-calendar.changes b/ocaml-calendar.changes index 74c7cb7..93a2fa4 100644 --- a/ocaml-calendar.changes +++ b/ocaml-calendar.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Nov 1 12:34:56 UTC 2019 - ohering@suse.de + +- Require current dune macros +- Use _service file +- Remove obsolete calendar-2.04-enable-debug.patch and + ocaml-calendar-buildcompare.patch + ------------------------------------------------------------------- Tue Jul 25 13:04:54 UTC 2017 - ohering@suse.de diff --git a/ocaml-calendar.spec b/ocaml-calendar.spec index 42e46ad..6d07dab 100644 --- a/ocaml-calendar.spec +++ b/ocaml-calendar.spec @@ -12,15 +12,11 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -# Ignore all generated modules *except* CalendarLib, since everything -# now appears in that namespace. -%global __ocaml_requires_opts -i Calendar_builder -i Calendar_sig -i Date -i Date_sig -i Fcalendar -i Ftime -i Period -i Printer -i Time -i Time_sig -i Time_Zone -i Utils -i Version -%global __ocaml_provides_opts -i Calendar_builder -i Calendar_sig -i Date -i Date_sig -i Fcalendar -i Ftime -i Period -i Printer -i Time -i Time_sig -i Time_Zone -i Utils -i Version - +%bcond_with ocaml_do_dune_runtest Name: ocaml-calendar Version: 2.04 Release: 0 @@ -28,16 +24,16 @@ Release: 0 Summary: Objective Caml library for managing dates and times License: LGPL-2.0 Group: Development/Languages/OCaml -Url: http://calendar.forge.ocamlcore.org/ -Source0: http://forge.ocamlcore.org/frs/download.php/1481/calendar-2.04.tar.gz -Patch1: calendar-2.04-enable-debug.patch -Patch2: ocaml-calendar-buildcompare.patch -BuildRequires: gawk -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel >= 1.3.3-3 -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-rpm-macros >= 4.02.1 -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Url: https://github.com/ocaml-community/calendar +Source0: %{name}-%{version}.tar.xz +BuildRequires: ocaml +BuildRequires: ocaml-dune +BuildRequires: ocaml-rpm-macros >= 20191101 +BuildRequires: ocamlfind(re) +BuildRequires: ocamlfind(unix) +%if %{with ocaml_do_dune_runtest} +BuildRequires: ocamlfind(alcotest) +%endif %description Objective Caml library for managing dates and times. @@ -52,48 +48,26 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%setup -q -n calendar-%{version} -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 %build -./configure --libdir=%{_libdir} -make %{?_smp_mflags} -make %{?_smp_mflags} doc - -mv TODO TODO.old -iconv -f iso-8859-1 -t utf-8 < TODO.old > TODO +sed -i~ '/system date/d' src/dune +diff -u "$_"~ "$_" && exit 1 +dune_release_pkgs='calendar' +%ocaml_dune_setup +%ocaml_dune_build %install -export DESTDIR=%{buildroot} -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -make DESTDIR=%{buildroot} install %{?_smp_mflags} +%ocaml_dune_install +%ocaml_create_file_list -%files -%defattr(-,root,root,-) -%doc CHANGES README TODO LGPL COPYING -%dir %{_libdir}/ocaml -%dir %{_libdir}/ocaml/* -%if 0%{?ocaml_native_compiler} -%{_libdir}/ocaml/*/*.cmxs +%if %{with ocaml_do_dune_runtest} +%check +%ocaml_dune_test %endif -%files devel -%defattr(-,root,root,-) -%doc CHANGES README TODO LGPL COPYING doc/* -%dir %{_libdir}/ocaml -%dir %{_libdir}/ocaml/* -%if 0%{?ocaml_native_compiler} -%{_libdir}/ocaml/*/*.a -%{_libdir}/ocaml/*/*.cmx -%{_libdir}/ocaml/*/*.cmxa -%{_libdir}/ocaml/*/*.o -%endif -%{_libdir}/ocaml/*/*.cma -%{_libdir}/ocaml/*/*.cmi -%{_libdir}/ocaml/*/*.cmo -%{_libdir}/ocaml/*/*.mli -%{_libdir}/ocaml/*/META +%files -f %{name}.files + +%files devel -f %{name}.files.devel %changelog