development/cream: Fix icons, .desktop, doinst.sh.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2022-04-05 15:03:16 -04:00
parent 38e2d66ff8
commit b83041c697
2 changed files with 31 additions and 6 deletions

View File

@ -22,18 +22,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220405 bkw: Modified by SlackBuilds.org, BUILD=2:
# - put icons in right place.
# - update icon cache in doinst.sh.
# - fix .desktop permissions.
# - make .desktop validate.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cream
VERSION=${VERSION:-0.43}
ARCH=noarch
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
# 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
@ -54,9 +57,9 @@ cd $PRGNAM-$VERSION
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 \
-exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-exec chmod 644 {} \+
# Set VIMRUNTIME here, as the INSTALL.sh script has some problems with
# redirection of output
@ -68,6 +71,22 @@ sed -i "s/-d \$VIMRUNTIME/! -d \$VIMRUNTIME/g" INSTALL.sh
DESTDIR=$PKG \
sh INSTALL.sh /usr
# 20220405 bkw: put the icons in the right place.
I=$PKG/usr/share/icons
mkdir -p $I/hicolor/{48x48,scalable}/apps
mv $I/$PRGNAM.png $I/hicolor/48x48/apps
mv $I/$PRGNAM.svg $I/hicolor/scalable/apps
# 20220405 bkw: fix .desktop permission and contents.
D=$PKG/usr/share/applications/$PRGNAM.desktop
chmod 0644 $D
sed -i -e '/^Encoding/d' \
-e '/^MapNotify/d' \
-e '/^Terminal/s,0,false,' \
-e 's,^XClassHintResName,X-&,' \
-e 's,Application;,,' \
$D
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
docs/* docs-html/ \

View File

@ -1,3 +1,9 @@
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 usr/share/icons/hicolor >/dev/null 2>&1
fi
fi