Commit 0f739b5e authored by erwan's avatar erwan
Browse files

Build: fix the opam package building process

parent b343b756
Pipeline #18138 passed with stages
in 3 minutes and 26 seconds
......@@ -72,7 +72,7 @@ tags:
# opam-ing
NAME=lutils
PACKNAME=$(NAME).$(PRE_VERSION)
PACKNAME=$(NAME).$(VERSION)
WWW=/import/www/DIST-TOOLS/SYNCHRONE
HTTP=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE
# for testing opam packages before publishing
......@@ -80,12 +80,13 @@ WWWTEST=/import/www/DIST-TOOLS/SYNCHRONE/test
HTTPTEST=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/test
OPAM_FILE=$(shell find $(WWW)/opam-repository/packages -name opam | grep lutils | sort | tail -1 | sed -e 's/^./\U&/')
OPAM_FILE_TEST=$(shell find $(WWW)/test/opam-repository/packages -name opam | grep lutils | sort | tail -1 | sed -e 's/^./\U&/')
OPAM_DIR=$(shell dirname $(OPAM_FILE))
OFFICIAL_OPAM_DIR=/home/jahier/local/opam-repository/packages/lutils
pack:
echo $(PACKNAME).tgz
.PHONY:$(PACKNAME).tgz
$(PACKNAME).tgz:
git archive --prefix=$(PACKNAME)/ -o $(PACKNAME).tgz HEAD
......@@ -94,24 +95,29 @@ $(WWW)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
$(WWWTEST)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
cp $^ $@
opam : $(WWW)/pool/$(PACKNAME).tgz
cd $(WWW)/opam-repository/packages && \
oasis2opam $(HTTP)/pool/$(PACKNAME).tgz && \
cp ~/lutils/opam $(OPAM_FILE) && \
cd .. ; opam-admin check && opam-admin make -g && \
cd lutils && NEW_DIR=$(shell ls -c $(WWW)/opam-repository/packages/lutils/ | head -1) && \
mv $$NEW_DIR $(PACKNAME) && cd .. && \
cp lutils/$(PACKNAME)/opam $(PWD)/opam.oasis2opam && \
cd .. && opam-admin check && opam-admin make -g && \
cp -rf $(OPAM_DIR) $(OFFICIAL_OPAM_DIR)
# ZZZ il ne faut pas qu'il y ait num dans les "depends", et oasis2opam le met !!
# Mais parfois, oasis2opam rajoute des trucs utiles, donc il faut faire attention
opam-test : $(WWWTEST)/pool/$(PACKNAME).tgz
cd $(WWWTEST)/opam-repository/packages && \
oasis2opam $(HTTPTEST)/pool/$(PACKNAME).tgz && \
cp $(OPAM_FILE_TEST) $(PWD)/opam.oasis2opam && \
cd lutils && NEW_DIR=$(shell ls -c $(WWWTEST)/opam-repository/packages/lutils/ | head -1) && \
mv $$NEW_DIR $(PACKNAME) && cd .. && \
cp lutils/$(PACKNAME)/opam $(PWD)/opam.oasis2opam && \
diff -u $(PWD)/opam.oasis2opam $(PWD)/opam | \
grep -v opam.oasis2opam > $(PWD)/opam.diff &&\
diff $(PWD)/opam.diff $(PWD)/opam.diff.exp && \
cp $(PWD)/opam $(OPAM_FILE_TEST) || \
(echo "The opam file needs some update"; exit 2) && \
cd .. ; opam-admin check && opam-admin make -g
(diff $(PWD)/opam.diff $(PWD)/opam.diff.exp && \
cp -f $(PWD)/opam lutils/$(PACKNAME)/opam || \
(echo "The opam file needs some update" && exit 2)) && \
cd $(WWWTEST)/opam-repository/ && pwd && opam-admin check && opam-admin make -g
opam-pr:
cp $(OPAM_DIR) /home/jahier/local/opam-repository/packages/
......
OASISFormat: 0.4
Name: lutils
Version: 1.48.0
Version: 1.48.1
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
License: CeCILL
......
\newcommand{\version}{1.48.0}
\newcommand{\sha}{75fb1fe}
\newcommand{\version}{1.48.1}
\newcommand{\sha}{b343b75}
\newcommand{\versionname}{none}
\newcommand{\versiondate}{15-01-19}
\newcommand{\versiondate}{24-01-19}
......@@ -23,7 +23,6 @@ depends: [
"camlp4"
"ocamlbuild" {build}
"ocamlfind"
"num"
]
available: [ ocaml-version >= "4.02" ]
post-messages: ["The last version can be obtained via (opam repo add) http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository/ "]
(* setup.ml generated for the first time by OASIS v0.4.10 *)
(* OASIS_START *)
(* DO NOT EDIT (digest: 857eb6c300e70d88d36968f1777aca19) *)
(* DO NOT EDIT (digest: 6b6fdf5e6a1a6cb3037ed1329b345503) *)
(*
Regenerated by OASIS v0.4.11
Visit http://oasis.forge.ocamlcore.org for more information and
......@@ -6871,7 +6871,7 @@ let setup_t =
{
oasis_version = "0.4";
ocaml_version = Some (OASISVersion.VGreaterEqual "4.02");
version = "1.48.0";
version = "1.48.1";
license =
OASISLicense.DEP5License
(OASISLicense.DEP5Unit
......@@ -7272,7 +7272,7 @@ let setup_t =
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.11";
oasis_digest = Some "\241T\201v&\234\146\007{\148mSx\019\232\156";
oasis_digest = Some "Z\154\154\157\159ro\244\n\016\031\218\242I/\129";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
......
# OASIS_START
# DO NOT EDIT (digest: 50b938524723b35f9aa919ea6e9c32bd)
version = "1.48.0"
# DO NOT EDIT (digest: a1b9035418d38f276ef37b7c17dc6b3c)
version = "1.48.1"
description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)."
requires = "unix str camlp4 num"
archive(byte) = "lutils.cma"
......
let str="1.48.0"
let sha="75fb1fe"
let str="1.48.1"
let sha="b343b75"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment