From c6e90226867fd0ec8a446bc677cd003d8c64a734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ko=C5=82aczkowski?= Date: Mon, 12 Jun 2023 09:58:18 +0200 Subject: [PATCH] Update packaging scripts --- packaging/Dockerfile | 4 ++-- packaging/package-internal.sh | 25 ++++++++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packaging/Dockerfile b/packaging/Dockerfile index 1ef1b9a..9865b41 100644 --- a/packaging/Dockerfile +++ b/packaging/Dockerfile @@ -1,6 +1,6 @@ -FROM rust:1.64-slim +FROM rust:1.70-bookworm RUN apt-get update -RUN apt-get install -y fakeroot alien gcc-mingw-w64-x86-64 zip +RUN apt-get install -y fakeroot alien gcc-mingw-w64-x86-64 zip libgtk-4-dev libadwaita-1-dev RUN rustup toolchain install stable-x86_64-pc-windows-gnu RUN rustup target add x86_64-unknown-linux-musl RUN rustup target add i686-unknown-linux-musl diff --git a/packaging/package-internal.sh b/packaging/package-internal.sh index 8512177..03f93ac 100755 --- a/packaging/package-internal.sh +++ b/packaging/package-internal.sh @@ -10,20 +10,20 @@ cd "$(dirname $0)/.." echo "${bold}Building${normal}" set -x -cargo build --release +cargo build -p fclones -p fclones-gui --release cargo build --release --target i686-unknown-linux-musl cargo build --release --target x86_64-unknown-linux-musl cargo build --release --target x86_64-pc-windows-gnu set +x -echo "${bold}Packaging${normal}" +echo "${bold}Packaging${normal} fclones" set -x -VERSION=$(cargo pkgid | sed 's/.*#//') -PKG_DIR=target/packages/$VERSION +VERSION=$(cargo pkgid -p fclones | sed 's/.*#//') +PKG_DIR=target/packages/fclones-$VERSION mkdir -p $PKG_DIR rm -f $PKG_DIR/* -cargo deb +cargo deb -p fclones mv target/debian/*.deb $PKG_DIR fakeroot alien --to-rpm -c $PKG_DIR/*.deb @@ -34,3 +34,18 @@ mv *.tgz $PKG_DIR/"fclones-$VERSION-linux-glibc-x86_64.tar.gz" tar -zcvf $PKG_DIR/"fclones-$VERSION-linux-musl-x86_64.tar.gz" target/x86_64-unknown-linux-musl/release/fclones tar -zcvf $PKG_DIR/"fclones-$VERSION-linux-musl-i686.tar.gz" target/i686-unknown-linux-musl/release/fclones zip -j $PKG_DIR/"fclones-$VERSION-windows-x86_64.zip" target/x86_64-pc-windows-gnu/release/fclones.exe + +echo "${bold}Packaging${normal} fclones-gui" +set -x +VERSION=$(cargo pkgid -p fclones-gui | sed 's/.*#//') +PKG_DIR=target/packages/fclones-gui-$VERSION +mkdir -p $PKG_DIR +rm -f $PKG_DIR/* + +cargo deb -p fclones-gui +mv target/debian/*.deb $PKG_DIR + +fakeroot alien --to-rpm -c $PKG_DIR/*.deb +mv *.rpm $PKG_DIR +fakeroot alien --to-tgz -c $PKG_DIR/*.deb +mv *.tgz $PKG_DIR/"fclones-gui-$VERSION-linux-glibc-x86_64.tar.gz"