2017-03-01 11:56:49 +01:00
|
|
|
|
#!/bin/sh
|
2009-11-12 09:00:01 +01:00
|
|
|
|
|
|
|
|
|
# variables
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
|
2009-12-29 04:20:04 +01:00
|
|
|
|
PRGNAM=awesome
|
2010-01-16 04:43:26 +01:00
|
|
|
|
BRANCH=master
|
2016-09-18 22:28:40 +02:00
|
|
|
|
VERSION=${VERSION:-${BRANCH}}
|
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
|
|
|
|
|
2011-07-22 08:41:46 +02:00
|
|
|
|
REPOSITORIES=/home/installs/SlackBuilds/repositories
|
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
|
|
|
|
|
2009-11-12 09:00:01 +01:00
|
|
|
|
# nettoyage pr<70>alable
|
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
|
2020-09-03 15:22:52 +02:00
|
|
|
|
[ ! -e $REPOSITORIES/$PRGNAM ] && git clone https://github.com/awesomeWM/$PRGNAM.git $REPOSITORIES/$PRGNAM
|
|
|
|
|
( cd $REPOSITORIES/$PRGNAM; git pull )
|
|
|
|
|
|
|
|
|
|
rm -fr $TMP/$PRGNAM
|
|
|
|
|
mkdir -p $TMP/$PRGNAM
|
|
|
|
|
cd $TMP/$PRGNAM
|
2021-04-08 13:42:40 +02:00
|
|
|
|
VERSION="git_$( cd $REPOSITORIES/$PRGNAM && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
|
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
|
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
|