summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd3c79f9d460c5616f3926429ac256a1223cbcd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Erik Westrup <erik.westrup@gmail.com>
# Contributor: Andre Schlichting <andre dot schlichting at googlemail dot com>
# Contributor: Manuel "ekerazha" C. (www.ekerazha.com)

pkgname=blueproximity
pkgver=1.2.5
pkgrel=8
pkgdesc="A proximity detector for your mobile phone via bluetooth."
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/blueproximity/"
license=('GPL')
depends=('bluez-utils-compat' 'pygtk' 'python2-configobj>=4.7.0-1' 'python2-pybluez>=0.14-2' 'python2' 'librsvg')
source=(http://download.sourceforge.net/sourceforge/blueproximity/$pkgname-$pkgver.tar.gz \
	blueproximity.desktop blueproximity.xpm blueproximity-1.2.5.orig.patch)
options=(emptydirs)
md5sums=('5fa33a73869d1b6f40957bdba3da636b'
         '1e08ef00fc87ccd5ab78f893efa8ff2d'
         '1e2f0204a6a54bee5b5263cb0f5cd8f0'
         '8c42f275aaa26a22df690bccac3ad7be')

build() {
  rm $srcdir/$pkgname-$pkgver.orig/ChangeLog
  rm $srcdir/$pkgname-$pkgver.orig/COPYING
  rm $srcdir/$pkgname-$pkgver.orig/README
  rm -r $srcdir/$pkgname-$pkgver.orig/doc

  cd $srcdir/$pkgname-$pkgver.orig/

  patch -p1 -i ../$pkgname-$pkgver.orig.patch || return 1
}

package() {
  mkdir -p $pkgdir/usr/bin
  mkdir -p $pkgdir/usr/share/applications
  mkdir -p $pkgdir/usr/share/$pkgname
  mkdir -p $pkgdir/usr/share/pixmaps

  install -D -m755 $srcdir/$pkgname-$pkgver.orig/proximity.py $pkgdir/usr/bin/
  install -D -m755 $srcdir/$pkgname-$pkgver.orig/start_proximity.sh $pkgdir/usr/bin/
  install -D -m644 $srcdir/blueproximity.desktop $pkgdir/usr/share/applications/
  install -D -m644 $srcdir/blueproximity.xpm $pkgdir/usr/share/pixmaps/
  cp -r $srcdir/$pkgname-$pkgver.orig/* $pkgdir/usr/share/$pkgname/
  chmod -R 644 $pkgdir/usr/share/$pkgname/*

  sed -i -e "s|dist_path = './'|dist_path = '/usr/share/blueproximity/'|g" $pkgdir/usr/bin/proximity.py
}