slackbuilds/xap/UNUSED/heimdall/heimdall.SlackBuild
Gwenhael Le Moine 36cec7a97c unused
Signed-off-by: Gwenhael Le Moine <cycojesus@timac.erasme.org>
2013-09-19 15:59:09 +02:00

94 lines
1.6 KiB
Bash
Executable file

#!/bin/sh -x
# variables
CWD=$(pwd)
PRGNAM=$(basename $(pwd))
BRANCH=
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")}
ARCH=${ARCH:-$(uname -m)}
BUILD=1
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
REPOSITORIES=/home/installs/SlackBuilds/repositories
DOCS="*.txt"
PREFIX=/usr
SLCKFLAGS=""
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
git clone git://github.com/Benjamin-Dobell/Heimdall.git $REPOSITORIES/$PRGNAM
else
( cd $REPOSITORIES/$PRGNAM
git pull
)
fi
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
cp -R $REPOSITORIES/$PRGNAM $TMP/$PRGNAM
cd $TMP/$PRGNAM
cd libpit
./autogen.sh
./configure --prefix=/usr
make
cd ../heimdall
./autogen.sh
./configure --prefix=/usr
make
make install DESTDIR=$PKG
cd ../heimdall-frontend/
qmake heimdall-frontend.pro
make
cd ../Linux/
cp heimdall-frontend $PKG$PREFIX/bin/
mkdir -p $PKG$PREFIX/doc/$PRGNAM/
cp README $PKG$PREFIX/doc/$PRGNAM/
# correction
cd $PKG
chown -R root:root *
find $PKG -name \.hg\* -exec rm -fr {} \;
# Strip binaries
( 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
)
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (Samsung Galaxy Note tool)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://github.com/Benjamin-Dobell/Heimdall
$PRGNAM:
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz