Build ocaml-calendar.
authorRichard W.M. Jones <rjones@redhat.com>
Sun, 16 Nov 2008 10:24:45 +0000 (10:24 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sun, 16 Nov 2008 10:24:45 +0000 (10:24 +0000)
.hgignore
ocaml-calendar/mingw32-ocaml-calendar.spec [new file with mode: 0644]

index 93be0ab..e0ae2e5 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -80,6 +80,7 @@ ocaml/*.exe
 ocaml/*.cmi
 ocaml/*.cmx
 ocaml/*.o
+ocaml-calendar/calendar-2.0.4.tar.gz
 ocaml-csv/ocaml-csv-1.1.7.tar.gz
 ocaml-curses/ocaml-curses-20020319.tar.gz
 ocaml-extlib/extlib-1.5.1.tar.gz
diff --git a/ocaml-calendar/mingw32-ocaml-calendar.spec b/ocaml-calendar/mingw32-ocaml-calendar.spec
new file mode 100644 (file)
index 0000000..5ee09cb
--- /dev/null
@@ -0,0 +1,69 @@
+%define __strip %{_mingw32_strip}
+%define __objdump %{_mingw32_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_mingw32_findrequires}
+%define __find_provides %{_mingw32_findprovides}
+
+Name:           mingw32-ocaml-calendar
+Version:        2.0.4
+Release:        1%{?dist}
+Summary:        MinGW Windows OCaml library for managing dates and times
+
+License:        LGPLv2+
+Group:          Development/Libraries
+
+URL:            http://www.lri.fr/~signoles/prog.en.html#calendar
+Source0:        http://www.lri.fr/~signoles/prog/calendar/calendar-%{version}.tar.gz
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  mingw32-filesystem >= 35
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-binutils
+BuildRequires:  mingw32-ocaml >= 3.11.0+beta1-8
+BuildRequires:  mingw32-ocaml-findlib >= 1.2.2-5
+
+
+%description
+Objective Caml library for managing dates and times.
+
+
+%prep
+%setup -q -n calendar-%{version}
+
+
+%build
+export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
+
+%{_mingw32_configure} \
+  --libdir=%{_libdir} \
+  OCAMLC=i686-pc-mingw32-ocamlc \
+  OCAMLOPT=i686-pc-mingw32-ocamlopt \
+  OCAMLDEP=i686-pc-mingw32-ocamldep
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
+export DESTDIR=$RPM_BUILD_ROOT
+export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
+
+mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
+make install
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_libdir}/%{_mingw32_target}-ocaml/calendar/
+
+
+%changelog
+* Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 2.0.4-1
+- Initial RPM release.