summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 76c51b82e4e29273568202829ee88eb6bc836296 (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
# Maintainer: Saleem Rashid <dev@saleemrashid.com>
pkgbase='dbb-app'
pkgname=("${pkgbase}" 'dbb-cli')
gitname="${pkgbase}"
pkgrel=1
pkgver='3.0.0'
url='https://digitalbitbox.com/'
arch=('i686' 'x86_64')
license=('MIT')
source=(
    "git://github.com/digitalbitbox/${gitname}.git#tag=v${pkgver}"
    '51-hid-digitalbitbox.rules'
    'digitalbitbox.desktop'
)
sha256sums=('SKIP'
            'fc8273cb499f6643ebfdf197f7fa00efbed171d65c6eff75f93460a0ec5b41d4'
            '255065c71b2ad7ab7328518689d800a6284ecf9c445c6004281800420bdc411f')

build() {
    cd "${srcdir}/${gitname}"

    ./autogen.sh
    ./configure --prefix=/usr --with-gui=qt5 --enable-shared=no --enable-libusb --disable-udev-check LDFLAGS="-pthread"
    make
}

package_dbb-app() {
    pkgdesc='A QT based application for the Digital Bitbox hardware wallet'
    depends=('curl' 'hidapi' 'qrencode' 'qt5-base' 'desktop-file-utils' 'dbb-cli')

    cd "${srcdir}/${gitname}"

    install -Dm0755 src/dbb-app "${pkgdir}/usr/bin/dbb-app"
    install -Dm0644 src/qt/res/dbb_icon.png "${pkgdir}/usr/share/pixmaps/digitalbitbox.png"

    install -Dm0644 "${srcdir}/digitalbitbox.desktop" "${pkgdir}/usr/share/applications/digitalbitbox.desktop"

    install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_dbb-cli() {
    pkgdesc='A command line application for the Digital Bitbox hardware wallet'
    depends=('hidapi')

    cd "${srcdir}/${gitname}"

    install -Dm0755 src/dbb-cli "${pkgdir}/usr/bin/dbb-cli"

    install -Dm0644 "${srcdir}/51-hid-digitalbitbox.rules" "${pkgdir}/usr/lib/udev/rules.d/51-hid-digitalbitbox.rules"

    install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}