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>
This commit is contained in:
Kyle Guinn 2020-05-19 02:18:51 -05:00 committed by Willy Sudiarto Raharjo
parent 5eb11bb064
commit 9af7a5e36e
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
3 changed files with 33 additions and 1 deletions

View File

@ -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;

View File

@ -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

View File

@ -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}