Skip to content

Commit

Permalink
Update packaging scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pkolaczk committed Jun 12, 2023
1 parent b646533 commit c6e9022
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packaging/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 20 additions & 5 deletions packaging/package-internal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

0 comments on commit c6e9022

Please sign in to comment.