netplan: fix cross compilation by replacing hardcoded pkg-config with

$(PKG_CONFIG)
This commit is contained in:
Nick Cao 2022-08-13 20:48:51 +08:00 committed by Rick van Schijndel
parent 9be64ddaff
commit 5e838fa9ac

View File

@ -45,7 +45,8 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile \
--replace 'SYSTEMD_GENERATOR_DIR=' 'SYSTEMD_GENERATOR_DIR ?= ' \
--replace 'SYSTEMD_UNIT_DIR=' 'SYSTEMD_UNIT_DIR ?= ' \
--replace 'BASH_COMPLETIONS_DIR=' 'BASH_COMPLETIONS_DIR ?= '
--replace 'BASH_COMPLETIONS_DIR=' 'BASH_COMPLETIONS_DIR ?= ' \
--replace 'pkg-config' '$(PKG_CONFIG)'
# from upstream https://github.com/canonical/netplan/blob/ee0d5df7b1dfbc3197865f02c724204b955e0e58/rpm/netplan.spec#L81
sed -e "s/-Werror//g" -i Makefile