diff options
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/build-distribution-archives | 21 | ||||
| -rwxr-xr-x | bin/build-python | 7 | ||||
| -rwxr-xr-x | bin/generate-version-file | 7 |
3 files changed, 29 insertions, 6 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 72da7c7b..1ac920b0 100644 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -112,12 +112,21 @@ if [ "$BUILD" = "linux" ] || [ "$BUILD" = "linux32" ]; then VERSION="0.0.1-${VERSION}" fi + echo -n "$INKSTITCH_GPG_KEY" | base64 -d | gpg --import cat <<EOF > $HOME/.rpmmacros %_gpg_name EA93BCE2CCD0FB2E77B2CC29E8120E50709E5C44 %_signature gpg EOF + # set the rpm file name for cpu arch + if [[ "$BUILD" = "linux32" ]]; then + linux_arch="i386" + else + linux_arch=${ARCH} + fi + + echo "Creating deb" deb_version="$(sed -E 's/[^a-zA-Z0-9.+]/./g' <<< "$VERSION")" fpm -s dir \ -t deb \ @@ -134,11 +143,13 @@ EOF --verbose \ dist/inkstitch=/opt + echo "Creating rpm" fpm -s dir \ -t rpm \ -n inkstitch \ -v "$VERSION" \ -d "inkscape >= 1.0.0" \ + -a "$linux_arch" \ --rpm-compression xz \ --license "GPL-3.0" \ --description "An open-source machine embroidery design platform based on Inkscape" \ @@ -152,6 +163,12 @@ EOF rpmsign --addsign inkstitch*.rpm mv inkstitch*.deb inkstitch*.rpm artifacts/ - tar -C dist -Jcf artifacts/inkstitch-${VERSION}-${OS}.tar.xz inkstitch - cat "$(dirname "$0")/linux-sh-installer" artifacts/inkstitch-${VERSION}-${OS}.tar.xz > artifacts/inkstitch-${VERSION}-${OS}.sh + # set file name for each cpu arch + if [[ "$BUILD" = "linux32" ]]; then + tar -C dist -Jcf artifacts/inkstitch-${VERSION}-${OS}-i386.tar.xz inkstitch + cat "$(dirname "$0")/linux-sh-installer" artifacts/inkstitch-${VERSION}-${OS}-i386.tar.xz > artifacts/inkstitch-${VERSION}-${OS}-i386.sh + else + tar -C dist -Jcf artifacts/inkstitch-${VERSION}-${OS}-${ARCH}.tar.xz inkstitch + cat "$(dirname "$0")/linux-sh-installer" artifacts/inkstitch-${VERSION}-${OS}-${ARCH}.tar.xz > artifacts/inkstitch-${VERSION}-${OS}-${ARCH}.sh + fi fi diff --git a/bin/build-python b/bin/build-python index 17f49c1e..5a93f610 100755 --- a/bin/build-python +++ b/bin/build-python @@ -2,6 +2,7 @@ set -e info_year=$( date "+%Y" ) +ARCH="$(uname -m)" # PyInstaller v6.x rearranges folder configuration causing broken builds, This re-enables old onedir layout. pyinstaller_args+="--contents-directory . " @@ -20,8 +21,8 @@ if [ "$BUILD" = "osx" ]; then fi elif [ "$BUILD" = "linux" ]; then pyinstaller_args+="--hidden-import gi.repository.Gtk " - pyinstaller_args+="--add-binary /lib/x86_64-linux-gnu/libcrypt.so.1:. " - pyinstaller_args+="--add-binary /lib/x86_64-linux-gnu/libnsl.so.1:. " + pyinstaller_args+="--add-binary /lib/${ARCH}-linux-gnu/libcrypt.so.1:. " + pyinstaller_args+="--add-binary /lib/${ARCH}-linux-gnu/libnsl.so.1:. " elif [ "$BUILD" = "linux32" ]; then pyinstaller_args+="--hidden-import gi.repository.Gtk " pyinstaller_args+="--add-binary /lib/i386-linux-gnu/libcrypt.so.1:. " @@ -63,4 +64,4 @@ shopt -s dotglob mkdir dist/bin mv dist/inkstitch/* dist/bin mv dist/bin dist/inkstitch -mkdir artifacts
\ No newline at end of file +mkdir artifacts diff --git a/bin/generate-version-file b/bin/generate-version-file index df3d8459..023fa7b9 100755 --- a/bin/generate-version-file +++ b/bin/generate-version-file @@ -2,9 +2,14 @@ VERSION="${GITHUB_REF##*/}" OS="${BUILD:-$(uname)}" +ARCH="$(uname -m)" DATE=$(date +"%Y-%m-%d %H:%M") if [[ "$VERSION" == "" ]]; then VERSION="Manual Install" fi -echo "${VERSION} (${OS}) ${DATE}" > VERSION +if [[ "$BUILD" = "linux32" ]]; then + echo "${VERSION} (${OS}-i386) ${DATE}" > VERSION +else + echo "${VERSION} (${OS}-${ARCH}) ${DATE}" > VERSION +fi
\ No newline at end of file |
