Merge branch 'main' of codeberg.org:gwh/slackbuilds

This commit is contained in:
Gwenhael Le Moine 2024-05-21 22:27:09 +02:00
commit 05ed2ba999
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
3 changed files with 168 additions and 70 deletions

View file

@ -1,70 +0,0 @@
#!/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 tag --sort=-taggerdate | head -n1)
[ "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 <<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
/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz

65
fonts/terminus-ttf/SlackBuild Executable file
View file

@ -0,0 +1,65 @@
#!/bin/bash
cd "$(dirname "$0")" || exit 1
CWD=$(pwd)
PKGNAM=$(basename "$CWD")
BUILD=${BUILD:-1}
TAG=${TAG:-gwh}
TMP=${TMP:-/tmp/$TAG}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}
rm -rf "$PKG"
mkdir -p "$PKG"/usr/share/fonts/TTF/
cd "$PKG"/usr/share/fonts/TTF/ || exit 1
wget -c "https://files.ax86.net/terminus-ttf/files/latest.zip"
unzip latest.zip
rm latest.zip
VERSION=$(echo terminus-ttf-*/ | rev | cut -f 1 -d - | rev | sed 's|/$||')
chmod 0644 "terminus-ttf-${VERSION}"/*
mv "terminus-ttf-${VERSION}"/*.ttf .
mkdir -p "$PKG"/usr/doc/
mv "terminus-ttf-${VERSION}"/ "$PKG"/usr/doc/terminus-ttf
mkdir -p "$PKG"/install
cat <<EOF > "$PKG"/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
$PKGNAM: $PKGNAM (a clean fixed width font)
$PKGNAM:
$PKGNAM: TTF format addition to the official terminus-font package.
$PKGNAM:
$PKGNAM:
$PKGNAM:
$PKGNAM:
$PKGNAM: Homepage: http://$PKGNAM.sourceforge.net
$PKGNAM: https://files.ax86.net/terminus-ttf/
$PKGNAM:
$PKGNAM:
EOF
cat <<EOF > "$PKG"/install/doinst.sh
#!/bin/sh
# Update the X font indexes:
if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then
mkfontdir usr/share/fonts/TTF 2> /dev/null
fi
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache -f 2> /dev/null
fi
EOF
cd "$PKG" || exit 1
/sbin/makepkg --linkadd y --chown n --prepend "$OUTPUT/$PKGNAM-$VERSION-noarch-$BUILD$TAG.txz"

103
xap/kitty/SlackBuild Executable file
View file

@ -0,0 +1,103 @@
#!/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
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM
LIBDIRSUFFIX=$(uname -m | grep -o 64)
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
# 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" || exit 1
git pull --all
cp -R "$REPOSITORY" "$TMP"/"$PRGNAM"
cd "$TMP"/"$PRGNAM"/ || exit 1
[ "$VERSION" == "latest" ] && VERSION=$(git tag --sort=-taggerdate | head -n1)
[ "$VERSION" == "" ] && VERSION=trunk
[ "$VERSION" == "trunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" # || git checkout $VERSION
# installation
mkdir -p "$PKG"/
# sed surgery: setup.py allows overriding the compiler flags, but
# puts a -O3 *after* whatever we set them to. All our SLKCFLAGS
# choices have -O2.
sed -i 's,-O3,-O2,g' setup.py
OVERRIDE_CPPFLAGS="$SLKCFLAGS -Wl,-s" \
OVERRIDE_CFLAGS="$SLKCFLAGS -Wl,-s" \
python3 setup.py \
--libdir-name "lib$LIBDIRSUFFIX" \
--verbose linux-package \
--ignore-compiler-warnings
#mv linux-package "$PKG"/usr
mkdir -p "$PKG"/usr/bin "$PKG"/usr/share "$PKG/usr/lib$LIBDIRSUFFIX"
cp -a linux-package/bin/* "$PKG"/usr/bin
cp -a linux-package/share/* "$PKG"/usr/share
cp -a linux-package/lib*/* "$PKG/usr/lib$LIBDIRSUFFIX"
strip "$PKG"/usr/bin/"$PRGNAM"
mkdir -p "$PKG"/usr/doc/"$PRGNAM"
cp -R ./*.md ./*.rst LICENSE "$PKG"/usr/doc/"$PRGNAM"
# correction
cd "$PKG" || exit 1
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" || exit 1
rm -f "$PKG"/{,usr/}lib"$LIBDIRSUFFIX"/*.la
/sbin/makepkg --linkadd y --chown n --prepend "$OUTPUT/$PRGNAM-${VERSION//-//}-$ARCH-$BUILD$TAG.txz"