[ocaml-labltk] Initial packaging of new out-of-tree ocaml-labltk.

Richard W.M. Jones rjones at fedoraproject.org
Tue Jul 22 19:15:29 UTC 2014


commit 729ecbe6aa61d27a61ea429aa82f96b6d71741d7
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Jul 22 20:12:29 2014 +0100

    Initial packaging of new out-of-tree ocaml-labltk.
    
    - Enable debugging.
    - Move labltk to -devel package.
    - Enable _smp_flags.

 .gitignore                         |    1 +
 labltk-4.02-enable-debugging.patch |   28 +++++++++
 ocaml-labltk.spec                  |  109 ++++++++++++++++++++++++++++++++++++
 sources                            |    1 +
 4 files changed, 139 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..11c6d57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/labltk-4.02-beta1.tar.gz
diff --git a/labltk-4.02-enable-debugging.patch b/labltk-4.02-enable-debugging.patch
new file mode 100644
index 0000000..fba5117
--- /dev/null
+++ b/labltk-4.02-enable-debugging.patch
@@ -0,0 +1,28 @@
+--- labltk-4.02-beta1/support/Makefile.common.old	2014-07-22 16:45:36.207227548 +0100
++++ labltk-4.02-beta1/support/Makefile.common	2014-07-22 16:46:00.919241253 +0100
+@@ -23,17 +23,17 @@
+ ## Tools from the OCaml distribution
+ 
+ CAMLRUN=$(BINDIR)/ocamlrun
+-CAMLC=$(BINDIR)/ocamlc
+-CAMLOPT=$(BINDIR)/ocamlopt
+-CAMLCB=$(BINDIR)/ocamlc
+-CAMLOPTB=$(BINDIR)/ocamlopt
+-CAMLCOMP=$(CAMLC) -c -warn-error A-3
++CAMLC=$(BINDIR)/ocamlc -g
++CAMLOPT=$(BINDIR)/ocamlopt -g
++CAMLCB=$(BINDIR)/ocamlc -g
++CAMLOPTB=$(BINDIR)/ocamlopt -g
++CAMLCOMP=$(CAMLC) -c -warn-error A-3 -g
+ CAMLYACC=$(BINDIR)/ocamlyacc -v
+ CAMLLEX=$(BINDIR)/ocamllex
+-CAMLLIBR=$(CAMLC) -a
++CAMLLIBR=$(CAMLC) -a -g
+ CAMLDEP=$(BINDIR)/ocamldep
+ COMPFLAGS=-g
+ LINKFLAGS=
+-CAMLOPTLIBR=$(CAMLOPT) -a
+-MKLIB=$(BINDIR)/ocamlmklib
++CAMLOPTLIBR=$(CAMLOPT) -a -g
++MKLIB=$(BINDIR)/ocamlmklib -g
+ CAMLRUNGEN=$(BINDIR)/ocamlrun
diff --git a/ocaml-labltk.spec b/ocaml-labltk.spec
new file mode 100644
index 0000000..0aec1db
--- /dev/null
+++ b/ocaml-labltk.spec
@@ -0,0 +1,109 @@
+%ifarch %{ocaml_native_compiler}
+%global native_compiler 1
+%else
+%global native_compiler 0
+%endif
+
+Name:          ocaml-labltk
+Version:       4.02
+Release:       0.2.beta1%{?dist}
+
+Summary:       Tcl/Tk interface for OCaml
+
+License:       LGPLv2+ with exceptions
+
+URL:           https://forge.ocamlcore.org/projects/labltk/
+Source0:       https://forge.ocamlcore.org/frs/download.php/1409/labltk-4.02-beta1.tar.gz
+
+# This adds debugging (-g) everywhere.
+Patch1:        labltk-4.02-enable-debugging.patch
+
+BuildRequires: ocaml
+BuildRequires: tcl-devel, tk-devel
+
+
+%description
+labltk or mlTk is a library for interfacing OCaml with the scripting
+language Tcl/Tk (all versions since 8.0.3, but no betas).
+
+
+%package devel
+Summary:       Tcl/Tk interface for OCaml
+
+Requires:      %{name}%{?_isa} = %{version}-%{release}
+
+
+%description devel
+labltk or mlTk is a library for interfacing OCaml with the scripting
+language Tcl/Tk (all versions since 8.0.3, but no betas).
+
+This package contains the development files.
+
+
+%prep
+%setup -q -n labltk-4.02-beta1
+
+%patch1 -p1
+
+# Remove version control files which might get copied into documentation.
+find -name .gitignore -delete
+
+
+%build
+./configure
+%if !%{native_compiler}
+make %{?_smp_mflags} byte
+%else
+make %{?_smp_mflags} all
+make %{?_smp_mflags} opt
+%endif
+
+
+%install
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
+make install \
+    BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+    INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/labltk \
+    STUBLIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
+# The *.o files are not installed by the Makefile.  AIUI
+# that prevents linking with native code programs.
+install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
+
+
+%files
+%doc Changes README.mlTk
+%dir %{_libdir}/ocaml/labltk
+%{_libdir}/ocaml/labltk/*.cmi
+%{_libdir}/ocaml/labltk/*.cma
+%{_libdir}/ocaml/labltk/*.cmo
+%{_libdir}/ocaml/stublibs/dlllabltk.so
+
+
+%files devel
+%doc README.mlTk
+%doc examples_camltk
+%doc examples_labltk
+%{_bindir}/labltk
+%{_bindir}/ocamlbrowser
+%{_libdir}/ocaml/labltk/labltktop
+%{_libdir}/ocaml/labltk/pp
+%{_libdir}/ocaml/labltk/tkcompiler
+%{_libdir}/ocaml/labltk/*.a
+%if %{native_compiler}
+%{_libdir}/ocaml/labltk/*.cmxa
+%{_libdir}/ocaml/labltk/*.cmx
+%{_libdir}/ocaml/labltk/*.o
+%endif
+%{_libdir}/ocaml/labltk/*.mli
+
+
+%changelog
+* Tue Jul 22 2014 Richard W.M. Jones <rjones at redhat.com> - 4.02-0.2.beta1
+- Enable debugging.
+- Move labltk to -devel package.
+- Enable _smp_flags.
+
+* Tue Jul 22 2014 Richard W.M. Jones <rjones at redhat.com> - 4.02-0.1.beta1
+- Initial packaging of new out-of-tree ocaml-labltk.
diff --git a/sources b/sources
index e69de29..cbb446c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a683428720bf33856d81f1769b65bcb2  labltk-4.02-beta1.tar.gz


More information about the scm-commits mailing list