diff --git a/docker-builder-data/build/script/common/manager.sh b/docker-builder-data/build/script/common/manager.sh index 731c42e..debde79 100755 --- a/docker-builder-data/build/script/common/manager.sh +++ b/docker-builder-data/build/script/common/manager.sh @@ -169,6 +169,18 @@ prepare_build() { fi } +prepare_install() { + if ! cp -f $BUILD_PACKET_DIR/version-* "$INSTALL_PACKET_DIR/"; then + return 1 + fi +} + +prepare_install_release() { + if ! cp -f $INSTALL_PACKET_DIR/version-* "$INSTALL_RELEASE_PACKET_DIR/"; then + return 1 + fi +} + set_environment_vars() { export NAME=$1 @@ -433,7 +445,7 @@ install() { local NAME=$1 is_complete $NAME install && return 0 prepare $NAME install || return 1 - call_packet_function $NAME install || return 1 + call_packet_function $NAME install prepare_install || return 1 } env() { @@ -473,7 +485,7 @@ install_release() { local NAME=$1 is_complete $NAME install_release && return 0 prepare $NAME install_release || return 1 - call_packet_function $NAME install_release || return 1 + call_packet_function $NAME install_release prepare_install_release || return 1 } env_release() { diff --git a/docker-builder-data/build/script/include/inc-pkall-default.sh b/docker-builder-data/build/script/include/inc-pkall-default.sh index 00326be..b6272de 100644 --- a/docker-builder-data/build/script/include/inc-pkall-default.sh +++ b/docker-builder-data/build/script/include/inc-pkall-default.sh @@ -1,5 +1,6 @@ # PK_URL +# PK_VERSION # PK_ARCHIVE # PK_DIRNAME diff --git a/docker-builder-data/build/script/include/inc-pkall-git.sh b/docker-builder-data/build/script/include/inc-pkall-git.sh index 44961df..d36902d 100644 --- a/docker-builder-data/build/script/include/inc-pkall-git.sh +++ b/docker-builder-data/build/script/include/inc-pkall-git.sh @@ -1,5 +1,6 @@ # PK_URL +# PK_VERSION # PK_DIRNAME source $INCLUDE_SCRIPT_DIR/inc-pkallunpack-git.sh diff --git a/docker-builder-data/build/script/include/inc-pkall-none.sh b/docker-builder-data/build/script/include/inc-pkall-none.sh index 358f527..bce2833 100644 --- a/docker-builder-data/build/script/include/inc-pkall-none.sh +++ b/docker-builder-data/build/script/include/inc-pkall-none.sh @@ -1,3 +1,9 @@ +DEPS= + +PK_URL= +PK_VERSION= +PK_ARCHIVE= +PK_DIRNAME= pkdownload() { return 0 diff --git a/docker-builder-data/build/script/include/inc-pkallunpack-default.sh b/docker-builder-data/build/script/include/inc-pkallunpack-default.sh index f291a12..2d55f80 100644 --- a/docker-builder-data/build/script/include/inc-pkallunpack-default.sh +++ b/docker-builder-data/build/script/include/inc-pkallunpack-default.sh @@ -1,5 +1,6 @@ # PK_URL +# PK_VERSION # PK_ARCHIVE source $INCLUDE_SCRIPT_DIR/inc-pkdownload-default.sh diff --git a/docker-builder-data/build/script/include/inc-pkallunpack-git.sh b/docker-builder-data/build/script/include/inc-pkallunpack-git.sh index 379685b..26e1a27 100644 --- a/docker-builder-data/build/script/include/inc-pkallunpack-git.sh +++ b/docker-builder-data/build/script/include/inc-pkallunpack-git.sh @@ -1,5 +1,6 @@ # PK_URL +# PK_VERSION # PK_DIRNAME source $INCLUDE_SCRIPT_DIR/inc-pkdownload-git.sh diff --git a/docker-builder-data/build/script/include/inc-pkunpack-default.sh b/docker-builder-data/build/script/include/inc-pkunpack-default.sh index 799aaa2..71d7411 100644 --- a/docker-builder-data/build/script/include/inc-pkunpack-default.sh +++ b/docker-builder-data/build/script/include/inc-pkunpack-default.sh @@ -1,4 +1,5 @@ +# PK_VERSION # PK_ARCHIVE pkunpack() { @@ -15,4 +16,8 @@ pkunpack() { return 1 fi fi + if [ ! -z "$PK_VERSION" ]; then + echo "$PK_VERSION" > "$UNPACK_PACKET_DIR/version-$NAME" + [ ! $? -eq 0 ] && return 1 + fi } \ No newline at end of file diff --git a/docker-builder-data/build/script/include/inc-pkunpack-git.sh b/docker-builder-data/build/script/include/inc-pkunpack-git.sh index ca0701d..e6a79c7 100644 --- a/docker-builder-data/build/script/include/inc-pkunpack-git.sh +++ b/docker-builder-data/build/script/include/inc-pkunpack-git.sh @@ -1,4 +1,5 @@ +# PK_VERSION # PK_DIRNAME pkunpack() { @@ -6,4 +7,11 @@ pkunpack() { && rm -f -r "$UNPACK_PACKET_DIR/$PK_DIRNAME/.git"); then return 1 fi + if [ ! -z "$PK_VERSION" ]; then + cd "$DOWNLOAD_PACKET_DIR/$PK_DIRNAME" + local COMMIT=`git rev-parse HEAD` + [ ! $? -eq 0 ] && return 1 + echo "$PK_VERSION-$COMMIT" > "$UNPACK_PACKET_DIR/version-$NAME" + [ ! $? -eq 0 ] && return 1 + fi } diff --git a/docker-builder-data/build/script/packet/opentoonz-master.sh b/docker-builder-data/build/script/packet/opentoonz-master.sh index 1c24516..57bef59 100644 --- a/docker-builder-data/build/script/packet/opentoonz-master.sh +++ b/docker-builder-data/build/script/packet/opentoonz-master.sh @@ -7,8 +7,8 @@ source $INCLUDE_SCRIPT_DIR/inc-pkallunpack-git.sh source $INCLUDE_SCRIPT_DIR/inc-pkinstall_release-default.sh pkbuild() { - if ! (cp "$FILES_PACKET_DIR/Makefile.in" "$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/" \ - && cp "$FILES_PACKET_DIR/FindTIFF.cmake" "$PK_DIRNAME/toonz/cmake/"); then + if ! (cp --remove-destination "$FILES_PACKET_DIR/Makefile.in" "$PK_DIRNAME/thirdparty/tiff-4.0.3/libtiff/" \ + && cp --remove-destination "$FILES_PACKET_DIR/FindTIFF.cmake" "$PK_DIRNAME/toonz/cmake/"); then return 1 fi @@ -27,7 +27,7 @@ pkbuild() { set_done $NAME build.libtiff fi - if ! cp "$ENVDEPS_PACKET_DIR/lib/libsuperlu_4.3.a" "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/superlu/libsuperlu_4.1.a"; then + if ! cp --remove-destination "$ENVDEPS_PACKET_DIR/lib/libsuperlu_4.3.a" "$BUILD_PACKET_DIR/$PK_DIRNAME/thirdparty/superlu/libsuperlu_4.1.a"; then return 1 fi diff --git a/docker-builder-data/build/script/packet/superlu-4.3.sh b/docker-builder-data/build/script/packet/superlu-4.3.sh index a5f6e09..3b879b5 100644 --- a/docker-builder-data/build/script/packet/superlu-4.3.sh +++ b/docker-builder-data/build/script/packet/superlu-4.3.sh @@ -10,8 +10,8 @@ source $INCLUDE_SCRIPT_DIR/inc-pkinstall_release-default.sh pkbuild() { cd "$BUILD_PACKET_DIR/$PK_DIRNAME" - if ! (cp -f "$FILES_PACKET_DIR/mc64ad.c" "$BUILD_PACKET_DIR/$PK_DIRNAME/SRC/" \ - && cp -f "$FILES_PACKET_DIR/make.inc" "$BUILD_PACKET_DIR/$PK_DIRNAME/"); then + if ! (cp --remove-destination "$FILES_PACKET_DIR/mc64ad.c" "$BUILD_PACKET_DIR/$PK_DIRNAME/SRC/" \ + && cp --remove-destination "$FILES_PACKET_DIR/make.inc" "$BUILD_PACKET_DIR/$PK_DIRNAME/"); then return 1 fi diff --git a/docker-builder-i386/Dockerfile b/docker-builder-i386/Dockerfile index 7232720..dc4b447 100644 --- a/docker-builder-i386/Dockerfile +++ b/docker-builder-i386/Dockerfile @@ -53,5 +53,7 @@ RUN apt-get -yq install xsltproc RUN apt-get -yq install libudev-dev RUN apt-get -yq install m4 RUN apt-get -yq install libfuse-dev +RUN apt-get -yq install git +RUN apt-get -yq install wget CMD mkdir /build diff --git a/docker-builder/Dockerfile b/docker-builder/Dockerfile index 34939d2..33f2d3b 100644 --- a/docker-builder/Dockerfile +++ b/docker-builder/Dockerfile @@ -53,5 +53,7 @@ RUN apt-get -yq install xsltproc RUN apt-get -yq install libudev-dev RUN apt-get -yq install m4 RUN apt-get -yq install libfuse-dev +RUN apt-get -yq install git +RUN apt-get -yq install wget CMD mkdir /build