system/dosbox-dev: Fix icon and .desktop.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2022-04-10 12:35:23 -04:00
parent d7fee3782f
commit d5a8e8774a
2 changed files with 14 additions and 12 deletions

View File

@ -25,12 +25,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220408 bkw: Modified by SlackBuilds.org, BUILD=2:
# - do not try to use a .ico icon in the .desktop file (png instead).
# - remove useless INSTALL from doc dir.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dosbox-dev
REVISION=${REVISION:-4473}
VERSION=${VERSION:-0.75_pre4473}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
DOSBOXDEV=${DOSBOXDEV:-no}
@ -43,9 +47,6 @@ if [ -z "$ARCH" ]; then
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -81,9 +82,9 @@ cd $PRGNAM
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
-o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
./autogen.sh
CFLAGS="$SLKCFLAGS" \
@ -107,12 +108,13 @@ for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i
install -D -m 0644 $CWD/dosbox.desktop \
$PKG/usr/share/applications/dosbox.desktop
# Add the dosbox.ico file to /usr/share/pixmaps
install -D -m 0644 src/dosbox.ico $PKG/usr/share/pixmaps/dosbox.ico
# 20220408 bkw: convert the .ico icon to a .png.
mkdir -p $PKG/usr/share/pixmaps
convert 'src/dosbox.ico[1]' $PKG/usr/share/pixmaps/dosbox.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS \
docs/PORTING docs/README.video $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog NEWS README THANKS \
docs/PORTING docs/README.video $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@ -122,7 +124,7 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Change dosbox filenames to $PRGNAM for using it alongside stable dosbox
if [ "$DOSBOXDEV" = "yes" ]; then
mv $PKG/usr/share/applications/dosbox.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mv $PKG/usr/share/pixmaps/dosbox.ico $PKG/usr/share/pixmaps/$PRGNAM.ico
mv $PKG/usr/share/pixmaps/dosbox.png $PKG/usr/share/pixmaps/$PRGNAM.png
mv $PKG/usr/man/man1/dosbox.1.gz $PKG/usr/man/man1/$PRGNAM.1.gz
mv $PKG/usr/bin/dosbox $PKG/usr/bin/$PRGNAM
sed -i "s/dosbox/dosbox-dev/g" $PKG/usr/share/applications/$PRGNAM.desktop

View File

@ -4,7 +4,7 @@ Name=dosbox
Comment=DOS Emulator Development version
GenericName=dosbox
Exec=dosbox
Icon=/usr/share/pixmaps/dosbox.ico
Icon=/usr/share/pixmaps/dosbox.png
Terminal=false
Type=Application
Categories=System;