From b8ba9c36b62b2c57f016043afa164b1d3b833dcd Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 18 Sep 2023 15:08:03 +0200 Subject: [PATCH] Do a barrel roll to make sure that the installed package sticks to Debian's naming conventions. --- .drone.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.drone.yml b/.drone.yml index 438e7a616..2eb9716c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -275,6 +275,7 @@ steps: - echo "--- Parsing metadata" - git config --global --add safe.directory $PWD - git pull --rebase origin master --tags + - export PY_VERSION=$(python3 --version | awk '{print $2}' | sed -re 's/^([0-9]+\.[0-9]+).*/\1/') - export VERSION=$(python3 setup.py --version) - export HEAD=$(git log --pretty=format:%h HEAD...HEAD~1) - export TAG_URL="https://git.platypush.tech/platypush/platypush/archive/v$VERSION.tar.gz" @@ -285,6 +286,12 @@ steps: - echo "--- Building git package" - pip install --prefix="$GIT_BUILD_DIR" --no-cache --no-deps . + + - mkdir -p "$GIT_BUILD_DIR/usr/local" + - mv "$GIT_BUILD_DIR/usr/bin" "$GIT_BUILD_DIR/usr/local" + - mv "$GIT_BUILD_DIR/usr/lib" "$GIT_BUILD_DIR/usr/local" + - mv "$GIT_BUILD_DIR/usr/local/lib/python$${PY_VERSION}/site-packages" "$GIT_BUILD_DIR/usr/local/lib/python$${PY_VERSION}/dist-packages" + - mkdir -p "$GIT_BUILD_DIR/DEBIAN" - | cat < "$GIT_BUILD_DIR/DEBIAN/control" @@ -331,6 +338,7 @@ steps: - echo "--- Parsing metadata" - git config --global --add safe.directory $PWD - git pull --rebase origin master --tags + - export PY_VERSION=$(python3 --version | awk '{print $2}' | sed -re 's/^([0-9]+\.[0-9]+).*/\1/') - export VERSION=$(python3 setup.py --version) - export HEAD=$(git log --pretty=format:%h HEAD...HEAD~1) - export TAG_URL="https://git.platypush.tech/platypush/platypush/archive/v$VERSION.tar.gz" @@ -341,6 +349,12 @@ steps: - echo "--- Building git package" - pip install --prefix="$GIT_BUILD_DIR" --no-cache --no-deps . + + - mkdir -p "$GIT_BUILD_DIR/usr/local" + - mv "$GIT_BUILD_DIR/usr/bin" "$GIT_BUILD_DIR/usr/local" + - mv "$GIT_BUILD_DIR/usr/lib" "$GIT_BUILD_DIR/usr/local" + - mv "$GIT_BUILD_DIR/usr/local/lib/python$${PY_VERSION}/site-packages" "$GIT_BUILD_DIR/usr/local/lib/python$${PY_VERSION}/dist-packages" + - mkdir -p "$GIT_BUILD_DIR/DEBIAN" - | cat < "$GIT_BUILD_DIR/DEBIAN/control"