summaryrefslogtreecommitdiff
path: root/misc/heimdall
diff options
context:
space:
mode:
authorDiniz Bortolotto <diniz.bortolotto@gmail.com>2017-01-20 21:16:26 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-01-21 06:24:15 +0700
commitb1ca4d7ba934adb36a8f0455d00aa40e430d3e7b (patch)
treea670aab3790bc17ad8a7e40f8d5d0574bcbf9f28 /misc/heimdall
parent1c8aede57bb35485a27bbac20391c2cd6a5d858b (diff)
downloadslackbuilds-b1ca4d7ba934adb36a8f0455d00aa40e430d3e7b.tar.gz
misc/heimdall: Added (Flash ROM tool).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/heimdall')
-rw-r--r--misc/heimdall/README31
-rw-r--r--misc/heimdall/doinst.sh11
-rw-r--r--misc/heimdall/heimdall.SlackBuild139
-rw-r--r--misc/heimdall/heimdall.info10
-rw-r--r--misc/heimdall/slack-desc19
5 files changed, 210 insertions, 0 deletions
diff --git a/misc/heimdall/README b/misc/heimdall/README
new file mode 100644
index 0000000000..d57d404146
--- /dev/null
+++ b/misc/heimdall/README
@@ -0,0 +1,31 @@
+Heimdall is a cross-platform open-source tool suite used to flash
+firmware (aka ROMs) onto Samsung mobile devices.
+
+The "Heimdall Suite" is composed by:
+Heimdall command line
+Heimdall Frontend.
+
+Heimdall command line package includes: Heimdall command line tool and
+udev rules (for non-root USB access).
+Heimdall Frontend package includes: Heimdall Frontend - graphical UI only.
+
+So, this script comes with an option (GUI) that can be set at build time.
+The default is GUI=yes, but if you don't want to install the frontend, you
+could do that by setting GUI to 'no' in command line:
+GUI=no ./heimdall.SlackBuild
+
+Don't forget to reloaded udev after installing this package
+/etc/rc.d/rc.udev reload
+
+------------------------------------------------------------------------------
+DISCLAIMER:
+
+ This software attempts to flash your Galaxy S device. The very nature of
+ flashing is dangerous. As with all flashing software, Heimdall has the
+ potential to damage (brick) your phone if not used carefully. If you're
+ concerned, don't use this software. Flashing ROMs onto your phone may also
+ void your warranty. Benjamin Dobell and Glass Echidna are not responsible
+ for the result of your actions.
+
+ Heimdall (c) 2010-2013 Benjamin Dobell, Glass Echidna
+------------------------------------------------------------------------------
diff --git a/misc/heimdall/doinst.sh b/misc/heimdall/doinst.sh
new file mode 100644
index 0000000000..beb53402f1
--- /dev/null
+++ b/misc/heimdall/doinst.sh
@@ -0,0 +1,11 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config etc/udev/rules.d/60-heimdall.rules.new
diff --git a/misc/heimdall/heimdall.SlackBuild b/misc/heimdall/heimdall.SlackBuild
new file mode 100644
index 0000000000..ac43f236bd
--- /dev/null
+++ b/misc/heimdall/heimdall.SlackBuild
@@ -0,0 +1,139 @@
+#!/bin/sh
+
+# Slackware build script for Heimdall
+
+# Copyright 2017 Diniz Bortolotto <diniz.bortolotto@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=heimdall
+VERSION=${VERSION:-1.4.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+GUI=${GUI:-yes} # Heimdall Frontend support, enabled by default
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-suite-$VERSION
+tar xvf $CWD/$PRGNAM-suite-$VERSION.tar.gz
+cd $PRGNAM-suite-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Compiling libpit 1.4
+# This is a mandatory Heimdall component
+cd libpit
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+cd $TMP/$PRGNAM-suite-$VERSION
+
+# Compile and Install Heimdall
+cd heimdall
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+# Adjusts to create udev rule in /etc/udev/rules.d
+sed -i '/^udevrulesdir/s/libdir/sysconfdir/g' Makefile
+sed -i '/^udevrules_DATA/s/rules/rules.new/2' Makefile
+mv 60-heimdall.rules 60-heimdall.rules.new
+
+make
+make install DESTDIR=$PKG
+cd $TMP/$PRGNAM-suite-$VERSION
+
+# Compile and Install Heimdall Frontend (optional)
+case "$GUI" in
+ yes)
+ cd heimdall-frontend
+ qmake OUTPUTDIR=$PKG/usr/bin
+ make
+ make install DESTDIR=$PKG
+ cd $TMP/$PRGNAM-suite-$VERSION
+ ;;
+ *) ;;
+esac
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $TMP/$PRGNAM-suite-$VERSION/LICENSE \
+ $TMP/$PRGNAM-suite-$VERSION/Linux/README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $TMP/$PRGNAM-suite-$VERSION/README $PKG/usr/doc/$PRGNAM-$VERSION/DISCLAIMER
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/misc/heimdall/heimdall.info b/misc/heimdall/heimdall.info
new file mode 100644
index 0000000000..172af1aac1
--- /dev/null
+++ b/misc/heimdall/heimdall.info
@@ -0,0 +1,10 @@
+PRGNAM="heimdall"
+VERSION="1.4.0"
+HOMEPAGE="http://glassechidna.com.au/heimdall/"
+DOWNLOAD="https://bitbucket.org/benjamin_dobell/heimdall/downloads/heimdall-suite-1.4.0.tar.gz"
+MD5SUM="911c6825c7a09340c27b1ee5078736c5"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Diniz Bortolotto"
+EMAIL="diniz.bortolotto@gmail.com"
diff --git a/misc/heimdall/slack-desc b/misc/heimdall/slack-desc
new file mode 100644
index 0000000000..73add793de
--- /dev/null
+++ b/misc/heimdall/slack-desc
@@ -0,0 +1,19 @@
+# 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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+heimdall: Heimdall Suite (Flash ROMs onto Galaxy S devices)
+heimdall:
+heimdall: Heimdall is a cross-platform open-source tool suite used to flash
+heimdall: firmware (aka ROMs) onto Samsung mobile devices.
+heimdall:
+heimdall:
+heimdall:
+heimdall:
+heimdall:
+heimdall: Heimdall (c) 2010-2013 Benjamin Dobell, Glass Echidna
+heimdall: http://www.glassechidna.com.au/products/heimdall/