2021-06-15 10:26:26 +02:00
|
|
|
|
#!/bin/bash
|
2020-05-24 20:43:13 +02:00
|
|
|
|
|
|
|
|
|
# variables
|
2020-06-25 11:23:11 +02:00
|
|
|
|
TAG=gwh
|
2020-05-24 20:43:13 +02:00
|
|
|
|
TMP=/tmp/$TAG
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
OUTPUT=/tmp
|
|
|
|
|
|
|
|
|
|
PRGNAM=$(basename $CWD)
|
2021-06-15 15:15:18 +02:00
|
|
|
|
VERSION=${VERSION:-"trunk"}
|
2020-05-24 20:43:13 +02:00
|
|
|
|
|
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
BUILD=1
|
|
|
|
|
|
2021-06-15 15:15:18 +02:00
|
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
|
|
2020-05-24 20:43:13 +02:00
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
|
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
|
|
|
|
|
|
|
|
|
# nettoyage pr<70>alable
|
|
|
|
|
rm -fr $PKG $TMP/$PRGNAM
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG
|
|
|
|
|
|
|
|
|
|
# mise en place
|
|
|
|
|
[ ! -e $REPOSITORY ] && git clone https://github.com/kovidgoyal/kitty.git $REPOSITORY
|
2021-06-15 10:59:49 +02:00
|
|
|
|
cd $REPOSITORY
|
|
|
|
|
git pull --all
|
2020-05-24 20:43:13 +02:00
|
|
|
|
|
|
|
|
|
cp -R $REPOSITORY $TMP/$PRGNAM
|
|
|
|
|
cd $TMP/$PRGNAM/
|
2021-06-15 15:15:18 +02:00
|
|
|
|
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
|
2020-05-24 20:43:13 +02:00
|
|
|
|
|
|
|
|
|
# installation
|
|
|
|
|
mkdir -p $PKG/
|
|
|
|
|
python3 setup.py linux-package --update-check-interval=0
|
|
|
|
|
mv linux-package $PKG/usr
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM
|
|
|
|
|
cp -R *.md *.rst LICENSE $PKG/usr/doc/$PRGNAM
|
|
|
|
|
|
|
|
|
|
# correction
|
|
|
|
|
cd $PKG
|
|
|
|
|
chown -R root:root *
|
|
|
|
|
|
|
|
|
|
# embaumement
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
|
|
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
|
|
|
|
$PRGNAM: $PRGNAM (A cross-platform, fast, feature full, GPU based terminal emulator)
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM: https://sw.kovidgoyal.net/kitty/
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# empaquetage
|
|
|
|
|
cd $PKG
|
|
|
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
2020-07-12 09:22:26 +02:00
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|