slackbuilds/xap/inkscape-bin/SlackBuild

56 lines
1.2 KiB
Text
Raw Permalink Normal View History

#!/bin/bash -e
# variables
CWD=$(pwd)
2024-10-21 21:29:30 +02:00
VERSION=${VERSION:-1.4}
ITEMNB=${ITEMNB:-53678}
COMMITNB=${COMMITNB:-e7c3feb}
2024-12-21 08:53:39 +01:00
PRGNAM=$(basename "$CWD")
ARCH="AppImage"
BUILD=1
TAG=gwh
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# nettoyage préalable
2024-12-21 08:53:39 +01:00
rm -fr "$PKG"
2024-12-21 08:53:39 +01:00
mkdir -p "$PKG"/opt/"$PRGNAM"
# mise en place
2024-12-21 08:53:39 +01:00
cd "$PKG"/opt/"$PRGNAM" || exit 1
2024-12-21 08:53:39 +01:00
wget -c https://inkscape.org/gallery/item/"${ITEMNB}"/Inkscape-"${COMMITNB}"-x86_64.AppImage -O "${PRGNAM}"-"${VERSION}".AppImage
chmod +x "${PRGNAM}"-"${VERSION}".AppImage
2024-12-21 08:53:39 +01:00
mkdir -p "$PKG$PREFIX"/bin/
cd "$PKG$PREFIX"/bin/ || exit 1
ln -s /opt/"$PRGNAM"/"${PRGNAM}"-"${VERSION}".AppImage inkscape
# correction
2024-12-21 08:53:39 +01:00
cd "$PKG" || exit 1
chown -R root:root ./*
# embaumement
2024-12-21 08:53:39 +01:00
mkdir -p "$PKG"/install
cat <<EOF > "$PKG"/install/slack-desc
$PRGNAM: $PRGNAM (A powerful, free design tool)
$PRGNAM:
$PRGNAM: Whether you are an illustrator, designer, web designer
$PRGNAM: or just someone who needs to create some vector imagery,
$PRGNAM: Inkscape is for you!
$PRGNAM:
$PRGNAM:
$PRGNAM: https://www.inkscape.org
2024-12-21 08:53:39 +01:00
$PRGNAM:
$PRGNAM:
EOF
# empaquetage
2024-12-21 08:53:39 +01:00
/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/"$PRGNAM"-"${VERSION//-/}"-$ARCH-$BUILD$TAG.txz