[Pkg-ocaml-maint-commits] [SCM] opam packaging branch, master, updated. upstream/0.9.0-5-g729d519
Mehdi Dogguy
mehdi at debian.org
Sat Jan 12 23:29:57 UTC 2013
The following commit has been merged in the master branch:
commit 735527bfea7060cf0562cb41ae02695422d7af58
Author: Mehdi Dogguy <mehdi at debian.org>
Date: Sat Jan 12 23:15:32 2013 +0100
Initial packaging
diff --git a/debian/buildsys/_tags b/debian/buildsys/_tags
new file mode 100644
index 0000000..4bd0785
--- /dev/null
+++ b/debian/buildsys/_tags
@@ -0,0 +1,3 @@
+<**/*>: debug, thread
+<**/*.ml*>: annot
+<src/core> or <src/client> or <src/repositories> or <src/scripts> or <src/solver>: include
diff --git a/debian/buildsys/byte.itarget b/debian/buildsys/byte.itarget
new file mode 100644
index 0000000..eb6ba6f
--- /dev/null
+++ b/debian/buildsys/byte.itarget
@@ -0,0 +1,4 @@
+src/client/opamMain.byte
+src/scripts/opam_mk_repo.byte
+src/scripts/opam_check.byte
+src/scripts/opam_repo_check.byte
diff --git a/debian/buildsys/myocamlbuild.ml b/debian/buildsys/myocamlbuild.ml
new file mode 100644
index 0000000..4310db9
--- /dev/null
+++ b/debian/buildsys/myocamlbuild.ml
@@ -0,0 +1,84 @@
+(**************************************************************************)
+(* Copyright © 2009-2010 Stéphane Glondu <steph at glondu.net> *)
+(* © 2010 Mehdi Dogguy <mehdi at dogguy.org> *)
+(* *)
+(* This program is free software: you can redistribute it and/or modify *)
+(* it under the terms of the GNU Affero General Public License as *)
+(* published by the Free Software Foundation, either version 3 of the *)
+(* License, or (at your option) any later version, with the additional *)
+(* exemption that compiling, linking, and/or using OpenSSL is allowed. *)
+(* *)
+(* This program is distributed in the hope that it will be useful, but *)
+(* WITHOUT ANY WARRANTY; without even the implied warranty of *)
+(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *)
+(* Affero General Public License for more details. *)
+(* *)
+(* You should have received a copy of the GNU Affero General Public *)
+(* License along with this program. If not, see *)
+(* <http://www.gnu.org/licenses/>. *)
+(**************************************************************************)
+
+open Printf
+open Ocamlbuild_plugin
+
+let name = "ben"
+let packages = [
+ "cudf";
+ "ocamlgraph";
+ "dose3.algo";
+ "dose3.debian";
+ "unix";
+ "re.glob";
+ "re.pcre";
+ "cmdliner";
+ "extlib";
+]
+
+exception Require_findlib
+exception Missing_findlib_package of string
+exception Subprocess_died_unexpectedly of Unix.process_status
+
+let try_exec cmd =
+ Sys.command (sprintf "%s >/dev/null 2>&1" cmd) = 0
+
+let require pkg =
+ if not (try_exec (sprintf "ocamlfind query %s" pkg)) then
+ raise (Missing_findlib_package pkg)
+
+let ocamlfind x = S[A"ocamlfind"; A x]
+let has_ocamlopt = try_exec "which ocamlopt"
+let best =
+ try Sys.getenv "OCAMLBEST"
+ with Not_found -> if has_ocamlopt then "native" else "byte"
+let () = if not (try_exec "ocamlfind printconf") then raise Require_findlib
+let () = List.iter require packages
+let main_executable = sprintf "bin/%s.%s" name best
+
+let () =
+ dispatch begin function
+
+ | Before_options ->
+ Options.ocamlc := ocamlfind "ocamlc";
+ Options.ocamlopt := ocamlfind "ocamlopt";
+ Options.ocamldep := ocamlfind "ocamldep";
+ Options.ocamldoc := ocamlfind "ocamldoc";
+ (* Options.use_menhir := true;*)
+
+ | After_rules ->
+ List.iter
+ (fun dir ->
+ Pathname.define_context dir ["lib"]
+ )
+ ["client"; "core"; "repositories"; "scripts"; "solver"];
+ flag ["ocaml"; "link"; "program"] & A"-linkpkg";
+ List.iter
+ (fun pkg ->
+ let flag x = flag (x::["ocaml"]) & S[A"-package"; A pkg] in
+ List.iter flag ["ocamldep"; "compile"; "link"; "doc"])
+ packages;
+
+ (* why isn't this done by default? *)
+ flag ["library"; "link"; "thread"] (A"-thread");
+
+ | _ -> ()
+ end
diff --git a/debian/buildsys/opt.itarget b/debian/buildsys/opt.itarget
new file mode 100644
index 0000000..b513edf
--- /dev/null
+++ b/debian/buildsys/opt.itarget
@@ -0,0 +1,4 @@
+src/client/opamMain.native
+src/scripts/opam_mk_repo.native
+src/scripts/opam_check.native
+src/scripts/opam_repo_check.native
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..56540a6
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+opam (0.9.0-1) UNRELEASED; urgency=low
+
+ * Initial upload (Closes: #641986)
+
+ -- Mehdi Dogguy <mehdi at debian.org> Sun, 06 Jan 2013 10:50:00 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..4890866
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,53 @@
+Source: opam
+Section: ocaml
+Priority: optional
+Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
+Uploaders:
+ Mehdi Dogguy <mehdi at debian.org>
+Build-Depends:
+ debhelper (>= 8),
+ ocaml-nox,
+ ocaml-findlib (>= 1.2.4),
+ dh-ocaml (>= 0.9),
+ libcudf-ocaml-dev,
+ libdose3-ocaml-dev (>= 3.1.2),
+ libre-ocaml-dev,
+ libcmdliner-ocaml-dev,
+ libextlib-ocaml-dev,
+ libocamlgraph-ocaml-dev (>= 1.8)
+Standards-Version: 3.9.3
+Homepage: http://opam.ocamlpro.com
+Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/opam.git
+Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/opam.git
+
+Package: opam
+Architecture: any
+Section: ocaml
+Depends:
+ ${ocaml:Depends},
+ ${shlibs:Depends},
+ ${misc:Depends},
+ wget | curl
+Recommends:
+ git,
+ rsync
+Description: package manager for OCaml
+ OPAM stands for OCaml PAckage Manager. It aims to suit to a vast number
+ of users and use cases, and has unique features:
+ * Powerful handling of dependencies: versions constraints, optional
+ dependencies, conflicts, etc.
+ * Multiple repositories backends: HTTP, rsync, git
+ * Ease to create packages and repositories
+ * Ability to switch between different compiler versions
+ .
+ Typically, OPAM will probably make your life easier if you recognize
+ yourself in at least one of these profiles:
+ * You use multiple versions of the OCaml compiler, or you hack the compiler
+ yourself and needs to frequently switch between compiler versions.
+ * You use or develop software that needs a specific and/or modified version
+ of the OCaml compiler to be installed.
+ * You use or develop software that depends on a specific version of an OCaml
+ library, or you just want to install a specific version of a package, not
+ just the latest one.
+ * You want to create your own packages yourself, put them on your own
+ repository, with minimal effort.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..29dc8de
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,60 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://opam.ocamlpro.com
+
+Files: m4/ax_compare_version.m4
+Copyright: © 2008 Tim Toolan <toolan at ele.uri.edu>
+License: Other
+ Copying and distribution of this file, with or without modification, are
+ permitted in any medium without royalty provided the copyright notice
+ and this notice are preserved. This file is offered as-is, without any
+ warranty.
+
+Files: m4/ocaml.m4
+Copyright: © 2009 Richard W.M. Jones
+ © 2009 Stefano Zacchiroli
+ © 2000-2005 Olivier Andrieu
+ © 2000-2005 Jean-Christophe Filliâtre
+ © 2000-2005 Georges Mariano
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * The names of the contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ ocaml.m4 is shipped in the ocaml-tools Debian package.
+
+Files: **/*.ocp
+Copyright: © 2011-2012 OcamlPro
+License: GPL-3
+ See `/usr/share/common-licenses/GPL-3'.
+
+Files: **/*.ml*
+Copyright: © 2012 OcamlPro
+ © 2012 INRIA
+License: GPL-3
+ See `/usr/share/common-licenses/GPL-3'.
+
+Files: debian/*
+Copyright: © 2013 Mehdi Dogguy <mehdi at debian.org>
+License: GPL-3
+ The Debian packaging is licensed under the GPL, see
+ `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/opam.manpages b/debian/opam.manpages
new file mode 100644
index 0000000..a70e6f3
--- /dev/null
+++ b/debian/opam.manpages
@@ -0,0 +1 @@
+doc/man/*.1
diff --git a/debian/patches/0001-Use-Re_pcre-instead-of-Pcre.patch b/debian/patches/0001-Use-Re_pcre-instead-of-Pcre.patch
new file mode 100644
index 0000000..85c2b56
--- /dev/null
+++ b/debian/patches/0001-Use-Re_pcre-instead-of-Pcre.patch
@@ -0,0 +1,36 @@
+From: Mehdi Dogguy <mehdi at debian.org>
+Date: Sat, 12 Jan 2013 23:20:30 +0100
+Subject: Use Re_pcre instead of Pcre
+
+---
+ src/core/opamFile.ml | 2 +-
+ src/core/opamMisc.ml | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/opamFile.ml b/src/core/opamFile.ml
+index 0161913..9658fc8 100644
+--- a/src/core/opamFile.ml
++++ b/src/core/opamFile.ml
+@@ -1367,7 +1367,7 @@ module Subst = struct
+ let v = OpamVariable.Full.of_string str in
+ OpamVariable.string_of_variable_contents (f v) in
+ let rex = Re_perl.compile_pat "%\\{[^%]+\\}%" in
+- Pcre.substitute ~rex ~subst t
++ Re_pcre.substitute ~rex ~subst t
+
+ let replace_string = replace
+
+diff --git a/src/core/opamMisc.ml b/src/core/opamMisc.ml
+index ba24f08..44833d1 100644
+--- a/src/core/opamMisc.ml
++++ b/src/core/opamMisc.ml
+@@ -215,7 +215,7 @@ let contains s c =
+ with Not_found -> false
+
+ let split s c =
+- Pcre.split ~rex:(Re_perl.compile (Re.char c)) s
++ Re_pcre.split ~rex:(Re_perl.compile (Re.char c)) s
+
+ (* Remove from a ':' separated list of string the one with the given prefix *)
+ let reset_env_value ~prefix v =
+--
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6c079f2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Use-Re_pcre-instead-of-Pcre.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..225ccfd
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,47 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+DESTDIR=$(CURDIR)/debian/opam
+include /usr/share/ocaml/ocamlvars.mk
+OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
+BINEXT = $(if $(OCAML_OPT_ARCH),native,byte)
+
+%:
+ dh $@ --with ocaml
+
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
+ ./configure
+ for file in `ls -1 debian/buildsys/`; do \
+ ln -s debian/buildsys/$$file; \
+ done
+
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
+ ocamlbuild $(OCAML_BEST).otarget
+ $(MAKE) -C doc OPAM=../opamMain.native man
+
+.PHONY: override_dh_auto_test
+override_dh_auto_test:
+ true
+
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
+ mkdir -p $(DESTDIR)/usr/bin
+ cp _build/src/client/opamMain.$(BINEXT) $(DESTDIR)/usr/bin/opam
+ cp _build/src/scripts/opam_mk_repo.$(BINEXT) $(DESTDIR)/usr/bin/opam-mk-repo
+ cp _build/src/scripts/opam_repo_check.$(BINEXT) $(DESTDIR)/usr/bin/opam-repo-check
+ cp _build/src/scripts/opam_check.$(BINEXT) $(DESTDIR)/usr/bin/opam-check
+
+.PHONY: override_dh_install
+override_dh_install:
+ dh_install --fail-missing
+
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean:
+ for file in `ls -1 debian/buildsys/`; do \
+ $(RM) -f $$file || true; \
+ done
+ [ ! -e Makefile.config ] || $(MAKE) clean
+ $(RM) -rf _build
+ $(RM) -f src/core/opamVersion.ml Makefile.config config.log config.status *.$(BINEXT)
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..2f5c4b4
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://github.com/ocamlpro/opam/tags/ /.*/([\d\.]+)\.tar\.gz
--
opam packaging
More information about the Pkg-ocaml-maint-commits
mailing list