updated on Thu Jan 19 04:14:35 UTC 2012
[aur-mirror.git] / dupeguru-me-bin / PKGBUILD
blobf4ac71c8ffa212a062055123f7fb7103095d8a46
1 # Maintainer: Dan Serban
2 # Contributor: SiD
4 pkgname=dupeguru-me-bin
5 pkgver=6.x.x
6 pkgrel=1
7 pkgdesc="Find duplicate songs in your music collection"
8 arch=(i686 x86_64)
9 url=http://www.hardcoded.net/dupeguru_me/
10 license=(custom:Fairware)
11 depends=(python pyqt sip)
12 makedepends=(lynx)
13 _filearch=i386
14 [ "${CARCH}" == "x86_64" ] && _filearch=amd64
16 build()
18   rm dupeguru-me_*.deb 2>/dev/null || true
19   _url=$(lynx -dump http://www.hardcoded.net/dupeguru_me/ | grep -o http.*${_filearch}.deb | tail -1)
20   wget ${_url}
21   bsdtar -xf $(basename ${_url}) data.tar.gz
22   bsdtar -xf data.tar.gz
23   rm data.tar.gz
24   rm usr/local/share/dupeguru_me/sip.so
25   cd usr/local/share/dupeguru_me
26   rm -rf PyQt4
27   mkdir -p "${pkgdir}"/usr/bin
28   cd "${srcdir}"/usr
29   mv share "${pkgdir}"/usr/
30   cd local/share
31   mv dupeguru_me "${pkgdir}"/usr/share/
32   sed -i 's|#!/usr/bin/env python3.1|#!/usr/bin/python|' "${pkgdir}"/usr/share/dupeguru_me/run.py
33   USRBINFILE="${pkgdir}"/usr/bin/dupeguru_me
34   echo "#!/bin/bash" > "$USRBINFILE"
35   echo "cd /usr/share/dupeguru_me" >> "$USRBINFILE"
36   echo "python run.py" >> "$USRBINFILE"
37   chmod +x "$USRBINFILE"