updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / hsoconnect / PKGBUILD
blob800377cfd0488b2f2b193e557a681234fe54f4cf
1 # Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
2 # Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
4 pkgname=hsoconnect
5 pkgver=1.2.18
6 pkgrel=7
7 pkgdesc="HSO command line connection utility"
8 arch=('any')
9 url="http://www.pharscape.org/forum/index.php?topic=743.0"
10 license=('GPL2')
11 depends=('pygtk' 'hsolink' 'ozerocdoff' 'dbus-python')
12 backup=('usr/share/hsoconnect/hsoconf/HSOconnect.cfg')
13 source=("${pkgname}-${pkgver}.tar.gz::http://www.pharscape.org/forum/index.php?PHPSESSID=f429fc2cadd473a6a7030d9ba04ff9f8&action=dlattach;topic=743.0;attach=28"
14         'hsoconnect.sh'
15         'HSOconnect.cfg'
16         'hsoconnect.desktop')
17 md5sums=('ed7147b66838ca19114657ccffe441c7'
18          'f0af2dfc63df9dd90f783d81e3c1824d'
19          'ba44b2e3cae9e2c17408b109744d98cd'
20          '54fa6503ea415d7bbf897af23e7055a9')
22 build() {
23     cd ${srcdir}/${pkgname}-${pkgver}
25     # python2 fix
26     for file in $(find . -name '*.py' -print); do
27         sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
28         sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
29     done
33 package() {
34     cd ${srcdir}/${pkgname}-${pkgver}
36     install -Dm755 -gnetwork ${srcdir}/${pkgname}.sh ${pkgdir}/usr/bin/${pkgname}
37   
38     install -Dm644 hsoconnect/HSOconnect.1 ${pkgdir}/usr/share/man/man1/HSOconnect.1
40     install -d ${pkgdir}/usr/share/hsoconnect
41     cp -r hsoconnect/hsoc hsoconnect/hsoconf ${pkgdir}/usr/share/hsoconnect
42     rm ${pkgdir}/usr/share/hsoconnect/hsoconf/HSOconnect.cfg.def
43     chown -R :network ${pkgdir}/usr/share/hsoconnect
45     sed -i 's|dialout|network|' ${pkgdir}/usr/share/hsoconnect/hsoc/HSOconsole.py
46     sed -i 's|PIDPATH =.*$|PIDPATH ="/tmp"|g' \
47         ${pkgdir}/usr/share/hsoconnect/hsoc/HSOconnect.py
49     install -D -m644 -gnetwork ${srcdir}/HSOconnect.cfg \
50         ${pkgdir}/usr/share/hsoconnect/hsoconf/HSOconnect.cfg
52     touch ${pkgdir}/usr/share/hsoconnect/hsoconf/{hsoconnect.log,transferlog}
53     chown -R :network ${pkgdir}/usr/share/hsoconnect/hsoconf
54     chmod -R g+rw ${pkgdir}/usr/share/hsoconnect/hsoconf
56     install -d ${pkgdir}/usr/share/applications
57     install -m644 ${srcdir}/hsoconnect.desktop ${pkgdir}/usr/share/applications/
59     install -D hsoconnect/hsoconf/images/pengie/pengie-2-3232.png ${pkgdir}/usr/share/pixmaps/hsoconnect.png
61     install -d ${pkgdir}/etc/
62     ln -sf /usr/share/hsoconnect/hsoconf/HSOconnect.cfg ${pkgdir}/etc/hsoconnect