Skip to content

Commit

Permalink
work around cargo-make env issue
Browse files Browse the repository at this point in the history
  • Loading branch information
madninja committed Jul 6, 2021
1 parent ad11736 commit 8e91dd4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,27 @@ PKG = "deb"
[env.klkgw]
CROSS_TARGET = "armv7-unknown-linux-musleabihf"
PKG = "ipk"
IPK_USE_AR = false

[env.ramips_24kec]
CROSS_TARGET = "mipsel-unknown-linux-musl"
PKG = "ipk"
IPK_USE_AR = false

[env.dragino]
CROSS_TARGET = "mips-unknown-linux-musl"
PKG = "ipk"
IPK_USE_AR = false

[env.mtcdt]
CROSS_TARGET = "armv5te-unknown-linux-musleabi"
PKG = "ipk"
IPK_USE_AR = "true"
IPK_USE_AR = true

[env.resiot]
CROSS_TARGET = "armv7-unknown-linux-gnueabihf"
PKG = "ipk"
IPK_USE_AR = "true"
IPK_USE_AR = true

[tasks.cross]
description = "Runs the cross rust compiler."
Expand Down Expand Up @@ -69,7 +72,7 @@ run_task = [
description = "Builds an ipk for openwrt/opk based targets"
category = "Package"
dependencies = ["cross"]
condition = { env_set = ["CROSS_TARGET", "TAR", "AR", "PKG_NAME"] }
condition = { env_set = ["CROSS_TARGET", "TAR", "AR", "PKG_NAME", "IPK_USE_AR"] }
env = { "PKG_BUILD_DIR" = "target/pkg/${CARGO_MAKE_PROFILE}", "PKG_SRC_DIR" = "package/${CARGO_MAKE_PROFILE}" }
script = '''
# make base folder
Expand Down Expand Up @@ -106,7 +109,7 @@ script = '''
cd ${CARGO_MAKE_WORKING_DIRECTORY}
cd ${PKG_BUILD_DIR}
if [ "true" = "${IPK_USE_AR}" ]; then
if ${IPK_USE_AR} ; then
rm -f ../${PKG_NAME}
${AR} r ../${PKG_NAME} ./debian-binary ./data.tar.gz ./control.tar.gz
else
Expand Down

0 comments on commit 8e91dd4

Please sign in to comment.