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: ...@@ -72,7 +72,7 @@ tags:
# opam-ing # opam-ing
NAME=lutils NAME=lutils
PACKNAME=$(NAME).$(PRE_VERSION) PACKNAME=$(NAME).$(VERSION)
WWW=/import/www/DIST-TOOLS/SYNCHRONE WWW=/import/www/DIST-TOOLS/SYNCHRONE
HTTP=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE HTTP=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE
# for testing opam packages before publishing # for testing opam packages before publishing
...@@ -80,12 +80,13 @@ WWWTEST=/import/www/DIST-TOOLS/SYNCHRONE/test ...@@ -80,12 +80,13 @@ WWWTEST=/import/www/DIST-TOOLS/SYNCHRONE/test
HTTPTEST=http://www-verimag.imag.fr/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)) OPAM_DIR=$(shell dirname $(OPAM_FILE))
OFFICIAL_OPAM_DIR=/home/jahier/local/opam-repository/packages/lutils OFFICIAL_OPAM_DIR=/home/jahier/local/opam-repository/packages/lutils
pack:
echo $(PACKNAME).tgz
.PHONY:$(PACKNAME).tgz
$(PACKNAME).tgz: $(PACKNAME).tgz:
git archive --prefix=$(PACKNAME)/ -o $(PACKNAME).tgz HEAD git archive --prefix=$(PACKNAME)/ -o $(PACKNAME).tgz HEAD
...@@ -94,24 +95,29 @@ $(WWW)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz ...@@ -94,24 +95,29 @@ $(WWW)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
$(WWWTEST)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz $(WWWTEST)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
cp $^ $@ cp $^ $@
opam : $(WWW)/pool/$(PACKNAME).tgz opam : $(WWW)/pool/$(PACKNAME).tgz
cd $(WWW)/opam-repository/packages && \ cd $(WWW)/opam-repository/packages && \
oasis2opam $(HTTP)/pool/$(PACKNAME).tgz && \ oasis2opam $(HTTP)/pool/$(PACKNAME).tgz && \
cp ~/lutils/opam $(OPAM_FILE) && \ cd lutils && NEW_DIR=$(shell ls -c $(WWW)/opam-repository/packages/lutils/ | head -1) && \
cd .. ; opam-admin check && opam-admin make -g && \ 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) 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 opam-test : $(WWWTEST)/pool/$(PACKNAME).tgz
cd $(WWWTEST)/opam-repository/packages && \ cd $(WWWTEST)/opam-repository/packages && \
oasis2opam $(HTTPTEST)/pool/$(PACKNAME).tgz && \ 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 | \ diff -u $(PWD)/opam.oasis2opam $(PWD)/opam | \
grep -v opam.oasis2opam > $(PWD)/opam.diff &&\ grep -v opam.oasis2opam > $(PWD)/opam.diff &&\
diff $(PWD)/opam.diff $(PWD)/opam.diff.exp && \ (diff $(PWD)/opam.diff $(PWD)/opam.diff.exp && \
cp $(PWD)/opam $(OPAM_FILE_TEST) || \ cp -f $(PWD)/opam lutils/$(PACKNAME)/opam || \
(echo "The opam file needs some update"; exit 2) && \ (echo "The opam file needs some update" && exit 2)) && \
cd .. ; opam-admin check && opam-admin make -g cd $(WWWTEST)/opam-repository/ && pwd && opam-admin check && opam-admin make -g
opam-pr: opam-pr:
cp $(OPAM_DIR) /home/jahier/local/opam-repository/packages/ cp $(OPAM_DIR) /home/jahier/local/opam-repository/packages/
......
OASISFormat: 0.4 OASISFormat: 0.4
Name: lutils Name: lutils
Version: 1.48.0 Version: 1.48.1
Authors: Erwan Jahier Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr Maintainers: erwan.jahier@imag.fr
License: CeCILL License: CeCILL
......
\newcommand{\version}{1.48.0} \newcommand{\version}{1.48.1}
\newcommand{\sha}{75fb1fe} \newcommand{\sha}{b343b75}
\newcommand{\versionname}{none} \newcommand{\versionname}{none}
\newcommand{\versiondate}{15-01-19} \newcommand{\versiondate}{24-01-19}
...@@ -23,7 +23,6 @@ depends: [ ...@@ -23,7 +23,6 @@ depends: [
"camlp4" "camlp4"
"ocamlbuild" {build} "ocamlbuild" {build}
"ocamlfind" "ocamlfind"
"num"
] ]
available: [ ocaml-version >= "4.02" ] 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/ "] 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 *) (* setup.ml generated for the first time by OASIS v0.4.10 *)
(* OASIS_START *) (* OASIS_START *)
(* DO NOT EDIT (digest: 857eb6c300e70d88d36968f1777aca19) *) (* DO NOT EDIT (digest: 6b6fdf5e6a1a6cb3037ed1329b345503) *)
(* (*
Regenerated by OASIS v0.4.11 Regenerated by OASIS v0.4.11
Visit http://oasis.forge.ocamlcore.org for more information and Visit http://oasis.forge.ocamlcore.org for more information and
...@@ -6871,7 +6871,7 @@ let setup_t = ...@@ -6871,7 +6871,7 @@ let setup_t =
{ {
oasis_version = "0.4"; oasis_version = "0.4";
ocaml_version = Some (OASISVersion.VGreaterEqual "4.02"); ocaml_version = Some (OASISVersion.VGreaterEqual "4.02");
version = "1.48.0"; version = "1.48.1";
license = license =
OASISLicense.DEP5License OASISLicense.DEP5License
(OASISLicense.DEP5Unit (OASISLicense.DEP5Unit
...@@ -7272,7 +7272,7 @@ let setup_t = ...@@ -7272,7 +7272,7 @@ let setup_t =
}; };
oasis_fn = Some "_oasis"; oasis_fn = Some "_oasis";
oasis_version = "0.4.11"; 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_exec = None;
oasis_setup_args = []; oasis_setup_args = [];
setup_update = false setup_update = false
......
# OASIS_START # OASIS_START
# DO NOT EDIT (digest: 50b938524723b35f9aa919ea6e9c32bd) # DO NOT EDIT (digest: a1b9035418d38f276ef37b7c17dc6b3c)
version = "1.48.0" version = "1.48.1"
description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)." description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)."
requires = "unix str camlp4 num" requires = "unix str camlp4 num"
archive(byte) = "lutils.cma" archive(byte) = "lutils.cma"
......
let str="1.48.0" let str="1.48.1"
let sha="75fb1fe" 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