From c9e28c107bed36e02530d1177a7389841717e1e6 Mon Sep 17 00:00:00 2001 From: MatthewWertman Date: Fri, 23 Feb 2024 01:53:37 -0800 Subject: [PATCH] package linux deb --- ipr.desktop | 7 +++++++ package.sh | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ipr.desktop create mode 100644 package.sh diff --git a/ipr.desktop b/ipr.desktop new file mode 100644 index 0000000..590ff5f --- /dev/null +++ b/ipr.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=BitCap IPReporter +Comment=Internal BitCap IP reporter tool +Path=/opt/ipr +Exec=/opt/ipr/ipr +Icon=BitCapLngLogo_IPR_Full_BLK-02x256.png \ No newline at end of file diff --git a/package.sh b/package.sh new file mode 100644 index 0000000..0a40701 --- /dev/null +++ b/package.sh @@ -0,0 +1,21 @@ +#!/bin/bash +## build ipr linux package with fpm + +PNAME="bitcap-ipreporter" + +# create dirs +[ -e package] && rm -r package +mkdir -p package/opt +mkdir -p package/usr/share/applications +mkdir -p package/usr/share/icons/hicolor/256x256/apps + +cp -r dist/ipr package/opt/ +cp src/resources/icons/app/BitCapLngLogo_IPR_Full_BLK-02x256.png package/usr/share/icons/hicolor/256x256/apps/ +cp ipr.desktop package/usr/share/applications + +find package/opt/ipr -type f -exec chmod 644 -- {} + +find package/opt/ipr -type d -exec chmod 755 -- {} + +find package/usr/share -type f -exec chmod 644 -- {} + +chmod +x package/opt/ipr/ipr + +fpm -C package -s dir -t deb -n "$PNAME" -v "$1" -p "$PNAME-$1.deb" \ No newline at end of file