#!/bin/bash # variables TAG=gwh TMP=/tmp/$TAG CWD=$(pwd) OUTPUT=/tmp PRGNAM=$(basename $CWD) GITHUB_REPO=kovidgoyal/kitty VERSION=${VERSION:-latest} ARCH=$(uname -m) BUILD=1 PKG=$TMP/pkg-$PRGNAM PREFIX=/usr REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM # nettoyage préalable rm -fr $PKG $TMP/$PRGNAM mkdir -p $PKG # mise en place [ ! -e $REPOSITORY ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORY cd $REPOSITORY git pull --all cp -R $REPOSITORY $TMP/$PRGNAM cd $TMP/$PRGNAM/ [ "x$VERSION" == "xlatest" ] && VERSION=$(git describe --tags --abbrev=0) [ "x$VERSION" == "x" ] && VERSION=trunk [ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" || git checkout $VERSION # 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 < $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 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz