summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5668987611de6fe368e66b7ec94508bdf063ef55 (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
# Maintainer: Lev Lybin <lev.lybin@gmail.com>
# Contributor: Lev Lybin <lev.lybin@gmail.com>

_pkgname=btdex
pkgname=btdex-git
pkgver=v0.1.12.r25.g2f8d1e7
pkgrel=1
pkgdesc='Decentralized exchange system running on the Burst blockchain'
arch=(x86_64)
url='https://github.com/btdex/btdex'
license=(GPL3)
options=(!strip)
depends=(java-environment xdg-utils)
makedepends=(git java-environment)
conflicts=(btdex)
provides=(btdex)
install=btdex.install
source=(git+https://github.com/btdex/btdex.git
        btdex.sh
        btdex.desktop)
sha256sums=('SKIP'
            '162e5c9fad5d5a5e5a59192a64ce6d1a5bf189465eeae4130332b3838f4d9c11'
            'dec0616fc2a04203dcde09d5bd25e35415b6c4bac60752683bee43453388a955')


pkgver() {
    cd $srcdir/${_pkgname}
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd $srcdir/${_pkgname}
    ./gradlew shadowJar
}

package() {
    cd $srcdir

    install -d $pkgdir/opt/${_pkgname}
    install -Dm644 ${_pkgname}/build/libs/btdex-all.jar "$pkgdir/opt/${_pkgname}/btdex.jar"
    install -Dm755 btdex.sh "$pkgdir/opt/${_pkgname}/btdex.sh"
    install -d "$pkgdir/usr/bin"
    ln -sf "$pkgdir/opt/${_pkgname}/btdex.sh" "$pkgdir/usr/bin/btdex"

    # Menu entry
    install -Dm644 "${_pkgname}.desktop" -t "$pkgdir/usr/share/applications"
    install -Dm644 ${_pkgname}/build/resources/main/icon.png "$pkgdir/usr/share/pixmaps/${_pkgname}.png"
}