diff --git a/calendar-2.03.2-enable-debug.patch b/calendar-2.03.2-enable-debug.patch new file mode 100644 index 0000000..6fc0d02 --- /dev/null +++ b/calendar-2.03.2-enable-debug.patch @@ -0,0 +1,11 @@ +--- calendar-2.03.2/Makefile.in.old 2013-09-14 16:15:43.760253519 +0100 ++++ calendar-2.03.2/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 new file mode 100644 index 0000000..72535b7 Binary files /dev/null and b/calendar-2.04.tar.gz differ diff --git a/ocaml-calendar.spec b/ocaml-calendar.spec new file mode 100644 index 0000000..a8e5fa8 --- /dev/null +++ b/ocaml-calendar.spec @@ -0,0 +1,59 @@ +Name: ocaml-calendar +Version: 2.04 +Release: 18 +Summary: An Objective Caml library for handling dates and times +License: LGPLv2 +URL: http://calendar.forge.ocamlcore.org/ +Source0: https://forge.ocamlcore.org/frs/download.php/1481/calendar-2.04.tar.gz + +Patch0001: calendar-2.03.2-enable-debug.patch + +BuildRequires: gawk ocaml >= 4.00.1 ocaml-findlib-devel >= 1.3.3-3 ocaml-ocamldoc + +%description +The Calendar Library (Calendar for short) is an Objective Caml library for handling dates and times +in your program. + +Calendar mainly implements 3 datatypes: +Date: year/month/day with support for under-specified dates "year/month" or "year" only and support +for Gregorian and Julian calendar +Time: hour/minute/second with support for time zones +Calendar: Date + Time + +Seconds can be either integers or floats (different implementations are provided). The library also +comes with: +Printers and parsers +Period: an interval between two dates or two times or two calendars + +%package devel +Summary: Development documents for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The package provides libraries and some other development documents for developing applications +that use %{name}. + +%prep +%autosetup -p1 -n calendar-%{version} + +%build +%configure --libdir=%{_libdir} +make +make doc + +%install +export DESTDIR=$RPM_BUILD_ROOT OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +install -d $OCAMLFIND_DESTDIR/stublibs +make install + +%files +%doc CHANGES COPYING LGPL README TODO calendarFAQ-2.6.txt doc/* +%{_libdir}/ocaml/calendar +%exclude %{_libdir}/ocaml/calendar/*.{cmx,mli} + +%files devel +%{_libdir}/ocaml/calendar/*.{cmx,mli} + +%changelog +* Wed Feb 26 2020 zhouyihang - 2.04-18 +- Package init