2023-04-24 20:26:35 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
# variables
|
|
|
|
CWD=$(pwd)
|
2024-10-21 21:29:30 +02:00
|
|
|
VERSION=${VERSION:-1.4}
|
|
|
|
ITEMNB=${ITEMNB:-53678}
|
|
|
|
COMMITNB=${COMMITNB:-e7c3feb}
|
2023-04-24 20:26:35 +02:00
|
|
|
|
2024-12-21 08:53:39 +01:00
|
|
|
PRGNAM=$(basename "$CWD")
|
2023-04-24 20:26:35 +02:00
|
|
|
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"
|
2023-04-24 20:26:35 +02:00
|
|
|
|
2024-12-21 08:53:39 +01:00
|
|
|
mkdir -p "$PKG"/opt/"$PRGNAM"
|
2023-04-24 20:26:35 +02:00
|
|
|
|
|
|
|
# mise en place
|
2024-12-21 08:53:39 +01:00
|
|
|
cd "$PKG"/opt/"$PRGNAM" || exit 1
|
2023-04-24 20:26:35 +02:00
|
|
|
|
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
|
2023-04-24 20:26:35 +02:00
|
|
|
|
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
|
2023-04-24 20:26:35 +02:00
|
|
|
|
|
|
|
# correction
|
2024-12-21 08:53:39 +01:00
|
|
|
cd "$PKG" || exit 1
|
|
|
|
chown -R root:root ./*
|
2023-04-24 20:26:35 +02:00
|
|
|
|
|
|
|
# embaumement
|
2024-12-21 08:53:39 +01:00
|
|
|
mkdir -p "$PKG"/install
|
|
|
|
cat <<EOF > "$PKG"/install/slack-desc
|
2023-04-24 20:26:35 +02:00
|
|
|
$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:
|
2023-04-24 20:26:35 +02:00
|
|
|
$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
|