TT#101060 Build-Depend on either yarnpkg or yarn + use according binary

Debian/buster provides yarnpkg, but as of Debian/bullseye
it's named yarn (as provided by upstream).

Recent yarn versions also depend on node.js:

| Yarn requires Node.js 4.0 or higher to be installed.

Correspondingly Build-Depend on yarnpkg | nodejs (>= 12.19.0~) (to
support buster + bullseye at the same time), using the nodejs package
version as present in current Debian/testing (bullseye) as base.

Change-Id: I311e814beb3ca3f606b543e6116476f222276d78
pull/4/head
Michael Prokop 6 years ago
parent e86d06d806
commit 49956d7085

3
debian/control vendored

@ -6,7 +6,8 @@ Homepage: https://www.sipwise.com/
Standards-Version: 3.9.8 Standards-Version: 3.9.8
Build-Depends: Build-Depends:
debhelper-compat (= 12), debhelper-compat (= 12),
yarnpkg, yarnpkg | nodejs (>= 12.19.0~),
yarnpkg | yarn,
Package: ngcp-csc-ui Package: ngcp-csc-ui
Architecture: all Architecture: all

7
debian/rules vendored

@ -3,11 +3,14 @@
# Uncomment this to turn on verbose mode. # Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1 # export DH_VERBOSE=1
# if yarnpkg is available use it, otherwise fall back to yarn
YARN_BIN := $(shell which yarnpkg || echo yarn)
%: %:
dh "$@" dh "$@"
override_dh_auto_install: override_dh_auto_install:
yarnpkg install $(YARN_BIN) install
cp src/config.template.js src/config.js cp src/config.template.js src/config.js
yarnpkg run build $(YARN_BIN) run build
mv dist/spa csc mv dist/spa csc

Loading…
Cancel
Save