2021-06-15 10:26:26 +02:00
|
|
|
#!/bin/bash
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
# variables
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
2009-12-29 04:20:04 +01:00
|
|
|
PRGNAM=awesome
|
2021-09-23 15:52:55 +02:00
|
|
|
GITHUB_REPO=awesomeWM/awesome
|
2022-01-22 10:52:07 +01:00
|
|
|
VERSION=${VERSION:-latest}
|
2021-09-23 15:52:55 +02:00
|
|
|
|
2010-01-16 04:43:26 +01:00
|
|
|
ARCH=${ARCH:-$(uname -m)}
|
|
|
|
BUILD=1
|
2009-11-12 09:00:01 +01:00
|
|
|
|
2020-06-25 11:23:11 +02:00
|
|
|
TAG=gwh
|
2011-02-17 05:54:04 +01:00
|
|
|
TMP=/tmp/$TAG
|
2011-02-17 05:58:04 +01:00
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
2009-12-29 10:47:10 +01:00
|
|
|
OUTPUT=/tmp
|
2009-11-12 09:00:01 +01:00
|
|
|
|
2024-11-18 09:55:36 +01:00
|
|
|
REPOSITORIES=/var/cache/SlackBuilds.gwh
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
SLCKFLAGS=""
|
|
|
|
|
2020-07-12 14:53:00 +02:00
|
|
|
REQUIRES="lua luarocks lgi"
|
2009-12-29 04:20:04 +01:00
|
|
|
|
2022-03-03 10:44:46 +01:00
|
|
|
# nettoyage prealable
|
2020-09-03 15:22:52 +02:00
|
|
|
rm -fr $PKG $TMP/$PRGNAM
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
mkdir -p $PKG
|
|
|
|
|
2016-09-18 22:28:40 +02:00
|
|
|
SRC_PATH=$REPOSITORIES/$PRGNAM
|
|
|
|
|
2009-11-12 09:00:01 +01:00
|
|
|
# mise en place
|
|
|
|
cd $TMP
|
2021-09-23 15:52:55 +02:00
|
|
|
[ ! -e $REPOSITORIES/$PRGNAM ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORIES/$PRGNAM
|
2020-09-03 15:22:52 +02:00
|
|
|
( cd $REPOSITORIES/$PRGNAM; git pull )
|
|
|
|
|
|
|
|
rm -fr $TMP/$PRGNAM
|
|
|
|
mkdir -p $TMP/$PRGNAM
|
|
|
|
cd $TMP/$PRGNAM
|
2023-03-23 09:54:21 +01:00
|
|
|
VERSION="git_r$( cd $REPOSITORIES/$PRGNAM && git rev-list --count HEAD )"
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
# configuration
|
|
|
|
cmake \
|
2020-09-03 15:22:52 +02:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2009-12-29 04:20:04 +01:00
|
|
|
-DSYSCONFDIR=/etc \
|
2020-09-03 15:22:52 +02:00
|
|
|
-DAWESOME_DOC_PATH=/usr/doc/$PRGNAM \
|
|
|
|
-DAWESOME_MAN_PATH=/usr/man \
|
2009-12-29 04:20:04 +01:00
|
|
|
$SRC_PATH
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
# compilation
|
|
|
|
make -j3
|
|
|
|
|
|
|
|
# installation
|
|
|
|
make install DESTDIR=$PKG
|
2009-11-15 09:04:31 +01:00
|
|
|
mkdir -p $PKG/etc/X11/xinit/
|
2009-12-29 04:20:04 +01:00
|
|
|
cp $CWD/xinitrc.$PRGNAM $PKG/etc/X11/xinit/
|
|
|
|
chmod +x $PKG/etc/X11/xinit/xinitrc.$PRGNAM
|
|
|
|
|
2009-11-12 09:00:01 +01:00
|
|
|
# correction
|
|
|
|
cd $PKG
|
|
|
|
chown -R root:root *
|
|
|
|
|
2009-12-29 04:20:04 +01:00
|
|
|
find $PKG -name \.git\* -exec rm -fr {} \;
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
|
|
|
|
|
|
|
# Strip binaries
|
2014-11-24 11:12:53 +01:00
|
|
|
cd $PKG
|
|
|
|
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
|
|
|
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
# embaumement
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
2009-12-29 04:20:04 +01:00
|
|
|
$PRGNAM: $PRGNAM (Window Manager "Framework")
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: $PRGNAM is an extremely fast, small, and dynamic window manager for X.
|
|
|
|
$PRGNAM:
|
2020-09-03 15:22:52 +02:00
|
|
|
$PRGNAM: # for rock in luafilesystem penlight ldoc busted luacheck luacov; do
|
2020-10-23 09:10:54 +02:00
|
|
|
$PRGNAM: luarocks install \$rock;
|
2020-09-03 15:22:52 +02:00
|
|
|
$PRGNAM: done
|
2014-11-24 11:12:53 +01:00
|
|
|
$PRGNAM:
|
2019-06-12 09:22:37 +02:00
|
|
|
$PRGNAM: https://awesomewm.org/
|
2009-12-29 04:20:04 +01:00
|
|
|
$PRGNAM: see /usr/doc/$PRGNAM-$VERSION for more details
|
|
|
|
$PRGNAM:
|
2009-11-12 09:00:01 +01:00
|
|
|
EOF
|
|
|
|
|
|
|
|
# empaquetage
|
2018-04-20 23:02:35 +02:00
|
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
2023-08-16 12:23:26 +02:00
|
|
|
/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|