aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2020-05-19 02:18:51 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-05-23 09:32:04 +0700
commit9af7a5e36ec69da16653dd6a35d55e315d6442fe (patch)
treee4b89610c0992139044a8a856f3eac0a9ff0d50f /misc
parent5eb11bb064f93e5f02d6fff2e6343cb21f16f678 (diff)
misc/goldencheetah: Added desktop file and icons.
Thanks to Marek Šrejma for the suggestions. Signed-off-by: Kyle Guinn <elyk03@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/goldencheetah/GoldenCheetah.desktop10
-rw-r--r--misc/goldencheetah/doinst.sh10
-rw-r--r--misc/goldencheetah/goldencheetah.SlackBuild14
3 files changed, 33 insertions, 1 deletions
diff --git a/misc/goldencheetah/GoldenCheetah.desktop b/misc/goldencheetah/GoldenCheetah.desktop
new file mode 100644
index 0000000000000..7217806afe545
--- /dev/null
+++ b/misc/goldencheetah/GoldenCheetah.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=GoldenCheetah
+Icon=GoldenCheetah
+Exec=GoldenCheetah
+Terminal=false
+Comment=Cycling power analysis software
+Keywords=Cycling;Training;Bike;Ride;Power;
+Categories=Qt;Education;Sports;DataVisualization;Maps;
diff --git a/misc/goldencheetah/doinst.sh b/misc/goldencheetah/doinst.sh
new file mode 100644
index 0000000000000..4a25de5e6fbd1
--- /dev/null
+++ b/misc/goldencheetah/doinst.sh
@@ -0,0 +1,10 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
diff --git a/misc/goldencheetah/goldencheetah.SlackBuild b/misc/goldencheetah/goldencheetah.SlackBuild
index 28ad3ec29fcf0..a3dec7778efa6 100644
--- a/misc/goldencheetah/goldencheetah.SlackBuild
+++ b/misc/goldencheetah/goldencheetah.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=goldencheetah
SRCNAM=GoldenCheetah
VERSION=${VERSION:-3.5}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -108,12 +108,24 @@ make
install -D -m0755 -s src/GoldenCheetah $PKG/usr/bin/GoldenCheetah
install -D -m0644 src/Resources/linux/51-garmin-usb.rules $PKG/lib/udev/rules.d/51-garmin-usb.rules
+# Generate desktop icon set
+convert -size 512x512 xc:none -fill white -draw "roundrectangle 15,16 487,486 52,52" \
+ src/Resources/images/gc.png -compose Over -composite -crop 475x473+14+15\! logo.png
+for RES in 16 22 24 32 48 64 128 256 512; do
+ mkdir -p $PKG/usr/share/icons/hicolor/${RES}x${RES}/apps
+ convert logo.png -resize ${RES}x${RES}\! $PKG/usr/share/icons/hicolor/${RES}x${RES}/apps/GoldenCheetah.png
+done
+
+mkdir -p $PKG/usr/share/applications
+cp $CWD/GoldenCheetah.desktop $PKG/usr/share/applications/
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}