[qtile & co.] added

This commit is contained in:
Gwenhael Le Moine 2021-09-07 11:42:27 +02:00
parent a68a95bff5
commit e70b8478ba
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
12 changed files with 525 additions and 0 deletions

70
ap/pip2tgz/SlackBuild Executable file
View file

@ -0,0 +1,70 @@
#!/bin/bash
# variables
VERSION=${VERSION:-"trunk"}
BUILD=${BUILD:-1}
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
ARCH=${ARCH:-$(uname -m)}
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
PREFIX=${PREFIX:-/usr}
# nettoyage préalable
rm -fr $PKG
mkdir -p $PKG
# mise en place
[ ! -e $REPOSITORY ] && git clone https://github.com/h3xx/pip2tgz.git $REPOSITORY
cd $REPOSITORY
git pull --all
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
mkdir -p $PKG$PREFIX/bin
cp $REPOSITORY/pip2tgz $PKG$PREFIX/bin/
chmod 755 $PKG$PREFIX/bin/*
# move doc/ to the appropriate location
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp $REPOSITORY/LICENSE $REPOSITORY/README.md $PKG$PREFIX/doc/$PRGNAM
# correction
cd $PKG
chown -R root:root *
# embaumement
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------------------------------------------------------|
$PRGNAM: $PRGNAM (make package of pyhton modules)
$PRGNAM:
$PRGNAM: pip2tgz is a utility to create Slackware packages from Python Pip module distributions.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/h3xx/pip2tgz
$PRGNAM:
EOF
# empaquetage
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz

60
generic-python.SlackBuild Executable file
View file

@ -0,0 +1,60 @@
#!/bin/bash
# Generic python SlackBuild
# variables
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=${PRGNAM:-$(basename $CWD)}
PKG=$TMP/pkg-$PRGNAM
VERSION=${VERSION:-"pip"}
ARCH=$(uname -m)
BUILD=1
PREFIX=/usr
# nettoyage préalable
rm -fr $PKG
mkdir -p $PKG
# installation
EXTRA=""
[ "x$VERSION" == "xpip" ] || EXTRA="==$VERSION"
pip install --ignore-installed --root $PKG --no-deps $PRGNAM$EXTRA
METADATA_FILE=$(find $PKG -name METADATA)
[ ! -e $METADATA_FILE ] && exit 1
VERSION=$(grep "^Version:" $METADATA_FILE | sed 's|^Version: ||')
SUMMARY=$(grep "^Summary:" $METADATA_FILE | sed 's|^Summary: ||')
HOMEPAGE=$(grep "^Home-page:" $METADATA_FILE | sed 's|^Home-page: ||')
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM ($SUMMARY)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: $HOMEPAGE
$PRGNAM:
EOF
# empaquetage
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/python-$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz

1
l/cffi/SlackBuild Symbolic link
View file

@ -0,0 +1 @@
../../generic-python.SlackBuild

76
l/cffi/git.SlackBuild Executable file
View file

@ -0,0 +1,76 @@
#!/bin/bash
# variables
VERSION=${VERSION:-"trunk"}
BUILD=1
TAG=gwh
OUTPUT=/tmp
TMP=/tmp/$TAG
CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
ARCH=$(uname -m)
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
PREFIX=/usr
DOCS="LICENSE AUTHORS *.md"
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
[ ! -e $REPOSITORY ] && hg clone https://foss.heptapod.net/pypy/cffi $REPOSITORY
cd $REPOSITORY
hg pull
cp -R $REPOSITORY $TMP/
cd $TMP/$PRGNAM/
# [ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
[ "x$VERSION" == "xtrunk" ] && VERSION="hg_$(date +%F)"
# installation
python3 ./setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM
cp -R $DOCS $PKG/usr/doc/$PRGNAM
# correction
cd $PKG
chown -R root:root *
find $PKG$PREFIX/man -name "*.?" -type f -exec gzip -9 {} \;
# embaumement
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------------------------------------------------------|
$PRGNAM: $PRGNAM (A Foreign Function Interface for Python.)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://cffi.readthedocs.org/
EOF
# empaquetage
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz

68
l/python-cairo-cffi/SlackBuild Executable file
View file

@ -0,0 +1,68 @@
#!/bin/bash
# variables
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
VERSION=${VERSION:-"trunk"}
DOCS="LICENSE *.rst"
ARCH=$(uname -m)
BUILD=1
PREFIX=/usr
SLCKFLAGS="-fPIC -O2"
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
GIT_URL="https://github.com/Kozea/cairocffi.git"
[ ! -e $REPOSITORY ] && git clone "$GIT_URL" $REPOSITORY
cd $REPOSITORY
git pull --all
cp -R $REPOSITORY $TMP/$PRGNAM
cd $TMP/$PRGNAM
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
# installation
python3 ./setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM
cp -R $DOCS $PKG/usr/doc/$PRGNAM
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (CFFI-based cairo bindings for Python)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/Kozea/cairocffi
$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

1
l/pywayland/SlackBuild Symbolic link
View file

@ -0,0 +1 @@
../../generic-python.SlackBuild

1
l/pywlroots/SlackBuild Symbolic link
View file

@ -0,0 +1 @@
../../generic-python.SlackBuild

68
l/pywlroots/git.SlackBuild Executable file
View file

@ -0,0 +1,68 @@
#!/bin/bash
# variables
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
VERSION=${VERSION:-"trunk"}
DOCS="LICENSE *.rst"
ARCH=$(uname -m)
BUILD=1
PREFIX=/usr
SLCKFLAGS="-fPIC -O2"
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
GIT_URL="https://github.com/flacjacket/pywlroots.git"
[ ! -e $REPOSITORY ] && git clone "$GIT_URL" $REPOSITORY
cd $REPOSITORY
git pull --all
cp -R $REPOSITORY $TMP/$PRGNAM
cd $TMP/$PRGNAM
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
# installation
python3 ./setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM
cp -R $DOCS $PKG/usr/doc/$PRGNAM
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (Python binding to the wlroots library using cffi)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/flacjacket/pywlroots
$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

1
l/xcffib/SlackBuild Symbolic link
View file

@ -0,0 +1 @@
../../generic-python.SlackBuild

1
l/xkbcommon/SlackBuild Symbolic link
View file

@ -0,0 +1 @@
../../generic-python.SlackBuild

68
l/xkbcommon/git.SlackBuild Executable file
View file

@ -0,0 +1,68 @@
#!/bin/bash
# variables
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
VERSION=${VERSION:-"trunk"}
DOCS="LICENSE README.rst"
ARCH=$(uname -m)
BUILD=1
PREFIX=/usr
SLCKFLAGS="-fPIC -O2"
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
GIT_URL="https://github.com/sde1000/python-xkbcommon.git"
[ ! -e $REPOSITORY ] && git clone "$GIT_URL" $REPOSITORY
cd $REPOSITORY
git pull --all
cp -R $REPOSITORY $TMP/$PRGNAM
cd $TMP/$PRGNAM
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
# installation
python3 ./setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM
cp -R $DOCS $PKG/usr/doc/$PRGNAM
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (Python bindings for libxkbcommon using cffi)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/sde1000/python-xkbcommon
$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

110
wayland/qtile/SlackBuild Executable file
View file

@ -0,0 +1,110 @@
#!/bin/bash
# variables
VERSION=${VERSION:-"trunk"}
BUILD=1
TAG=gwh
OUTPUT=/tmp
TMP=/tmp/$TAG
CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
ARCH=$(uname -m)
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
PREFIX=/usr
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
[ ! -e $REPOSITORY ] && git clone https://github.com/qtile/qtile $REPOSITORY
cd $REPOSITORY
git pull --all
cp -R $REPOSITORY $TMP/
cd $TMP/$PRGNAM/
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
# installation
python3 ./setup.py install --root=$PKG
cat <<EOF > $PKG$PREFIX/bin/start_qtile.sh
#!/bin/bash
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_FORCE_DPI=physical
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export SAL_USE_VCLPLUGIN=gtk3
export MOZ_ENABLE_WAYLAND=1
export MOZ_DBUS_REMOTE=1
export _JAVA_AWT_WM_NONREPARENTING=1
# export GDK_BACKEND=wayland
export CLUTTER_BACKEND=gdk
export SDL_VIDEODRIVER=wayland
#export XDG_CURRENT_DESKTOP=qtile
export XDG_CURRENT_DESKTOP=Unity # for tray ?
[ -e $HOME/.profile ] && . $HOME/.profile
exec qtile start -b wayland
EOF
chmod +x $PKG$PREFIX/bin/start_qtile.sh
mkdir -p $PKG$PREFIX/share/wayland-sessions/
cp resources/qtile-wayland.desktop $PKG$PREFIX/share/wayland-sessions/
mkdir -p $PKG$PREFIX/share/xsessions/
cp resources/qtile.desktop $PKG$PREFIX/share/xsessions/
sed -i 's|Exec=qtile start -b wayland|Exec=/usr/bin/start_qtile.sh|' $PKG$PREFIX/share/wayland-sessions/qtile-wayland.desktop
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp LICENSE *.md $PKG$PREFIX/doc/$PRGNAM/
# correction
cd $PKG
chown -R root:root *
find $PKG$PREFIX/man -name "*.?" -type f -exec gzip -9 {} \;
# embaumement
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------------------------------------------------------|
$PRGNAM: $PRGNAM (A tiling window manager written and configured in Python)
$PRGNAM:
$PRGNAM: A full-featured, hackable tiling window manager written and
$PRGNAM: configured in Python
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://qtile.org
EOF
# empaquetage
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz