updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / bluediving / PKGBUILD
blob4fe28a8b2adba4a56b8dd6971730e08b03489458
1 # Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
2 # Contributer: Dawid Wrobel <cromo@klej.net>
3 pkgname=bluediving
4 pkgver=0.9
5 pkgrel=1
6 pkgdesc="A Bluetooth penetration testing suite"
7 url="http://bluediving.sourceforge.net/"
8 license=('GPL')
9 arch=('i686')
10 depends=(bluez-utils sox obexftp readline expat perl-xml-simple)
11 makedepends=()
12 install=bluediving.install
13 source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tgz)
14 build() {
15 md5sums=('53365a068e7e65a2b047b96998ad3f9d')
17   cd "${srcdir}"/$pkgname-$pkgver
18   # change the bluedivingNG.conf path to /etc
19   sed -i -e 's/bluedivingNG.conf/\/etc\/bluedivingNG.conf/g' bluedivingNG.pl || exit 1
20   # change the paths of the compiled tools to /usr/bin/
21   sed -i -e 's/tools\//\/usr\/bin\//g' bluedivingNG.conf || exit 1
22   # change the why-the-hell-am-I-having-such-a-long-name vcard path
23   sed -i -e '/vcards\/AAAA/ c\  <vcard>/usr/share/bluediving/AAA.vcf</vcard>' bluedivingNG.conf || exit 1
24   #change the sounds paths
25   sed -i -e 's/sounds\//\/usr\/share\/bluediving\//g' bluedivingNG.conf || exit 1
26   # fix libxml2 missing includes compilation error
27   sed -i -e 's/gcc/gcc `xml2-config --cflags`/g' tools/btftp_src/Makefile || exit 1
28   # fix bss directory path
29   sed -i -e 's/bss-0.6/bss-0.8/g' tools/make_tools.sh || exit 1
30   cd tools
31   sh make_tools.sh || return 1
33   mkdir -p "${pkgdir}"/usr/bin/
35   install -m755 atshell attest bccmd bdaddr bss btobex btftp carwhisperer greenplaque \
36         hcidump-crash hstest l2cap-packet l2cap_headersize_overflow redfang \
37         rfcomm_shell hidattack "${pkgdir}"/usr/bin/ || return 1
38   install -D -m755 "${srcdir}"/$pkgname-$pkgver/bluedivingNG.pl    "${pkgdir}"/usr/bin/bluedivingNG.pl || return 1
39   install -D -m644 "${srcdir}"/$pkgname-$pkgver/bluedivingNG.conf  "${pkgdir}"/etc/bluedivingNG.conf || return 1
40   install -D -m644 "${srcdir}"/$pkgname-$pkgver/vcards/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.vcf \
41            "${pkgdir}"/usr/share/bluediving/AAA.vcf || return 1
42   install -D -m644 "${srcdir}"/$pkgname-$pkgver/sounds/explosion.wav "${pkgdir}"/usr/share/bluediving/explosion.wav || return 1
43   install -D -m644 "${srcdir}"/$pkgname-$pkgver/tools/carwhisperer-0.2/out.raw "${pkgdir}"/usr/share/bluediving/out.raw || return 1
45 md5sums=('53365a068e7e65a2b047b96998ad3f9d')