#!/bin/sh # variables CWD=$(pwd) PRGNAM=$(basename $(pwd)) BRANCH= VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")} ARCH=${ARCH:-$(uname -m)} BUILD=1 TAG=gwh 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 < $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 rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz