84 lines
1.8 KiB
Bash
Executable file
84 lines
1.8 KiB
Bash
Executable file
#!/bin/sh -x
|
|
|
|
# variables
|
|
VERSION=git$(date +"%Y.%m.%d_%H.%M")
|
|
BUILD=1
|
|
|
|
|
|
TAG=cyco
|
|
OUTPUT=/tmp
|
|
TMP=/tmp/$TAG
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=grandr
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
|
PREFIX=/usr
|
|
|
|
# nettoyage préalable
|
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
|
|
|
mkdir -p $PKG
|
|
|
|
# mise en place
|
|
cd $TMP
|
|
if [ ! -e $REPOSITORY ] ; then
|
|
mkdir -p $(dirname $REPOSITORY)
|
|
( cd $(dirname $REPOSITORY)
|
|
git clone git://anongit.freedesktop.org/xorg/app/grandr $PRGNAM
|
|
)
|
|
else
|
|
( cd $REPOSITORY
|
|
git pull
|
|
)
|
|
fi
|
|
|
|
cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION
|
|
( cd $TMP/$PRGNAM-$VERSION
|
|
|
|
./autogen.sh \
|
|
--prefix=$PREFIX# #\
|
|
# --mandir=$PREFIX/man \
|
|
# --libdir=$PREFIX/lib$(echo "$ARCH" | grep -o 64)
|
|
make
|
|
|
|
make PREFIX=$PREFIX DESTDIR=$PKG INSTALL_ROOT=$PKG install
|
|
)
|
|
|
|
# correction
|
|
( cd $PKG
|
|
chown -R root:root *
|
|
|
|
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
|
)
|
|
|
|
# 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 (xrandr GUI)
|
|
$PRGNAM:
|
|
$PRGNAM: RandR user interface using GTK+ libraries
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: http://cgit.freedesktop.org/xorg/app/grandr/
|
|
$PRGNAM:
|
|
EOF
|
|
|
|
# empaquetage
|
|
cd $PKG
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|