summaryrefslogtreecommitdiff
path: root/mkwinbins.sh
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-24 13:53:07 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-24 14:15:02 +0100
commit74faac093a406eb013d8f8ced4dda74711483ae7 (patch)
tree969b3940b86205ecd07294e360724e8ab3c3c1bb /mkwinbins.sh
parentc84f61809335e0408f54cb2f11087785e4a1818c (diff)
Complete packaging in mkwinbins.sh
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkwinbins.sh')
-rwxr-xr-xmkwinbins.sh29
1 files changed, 27 insertions, 2 deletions
diff --git a/mkwinbins.sh b/mkwinbins.sh
index 7ea3db4..16187f6 100755
--- a/mkwinbins.sh
+++ b/mkwinbins.sh
@@ -2,10 +2,13 @@
set -e
-W32_DIR="$(pwd)/out32"
+W32_ZIP_NAME="squashfs-tools-ng-0.7-mingw32"
+W64_ZIP_NAME="squashfs-tools-ng-0.7-mingw64"
+
+W32_DIR="$(pwd)/$W32_ZIP_NAME"
W32_PREFIX="i686-w64-mingw32"
-W64_DIR="$(pwd)/out64"
+W64_DIR="$(pwd)/$W64_ZIP_NAME"
W64_PREFIX="x86_64-w64-mingw32"
download() {
@@ -202,3 +205,25 @@ export PKG_CONFIG_PATH="$W64_DIR/lib/pkgconfig"
make clean
make -j
make install-strip
+
+############################# package everything #############################
+
+cp -r licenses "$W64_DIR"
+cp README.md COPYING.md CHANGELOG.md "$W64_DIR"
+
+cp -r licenses "$W32_DIR"
+cp README.md COPYING.md CHANGELOG.md "$W32_DIR"
+
+rm -r "$W32_DIR/lib/pkgconfig" "$W64_DIR/lib/pkgconfig"
+rm "$W32_DIR/lib"/*.la "$W64_DIR/lib"/*.la
+
+${W32_PREFIX}-strip --discard-all "$W32_DIR/bin"/*.dll "$W32_DIR/bin"/*.exe
+${W64_PREFIX}-strip --discard-all "$W64_DIR/bin"/*.dll "$W64_DIR/bin"/*.exe
+
+zip -r "${W32_ZIP_NAME}.zip" "$W32_ZIP_NAME/bin" "$W32_ZIP_NAME/lib"
+zip -g -r -l "${W32_ZIP_NAME}.zip" "$W32_ZIP_NAME/include"
+zip -g -r -l "${W32_ZIP_NAME}.zip" "$W32_ZIP_NAME/licenses" $W32_ZIP_NAME/*.md
+
+zip -r "${W64_ZIP_NAME}.zip" "$W64_ZIP_NAME/bin" "$W64_ZIP_NAME/lib"
+zip -g -r -l "${W64_ZIP_NAME}.zip" "$W64_ZIP_NAME/include"
+zip -g -r -l "${W64_ZIP_NAME}.zip" "$W64_ZIP_NAME/licenses" $W64_ZIP_NAME/*.md