added for MacBookPro

This commit is contained in:
Gwenhael Le Moine 2013-12-14 11:05:32 +01:00
parent 2144417c45
commit 85d70432f6

72
a/nvidiabl/nvidiabl.SlackBuild Executable file
View file

@ -0,0 +1,72 @@
#!/bin/sh -x
# variables
CWD=$(pwd)
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")_$(uname -r)}
BUILD=${BUILD:-1}
TAG=cyco
TMP=${TMP:-/tmp/$TAG}
OUTPUT=${OUTPUT:-/tmp}
PRGNAM=${PRGNAM:-$(basename $CWD)}
PKG=${PKG:-$TMP/pkg-$PRGNAM}
ARCH=${ARCH:-noarch}
PREFIX=${PREFIX:-/usr}
REPOSITORY=${REPOSITORY:=/home/installs/SlackBuilds/repositories/$PRGNAM}
# nettoyage préalable
rm -fr $PKG
mkdir -p $TMP
cd $TMP
# mise en place
[ ! -e $REPOSITORY ] \
&& git clone https://github.com/guillaumezin/nvidiabl.git $REPOSITORY \
|| (cd $REPOSITORY; git pull)
cp -R $REPOSITORY $PRGNAM
cd $PRGNAM
make
make install DESTDIR=$PKG
mkdir -p $PKG$PREFIX/{sbin,doc/$PRGNAM}
cp -R scripts/ README $PKG$PREFIX/doc/$PRGNAM
cp scripts/usr/local/sbin/* $PKG$PREFIX/sbin
# 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 (Linux driver)
$PRGNAM:
$PRGNAM: for setting the backlight brightness on laptops using NVIDIA GPU
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/guillaumezin/nvidiabl
$PRGNAM:
EOF
# empaquetage
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz