summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a90414213479d927a600f934b572162a34fa2e2 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Maintainer: Juraj Fiala <doctorjellyface at riseup dot net>

_srcname=leap.bitmask
pkgname=bitmask_client
pkgver=0.9.2
pkgrel=2
pkgdesc='Encrypted communication for mere mortals.'
arch=('any')
url='https://bitmask.net/'
license=('GPL3')
depends=(
  'desktop-file-utils'
  'xdg-utils'
  'openvpn'
  'python2-argh'
  'python2-requests'
  'python2-srp'
  'python2-pyopenssl'
  'python2-coloredlogs'
  'python2-psutil'
  'python2-ipaddr'
  'python2-twisted'
  'python2-daemon16'
  'python2-keyring'
  'python2-zope-proxy'
  'python2-pyzmq'
  'python2-txzmq'
  'python2-oauth'
  'python2-logbook'
  'python2-pyside'
  'python2-leap_soledad_client'
  'python2-leap_keymanager'
  'python2-leap_mail'
  'python2-leap_pycommon'
)
makedepends=(
  'python2-docutils'
  'python-pyside-tools'
)
# Disable tests for now as they fail
#checkdepends=(
  #'python2-nose'
  #'python2-nose-exclude'
  #'python2-mock'
  #'python2-coverage'
  #'python2-pep8'
  #'python2-flake8'
  #'python2-tox'
#)
source=(
  "https://github.com/leapcode/$pkgname/archive/$pkgver.tar.gz"
  "https://github.com/leapcode/$pkgname/archive/debian/experimental.zip"
)
validpgpkeys=('BE23FB4A0E9DB36ECB9AB8BE23638BF72C593BC1')
sha512sums=('e93504729125cd50992b9b8c7a6cf3589baf0fb81ba10d80a5293f5cfd1bfb8fd27dc1d0ece3b70f9b10c16f210a523a0c46c7d6f657dd9d5e58135b78752288'
            'SKIP')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  # Install to /usr/bin instead of /usr/sbin
  sed -i 's/sbin/bin/' setup.py

  # Point the tests to python2 executables
  #sed -i 's/\/bin\/nosetests/\/bin\/nosetests2/' run_tests.sh
  #sed -i 's/flake8/flake8-python2/' run_tests.sh
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  # Qt
  make
  # Python
  python2 setup.py build

  cd "$srcdir/$pkgname-debian-experimental/docs/man"
  rst2man2 bitmask.1.rst      bitmask.1
  rst2man2 bitmask-root.1.rst bitmask-root.1
}

#check() {
  #cd "$srcdir/$pkgname-$pkgver"
  #sh run_tests.sh -N
#}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  python2 setup.py install --skip-build --root="$pkgdir" --optimize=1

  install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
  install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}"      AUTHORS\
                                                              CHANGELOG.rst\
                                                              README.rst

  cd "$srcdir/$pkgname-debian-experimental"
  install -Dm644 -t "${pkgdir}/usr/share/pixmaps"      debian/bitmask.xpm
  install -Dm644 -t "${pkgdir}/usr/share/applications" debian/bitmask.desktop

  install -Dm644 -t "${pkgdir}/usr/share/man/man1" docs/man/bitmask.1 \
                                                   docs/man/bitmask-root.1

  for i in 24x24 32x32 48x48 64x64 128x128 256x256; do
    install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/$i/apps/" \
                      debian/icons/hicolor/$i/apps/bitmask.png
  done
}

# vim:set ts=2 sw=2 et: