[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 02 of 14] Customise ocaml RPM spec file



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1275056214 -3600
# Node ID 0ad336c1ec1de1ec5834d377fba0fe12def307fa
# Parent  1fb2fb4ba79648fa76eaf1c1ab9d0f995e580289
Customise ocaml RPM spec file
* set Release to @XEN_RELEASE@ (initially xcp0.2)
* remove X11/tk/emacs dependencies

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 1fb2fb4ba796 -r 0ad336c1ec1d Makefile
--- a/Makefile  Fri May 28 15:16:44 2010 +0100
+++ b/Makefile  Fri May 28 15:16:54 2010 +0100
@@ -6,7 +6,12 @@
 MY_OBJ_DIR ?= $(CURDIR)/obj
 REPO ?= $(CURDIR)
 
-CARBON_DISTFILES ?= /usr/groups/linux/distfiles
+RPM_SPECSDIR?=/usr/src/redhat/SPECS
+RPM_SRPMSDIR?=/usr/src/redhat/SRPMS
+RPM_SOURCEDIR?=/usr/src/redhat/SOURCES
+XEN_RELEASE?=unknown
+
+CARBON_DISTFILES ?= /data
 
 %/.dirstamp:
        @mkdir -p $*
@@ -19,6 +24,14 @@
 .PHONY: build
 build: $(MY_OUTPUT_DIR)/ocaml-libs.tar.gz $(MY_SOURCES)/MANIFEST
        @ :
+
+OCAML_VERSION=3.11.0
+
+.PHONY: srpm
+srpm:
+       cp $(CARBON_DISTFILES)/ocaml-${OCAML_VERSION}.tar.bz2 $(RPM_SOURCEDIR)/
+       rpmbuild -bs ocaml.spec
+
 
 $(MY_OUTPUT_DIR)/ocaml-libs.tar.gz: $(MY_OUTPUT_DIR)/.dirstamp
        $(MAKE) $(foreach c,$(COMPONENTS),install-$(c))
diff -r 1fb2fb4ba796 -r 0ad336c1ec1d ocaml.spec
--- a/ocaml.spec        Fri May 28 15:16:44 2010 +0100
+++ b/ocaml.spec        Fri May 28 15:16:54 2010 +0100
@@ -1,50 +1,23 @@
-# $Id: ocaml.spec 6690 2009-02-05 09:58:06Z cmr $
-# Authority: dries
 
-%{?dtag: %{expand: %%define %dtag 1}}
+%define XEN_RELEASE %(test -z "${XEN_RELEASE}" && echo unknown || echo 
$XEN_RELEASE)
 
-%{?fc4:%define _without_modxorg 1}
-%{?el4:%define _without_modxorg 1}
-%{?fc3:%define _without_modxorg 1}
-%{?fc2:%define _without_modxorg 1}
-%{?fc1:%define _without_modxorg 1}
-%{?el3:%define _without_modxorg 1}
-%{?rh9:%define _without_modxorg 1}
-%{?rh7:%define _without_modxorg 1}
-%{?el2:%define _without_modxorg 1}
-%{?rh6:%define _without_modxorg 1}
-%{?yd3:%define _without_modxorg 1}
-
-%{?rh9:%define _without_tcltk_devel 1}
-%{?rh8:%define _without_tcltk_devel 1}
-%{?rh7:%define _without_tcltk_devel 1}
-%{?el2:%define _without_tcltk_devel 1}
-%{?rh6:%define _without_tcltk_devel 1}
 %define major 3.11
 
 Summary: Objective Caml
 Name: ocaml
 Version: %{major}.0
-Release: 1.rf
+Release: %{XEN_RELEASE}
 License: QPL/LGPL
 Group: Development/Languages
 URL: http://caml.inria.fr/
 
-Packager: Dries Verachtert <dries@xxxxxxxxxxx>
-Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
+Packager: David Scott <dave.scott@xxxxxxxxxxxxx>
+Vendor: http://www.xen.org/
 
 Source0: http://caml.inria.fr/distrib/ocaml-%{major}/ocaml-%{version}.tar.bz2
-Source1: 
http://caml.inria.fr/distrib/ocaml-%{major}/ocaml-%{major}-refman.html.tar.gz
-Source2: 
http://caml.inria.fr/distrib/ocaml-%{major}/ocaml-%{major}-refman.ps.gz
-Source3: 
http://caml.inria.fr/distrib/ocaml-%{major}/ocaml-%{major}-refman.info.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
-BuildRequires: ncurses-devel, gdbm-devel, emacs
-%{!?_without_modxorg:BuildRequires: libX11-devel}
-%{?_without_modxorg:BuildRequires: XFree86-devel}
-%{!?_without_tcltk_devel:BuildRequires: tcl-devel >= 8.3, tk-devel}
-%{?_without_tcltk_devel:BuildRequires: tcl >= 8.3, tk}
-Obsoletes: ocaml-ocamldoc <= %{version}-%{release}
+BuildRequires: ncurses-devel
 
 %description
 Objective Caml is the latest implementation of the Caml dialect of ML. It
