1 # Contributor: Todd Musall
2 # Contributor: dront78 (Ivan)
3 # Contributor: Victor Noel
4 # Maintainer: Lari Tikkanen
5 ########################################
6 _frontend="y" # Build the Qt GUI y/n
7 ########################################
8 pkgname=('heimdall-git')
11 pkgdesc="A cross-platform open-source utility to flash firmware (aka ROMs) onto Samsung Galaxy S devices."
12 arch=('i686' 'x86_64')
13 url="http://www.glassechidna.com.au/products/heimdall/"
15 if [ "$_frontend" = "y" ]; then
16 depends=('gcc-libs' 'libusb' 'qt')
18 depends=('gcc-libs' 'libusb')
21 optdepends=('android-udev: Udev rules to connect Android devices to you linux box')
22 conflicts=('heimdall')
24 source=('heimdall.desktop')
25 md5sums=('6c4de9e74c0d9e7ab4d50af21303b78a')
27 _gitroot="git://github.com/Benjamin-Dobell/Heimdall.git"
33 if [ -d $_gitname ]; then
34 cd $_gitname && git pull origin
36 git clone --depth=1 $_gitroot $_gitname
39 rm -rf $srcdir/$_gitname-build
41 cp -r $srcdir/$_gitname $srcdir/$_gitname-build
43 # Build libpit which is needed for compiling heimdall
44 cd $srcdir/$_gitname-build/libpit
45 ./configure --prefix=/usr
48 # Build heimdall command line tool
51 ./configure --prefix=/usr
54 # Build heimdall GUI front end
55 if [ "$_frontend" = "y" ]; then
56 cd ../heimdall-frontend/
58 qmake OUTPUTDIR="${pkgdir}/usr/bin" heimdall-frontend.pro
64 cd ${srcdir}/$_gitname-build
66 # Install heimdall command line tool
69 # Prevent make install from trying to reload udev
70 # We'll do this the Arch way at package install time
71 mv Makefile Makefile.orig
72 sed -e 's/sudo service udev restart/echo sudo service udev restart/' <Makefile.orig >Makefile
74 make DESTDIR="${pkgdir}" install
75 rm -rf "${pkgdir}/lib/"
76 install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/$_gitname/LICENSE"
78 # Install heimdall GUI front end
79 if [ "$_frontend" = "y" ]; then
80 cd ../heimdall-frontend
81 make DESTDIR="${pkgdir}/" install
82 install -m644 -D "${srcdir}/heimdall.desktop" "${pkgdir}/usr/share/applications/heimdall.desktop"