[Pkg-ocaml-maint-commits] [SCM] oasis2debian project branch, master, updated. 37e7e5530e3f26b42f5628706f10b6a0e6c42244
Sylvain Le Gall
gildor at debian.org
Tue Dec 14 10:33:38 UTC 2010
The following commit has been merged in the master branch:
commit 0d662fe028643228c4ca732eff19246bbdec12c0
Author: Sylvain Le Gall <gildor at debian.org>
Date: Mon Nov 22 16:00:53 2010 +0100
Allow to choose name of the executable package
diff --git a/src/Common.ml b/src/Common.ml
index c02c60e..4bb60de 100644
--- a/src/Common.ml
+++ b/src/Common.ml
@@ -50,8 +50,8 @@ type t =
(** Evaluation environment for OASISExpr *)
expr: Expr.t;
- (** Standard Debian package *)
- deb_std: deb_pkg option;
+ (** Executables Debian package *)
+ deb_exec: deb_pkg option;
(** Library + runtime package *)
deb_dev: (deb_pkg * deb_pkg) option;
diff --git a/src/Control.ml b/src/Control.ml
index 242229b..c54e9b9 100644
--- a/src/Control.ml
+++ b/src/Control.ml
@@ -96,7 +96,7 @@ Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/${src_name}.git
Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/${src_name}.git");
begin
- match t.deb_std with
+ match t.deb_exec with
| Some deb_pkg ->
output_intro deb_pkg;
output_content
diff --git a/src/DhFiles.ml b/src/DhFiles.ml
index 8c8f1f4..c825eb1 100644
--- a/src/DhFiles.ml
+++ b/src/DhFiles.ml
@@ -198,7 +198,7 @@ Section: Programming/OCaml");
in
begin
- match t.deb_std with
+ match t.deb_exec with
| Some deb_pkg ->
dh_with_fn deb_pkg "install"
(output_content "usr/bin")
diff --git a/src/GenPkg.ml b/src/GenPkg.ml
index dd89a15..a017095 100644
--- a/src/GenPkg.ml
+++ b/src/GenPkg.ml
@@ -33,6 +33,14 @@ let library_name =
(fun () ->
failwith "Not set"))
+let executable_name =
+ Conf.create
+ ~cli:"--executable-name"
+ "Full name of the package that contains executables"
+ (Conf.Fun
+ (fun () ->
+ failwith "Not set"))
+
let set ~ctxt t =
let lib, doc, bin =
@@ -124,12 +132,15 @@ let set ~ctxt t =
| [], bin ->
begin
(* Only a binary package, name = source name *)
- let base_name =
- t.deb_name
+ let exec_name =
+ if Conf.is_set executable_name then
+ Conf.get ~ctxt executable_name
+ else
+ t.deb_name
in
add_doc
(base_name^"-doc")
- {t with deb_std = Some (mk_deb base_name bin)}
+ {t with deb_exec = Some (mk_deb exec_name bin)}
end
| lib, bin ->
@@ -145,9 +156,13 @@ let set ~ctxt t =
(* Also executables ? *)
let t =
if bin <> [] then
- {t with
- deb_std =
- Some (mk_deb (spf "lib%s-ocaml-bin" base_name) bin)}
+ let exec_name =
+ if Conf.is_set executable_name then
+ Conf.get ~ctxt executable_name
+ else
+ spf "lib%s-ocaml-bin" base_name
+ in
+ {t with deb_exec = Some (mk_deb exec_name bin)}
else
t
in
diff --git a/src/Main.ml b/src/Main.ml
index 04a32a0..416eb0a 100644
--- a/src/Main.ml
+++ b/src/Main.ml
@@ -145,7 +145,7 @@ let () =
pkg = pkg;
pkg_generic = pkg_generic;
expr = expr;
- deb_std = None;
+ deb_exec = None;
deb_dev = None;
deb_doc = None;
}
diff --git a/src/Rules.ml b/src/Rules.ml
index 9155c54..fcd6423 100644
--- a/src/Rules.ml
+++ b/src/Rules.ml
@@ -24,7 +24,7 @@ open Common
(* Create debian/rules *)
let create t =
let destdir =
- match t.deb_std, t.deb_dev, t.deb_doc with
+ match t.deb_exec, t.deb_dev, t.deb_doc with
| Some deb_pkg, None, None
| _, _, Some deb_pkg ->
(* Only one package, move data directly into
--
oasis2debian project
More information about the Pkg-ocaml-maint-commits
mailing list