@@ -53,16 +26,6 @@
 retaining separate compilation), a high-performance native code compiler (in
 addition to a Caml Light-style bytecode compiler), and labeled arguments
 with possible default value.
-
-%package labltk
-Summary: Tk bindings for Objective Caml
-Group: Development/Languages
-Requires: ocaml = %{version}-%{release}
-Obsoletes: labltk <= %{version}-%{release}
-
-%description labltk
-A library for interfacing Objective Caml with the scripting language
-Tcl/Tk. It include the OCamlBrowser code editor / library browser.
 
 %package camlp4
 Group: Development/Languages
@@ -74,20 +37,8 @@
 Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
 file and printing some result on standard output.
 
-%package -n emacs-ocaml
-Summary: Emacs mode for Objective Caml
-Group: Applications/Editors
-Requires: ocaml = %{version}-%{release}
-Obsoletes: ocaml-emacs <= %{version}
-
-%description -n emacs-ocaml
-Emacs mode for Objective Caml.
-
 %prep
 %setup -T -b 0
-%setup -T -D -a 1
-%setup -T -D -a 3
-%{__cp} -v %{SOURCE2} refman.ps.gz
 
 %build
 ./configure \
@@ -97,49 +48,24 @@
     -mandir "%{_mandir}" \
     -prefix "%{_prefix}" \
     -verbose \
-    -with-pthread \
-%{!?_without_modxorg:-x11lib "%{_libdir}"} \
-%{?_without_modxorg:-x11lib "%{_prefix}/X11/%{_lib}"}
-#%{__make} %{?_smp_mflags} world bootstrap opt opt.opt
+    -with-pthread
 %{__make} world bootstrap opt opt.opt
-%{__make} -C emacs ocamltags
 
 %install
 %{__rm} -rf %{buildroot}
 %{__make} install BINDIR="%{buildroot}%{_bindir}" 
LIBDIR="%{buildroot}%{_libdir}/ocaml" MANDIR="%{buildroot}%{_mandir}"
 %{__perl} -pi.orig -e 's|^%{buildroot}||' %{buildroot}%{_libdir}/ocaml/ld.conf
 
-%{__make} -C emacs install install-ocamltags BINDIR="%{buildroot}%{_bindir}" 
EMACSDIR="%{buildroot}%{_datadir}/emacs/site-lisp"
-
-%{__install} -d %{buildroot}%{_infodir}
-%{__install} -p -m0644 infoman/ocaml*.gz %{buildroot}%{_infodir}
-
 %clean
 %{__rm} -rf %{buildroot}
 
 %files
 %defattr(-, root, root, 0755)
-%doc Changes htmlman/ INSTALL LICENSE README refman.ps.gz
+%doc Changes INSTALL LICENSE README
 %doc %{_mandir}/man1/*.1*
 %doc %{_mandir}/man3/*.3*
-%doc %{_infodir}/ocaml*
 %{_bindir}/*
 %{_libdir}/ocaml/
-
-### in ocaml-camlp4
-%exclude %{_bindir}/camlp4*
-%exclude %{_bindir}/mkcamlp4
-%exclude %{_libdir}/ocaml/camlp4/
-
-### in ocaml-labltk
-%exclude %{_bindir}/labltk
-%exclude %{_bindir}/ocamlbrowser
-%exclude %{_libdir}/ocaml/labltk/
-%exclude %{_libdir}/ocaml/stublibs/dlllabltk.so
-%exclude %{_libdir}/ocaml/stublibs/dlltkanim.so
-
-### in emacs-ocaml
-%exclude %{_bindir}/ocamltags
 
 %files camlp4
 %defattr(-, root, root, 0755)
@@ -148,27 +74,10 @@
 %dir %{_libdir}/ocaml/
 %{_libdir}/ocaml/camlp4/
 
-%files labltk
-%defattr(-, root, root, 0755)
-%doc otherlibs/labltk/examples_*tk
-%{_bindir}/labltk
-%{_bindir}/ocamlbrowser
-%dir %{_libdir}/ocaml/
-%dir %{_libdir}/ocaml/stublibs/
-%{_libdir}/ocaml/labltk/
-%{_libdir}/ocaml/stublibs/dlllabltk.so
-%{_libdir}/ocaml/stublibs/dlltkanim.so
+%changelog
+* Fri May 14 2010 David Scott <dave.scott@xxxxxxxxxxxxx>
+- Customise for use in XCP build
 
-%files -n emacs-ocaml
-%defattr(-, root, root, 0755)
-%doc emacs/README
-%{_bindir}/ocamltags
-%dir %{_datadir}/emacs/
-%dir %{_datadir}/emacs/site-lisp/
-%{_datadir}/emacs/site-lisp/*.el
-%{_datadir}/emacs/site-lisp/*.elc
-
-%changelog
 * Sun May  4 2008 Dries Verachtert <dries@xxxxxxxxxxx> - 3.11.0-1 - 6690/cmr
 - Updated to release 3.11.0.
 

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.