Browse Source

fix

tags/v0.0.59
Peter Vivell 6 years ago
parent
commit
4f18eb4567
1 changed files with 10 additions and 7 deletions
  1. 10
    7
      drone.yml

+ 10
- 7
drone.yml View File

@@ -59,6 +59,9 @@ steps:
59 59
     BUILD_ARCH: amd64 armhf # amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64el s390x
60 60
   commands:
61 61
 
62
+
63
+    # DEB_BUILD_ARCH DEB_HOST_ARCH TARGET=armhf
64
+
62 65
     - PKG_NAME="${DRONE_REPO_NAME}" &&
63 66
       PKG_VERSION="$(git describe --always)" &&
64 67
       PKG_SRC_ROOT="$(pwd)" &&
@@ -80,13 +83,13 @@ steps:
80 83
         tar -xf "$${PKG_RELEASE_DIR}/$${PKG_DEB_ARCHIVE}" -C "$${PKG_BUILD_DIR}" --strip 1 &&
81 84
         cd "$${PKG_BUILD_DIR}" &&
82 85
         export MAKEFLAGS="$${MAKEFLAGS}" &&
83
-        test "$${PKG_ARCH}" = "$${PKG_BUILDHOST_ARCH}" && ( \
84
-          export CC="arm-linux-gnueabihf-gcc" ; \
85
-          export LD="arm-linux-gnueabihf-ld" ; \
86
-          export STRIP="arm-linux-gnueabihf-strip" ; \
87
-        ) || ( \
88
-          echo "native build" \
89
-        ) &&
86
+        case $${ARCH} in 
87
+          amd64) PREFIX="" ;;
88
+          armhf) PREFIX=arm-linux-gnueabihf-" ;;
89
+        esac &&
90
+        export CC=$${PREFIX}gcc &&
91
+        export LD=$${PREFIX}ld &&
92
+        export STRIP=$${PREFIX}strip &&
90 93
         make &&
91 94
         tar --exclude='./.*'
92 95
           --transform "s/\./$${PKG_RELEASE_ARCHIVE_ROOT}/"

Loading…
Cancel
Save