diff options
author | Christian Breunig <christian@breunig.cc> | 2025-03-15 21:50:00 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2025-03-15 21:50:00 +0100 |
commit | d1381eb21c8923597ff5920a8aab16cdf53285b8 (patch) | |
tree | fb0129a4e2c5b7d23317cf8f9a4b74f182329f34 | |
parent | 677d1e2bf8109b9fd4da60e20376f992b747e384 (diff) | |
download | libvyosconfig-T5400-fix-schroedingers-env.tar.gz libvyosconfig-T5400-fix-schroedingers-env.zip |
T5400: initialize OPAM environment where it's really neededT5400-fix-schroedingers-env
-rw-r--r-- | Makefile | 8 | ||||
-rwxr-xr-x | debian/rules | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -19,10 +19,10 @@ GENERATED=$(BUILDDIR)/generated/vyosconfig.h \ $(BUILDDIR)/generated/vyosconfig.c \ $(BUILDDIR)/generated/vyosconfig_bindings.ml -OSTYPE:=$(shell ocamlfind ocamlc -config | awk '/^os_type:/ {print $$2}') -SYSTEM:=$(shell ocamlfind ocamlc -config | awk '/^system:/ {print $$2}') -EXTDLL:=$(shell ocamlfind ocamlc -config | awk '/^ext_dll:/ {print $$2}') -CC:= $(shell ocamlfind ocamlc -config | awk '/^bytecomp_c_compiler/ {for(i=2;i<=NF;i++) printf "%s " ,$$i}') +OSTYPE:=$(shell eval $$(opam env --root=/opt/opam --set-root); ocamlfind ocamlc -config | awk '/^os_type:/ {print $$2}') +SYSTEM:=$(shell eval $$(opam env --root=/opt/opam --set-root); ocamlfind ocamlc -config | awk '/^system:/ {print $$2}') +EXTDLL:=$(shell eval $$(opam env --root=/opt/opam --set-root); ocamlfind ocamlc -config | awk '/^ext_dll:/ {print $$2}') +CC:= $(shell eval $$(opam env --root=/opt/opam --set-root); ocamlfind ocamlc -config | awk '/^bytecomp_c_compiler/ {for(i=2;i<=NF;i++) printf "%s " ,$$i}') ifeq ($(OSTYPE),$(filter $(OSTYPE),Win32 Cygwin)) EXTEXE=.exe diff --git a/debian/rules b/debian/rules index 8d4a32b..99a5ee2 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,7 @@ VYCONF_DEF := etc/vyos dh $@ --with quilt override_dh_auto_build: - ./build.sh $(DIR) + eval $$(opam env --root=/opt/opam --set-root) && ./build.sh $(DIR) override_dh_auto_install: mkdir -p $(DIR)/$(VYCONF_CONF) |