File ocaml-labltk.spec of Package ocaml-labltk
#
# spec file for package ocaml-labltk
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
Version: 8.06.0
%{ocaml_preserve_bytecode}
Name: ocaml-labltk
Release: 0
Summary: Tcl/Tk framework for ocaml
License: SUSE-LGPL-2.0-with-linking-exception
Group: System/Libraries
Url: https://forge.ocamlcore.org/projects/labltk/
Source: labltk-%{version}.tar.xz
Conflicts: ocaml < 4.02.0
BuildRequires: ocaml >= 4.02.0
BuildRequires: ocaml-findlib
BuildRequires: ocaml-rpm-macros >= 4.02.1
BuildRequires: tcl-devel
BuildRequires: tk-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
LablTk is an interface to the Tcl/Tk GUI framework. It allows to
develop GUI applications in a speedy and type safe way. A legacy
Camltk interface is included. The OCamlBrowser library viewer is
also part of this project.
%package devel
Summary: Development files for labltk
Group: Development/Libraries/Other
Requires: %{name} = %{version}
Requires: tcl-devel
Requires: tk-devel
Requires: xorg-x11-libX11-devel
%description devel
Labltk is a library for interfacing Objective Caml with the scripting
language Tcl/Tk.
This package contains the development files. It includes the ocaml
browser for code editing and library browsing.
%prep
%setup -q -n labltk-%{version}
find -name .gitignore -print -delete
%build
./configure --use-findlib
make \
%{?_smp_mflags} \
byte
%if %{ocaml_native_compiler}
make \
%{?_smp_mflags} \
opt
%endif
%install
ld_conf=$PWD/ld.conf
> $ld_conf
d="$RPM_BUILD_ROOT`ocamlfind printconf destdir`"
mkdir -vp $d/labltk
mkdir -vp $d/stublibs
env \
OCAMLFIND_LDCONF=$ld_conf \
OCAMLFIND_DESTDIR=$d \
make \
BINDIR="$RPM_BUILD_ROOT%{_bindir}" \
INSTALLDIR=$d/labltk \
STUBLIBDIR=$d/stublibs \
install
find examples* -type f -exec chmod -v 644 {} \;
cat $ld_conf
%files
%defattr(-,root,root,-)
%{_bindir}/labltk
%{_libdir}/ocaml
%exclude %{_libdir}/ocaml/labltk/labltktop
%exclude %{_libdir}/ocaml/labltk/pp
%exclude %{_libdir}/ocaml/labltk/tkcompiler
%if %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/*/*.a
%exclude %{_libdir}/ocaml/*/*.cmx
%exclude %{_libdir}/ocaml/*/*.cmxa
%endif
%exclude %{_libdir}/ocaml/*/*.mli
%files devel
%defattr(-,root,root,-)
%{_bindir}/ocamlbrowser
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/labltk
%{_libdir}/ocaml/labltk/labltktop
%{_libdir}/ocaml/labltk/pp
%{_libdir}/ocaml/labltk/tkcompiler
%if %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.a
%{_libdir}/ocaml/*/*.cmx
%{_libdir}/ocaml/*/*.cmxa
%endif
%{_libdir}/ocaml/*/*.mli
%doc examples_labltk
%doc examples_camltk
%changelog