diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-02-27 21:06:43 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-02-27 21:06:43 +0100 |
commit | 310df2d2a3f37eeb9596837f7886f86badc40ded (patch) | |
tree | 33d47be953f7ba28f9d7fcaf54379980b0379de9 | |
parent | e92b8d28209bed18c2be0dd5dea9005b13f66426 (diff) |
Build procd when needed
-rwxr-xr-x | build.sh | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -105,6 +105,12 @@ build_procd() { if ! test -e $sdk/package/lxd-procd; then ln -sfT $(pwd)/dl/procd $sdk/package/lxd-procd fi + local date=$(grep PKG_SOURCE_DATE:= dl/procd/Makefile | cut -d '=' -f 2) + local version=$(grep PKG_SOURCE_VERSION:= dl/procd/Makefile | cut -d '=' -f 2 | cut -b '1-8') + local release=$(grep PKG_RELEASE:= dl/procd/Makefile | cut -d '=' -f 2) + local ipk=$sdk/bin/targets/${arch}/${subarch}/packages/procd_${date}-${version}-${release}_*.ipk + + if ! test -s $ipk; then (cd $sdk ./scripts/feeds update base ./scripts/feeds install libubox @@ -112,11 +118,9 @@ build_procd() { make defconfig make package/lxd-procd/compile ) - local date=$(grep PKG_SOURCE_DATE:= dl/procd/Makefile | cut -d '=' -f 2) - local version=$(grep PKG_SOURCE_VERSION:= dl/procd/Makefile | cut -d '=' -f 2 | cut -b '1-8') - local release=$(grep PKG_RELEASE:= dl/procd/Makefile | cut -d '=' -f 2) + fi test -e bin/packages/${arch}/${subarch} || mkdir -p bin/packages/${arch}/${subarch} - (cd bin/packages/${arch}/${subarch} && ln -sf ../../../../$sdk/bin/targets/${arch}/${subarch}/packages/procd_${date}-${version}-${release}_*.ipk .) + (cd bin/packages/${arch}/${subarch} && ln -sf ../../../../$ipk .) } build_tarball() { |