fc1e85f
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
fc1e85f
%define debug_package %{nil}
fc1e85f
fc1e85f
Name:           ocaml-curses
ea9599a
Version:        1.0.3
9871d48
Release:        7%{?dist}
fc1e85f
Summary:        OCaml bindings for ncurses
fc1e85f
fc1e85f
Group:          Development/Libraries
fc1e85f
License:        LGPLv2+
fc1e85f
URL:            http://savannah.nongnu.org/projects/ocaml-tmk/
ea9599a
Source0:        http://download.savannah.gnu.org/releases/ocaml-tmk/%{name}-%{version}.tar.gz
fc1e85f
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5b1747e
ExcludeArch:    sparc64 s390 s390x
fc1e85f
ea9599a
BuildRequires:  ocaml >= 3.10.2
21cad6f
BuildRequires:  ocaml-findlib-devel, ncurses-devel
d10f418
BuildRequires:  gawk
fc1e85f
ea9599a
# Doesn't include a configure script, so we have to make one.
ea9599a
BuildRequires:  autoconf, automake, libtool
ea9599a
fc1e85f
%define _use_internal_dependency_generator 0
fc1e85f
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
fc1e85f
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
fc1e85f
ea9599a
fc1e85f
%description
fc1e85f
OCaml bindings for ncurses.
fc1e85f
fc1e85f
fc1e85f
%package        devel
fc1e85f
Summary:        Development files for %{name}
fc1e85f
Group:          Development/Libraries
fc1e85f
Requires:       %{name} = %{version}-%{release}
fc1e85f
fc1e85f
fc1e85f
%description    devel
fc1e85f
The %{name}-devel package contains libraries and signature files for
fc1e85f
developing applications that use %{name}.
fc1e85f
fc1e85f
fc1e85f
%prep
ea9599a
%setup -q
ea9599a
ea9599a
autoreconf
fc1e85f
fc1e85f
fc1e85f
%build
9871d48
%configure --enable-widec
ea9599a
make all opt
ea9599a
ea9599a
strip dllcurses_stubs.so
fc1e85f
fc1e85f
fc1e85f
%install
fc1e85f
rm -rf $RPM_BUILD_ROOT
ea9599a
fc1e85f
export DESTDIR=$RPM_BUILD_ROOT
fc1e85f
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
fc1e85f
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
fc1e85f
ocamlfind install curses META *.cmi *.cmx *.cma *.cmxa *.a *.so *.mli
fc1e85f
fc1e85f
fc1e85f
%clean
fc1e85f
rm -rf $RPM_BUILD_ROOT
fc1e85f
fc1e85f
fc1e85f
%files
fc1e85f
%defattr(-,root,root,-)
fc1e85f
%doc COPYING
fc1e85f
%{_libdir}/ocaml/curses
fc1e85f
%if %opt
fc1e85f
%exclude %{_libdir}/ocaml/curses/*.a
fc1e85f
%exclude %{_libdir}/ocaml/curses/*.cmxa
fc1e85f
%exclude %{_libdir}/ocaml/curses/*.cmx
fc1e85f
%endif
fc1e85f
%exclude %{_libdir}/ocaml/curses/*.mli
fc1e85f
%{_libdir}/ocaml/stublibs/*.so
fc1e85f
%{_libdir}/ocaml/stublibs/*.so.owner
fc1e85f
fc1e85f
fc1e85f
%files devel
fc1e85f
%defattr(-,root,root,-)
fc1e85f
%doc COPYING
fc1e85f
%if %opt
fc1e85f
%{_libdir}/ocaml/curses/*.a
fc1e85f
%{_libdir}/ocaml/curses/*.cmxa
fc1e85f
%{_libdir}/ocaml/curses/*.cmx
fc1e85f
%endif
fc1e85f
%{_libdir}/ocaml/curses/*.mli
fc1e85f
fc1e85f
fc1e85f
%changelog
9871d48
* Mon Oct  4 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-7
9871d48
- Use ncursesw for wide character support.
9871d48
2b247ca
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-6
2b247ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2b247ca
7bdbbb2
* Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-5
7bdbbb2
- Rebuild for OCaml 3.11.1
7bdbbb2
5b1747e
* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org>
5b1747e
- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
5b1747e
  (added sparc64 per request from the sparc maintainer)
5b1747e
3520d69
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-4
3520d69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
3520d69
af52a60
* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-3
af52a60
- Rebuild for OCaml 3.11.0+rc1.
af52a60
34d4345
* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-2
34d4345
- Rebuild for OCaml 3.11.0
34d4345
ea9599a
* Mon Nov 17 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-1
ea9599a
- Major version leap to the latest, supported, released version.
ea9599a
4d797d9
* Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-8
4d797d9
- Rebuild for OCaml 3.10.2
4d797d9
2d4e15f
* Sat Mar  1 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-7.20020319
2d4e15f
- Rebuild for ppc64.
2d4e15f
2ccfa57
* Tue Feb 12 2008 Richard W.M. Jones <rjones@redhat.com> - 0.1-6.20020319
2ccfa57
- Rebuild for OCaml 3.10.1
2ccfa57
21cad6f
* Thu Sep  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.1-5.20020319
21cad6f
- Force rebuild because of updated requires/provides scripts in OCaml.
21cad6f
d10f418
* Thu Aug 30 2007 Richard W.M. Jones <rjones@redhat.com> - 0.1-4.20020319
d10f418
- Force rebuild because of changed BRs in base OCaml.
d10f418
fc1e85f
* Mon Aug 24 2007 Richard W.M. Jones <rjones@redhat.com> - 0.1-3.20020319
fc1e85f
- License is LGPL 2.1 or any later version.
fc1e85f
fc1e85f
* Mon Aug  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.1-2.20020319
fc1e85f
- The archive is called 'mlcurses.*'.
fc1e85f
fc1e85f
* Mon Aug  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.1-1.20020319
fc1e85f
- Initial RPM release.