summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bba90e19f4142ccc61deb83c0569879e2572c129 (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
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=muwire
pkgver=0.6.8
pkgrel=1
pkgdesc='An I2P file sharing program'
arch=('any')
url='https://muwire.com/'
license=('GPL3')
depends=('bash' 'java-runtime' 'hicolor-icon-theme')
makedepends=('gradle')
source=("https://github.com/zlatinb/muwire/archive/muwire-${pkgver}.tar.gz"
        'muwire.desktop'
        'muwire.sh')
sha256sums=('b91410e3674c517a3312a64fb9fb3d9b97e0bfc72f66652c31209ccc4f299b9a'
            'e3e425d872f3c8cd68037b4ffe71ec66d07148072db89f6af220e7b24881d633'
            'd48d94fef75622bb2afca202804a32cac1cec0514894e1a7c21bb9c2d3a9438b')

build() {
    gradle -p "muwire-muwire-${pkgver}" clean assemble
}

package() {
    cd "muwire-muwire-${pkgver}"
    
    bsdtar -x -f "gui/build/distributions/gui-shadow-${pkgver}.tar" --strip-components 2 */lib/"gui-${pkgver}-all.jar"
    
    install -D -m755 "${srcdir}/muwire.sh"   "${pkgdir}/usr/bin/muwire"
    install -D -m644 "gui-${pkgver}-all.jar" "${pkgdir}/usr/share/java/muwire.jar"
    
    install -D -m644 "${srcdir}/muwire.desktop" -t "${pkgdir}/usr/share/applications"
    
    local _res
    for _res in 16 32 48 64 128
    do
        install -D -m644 "gui/griffon-app/resources/MuWire-${_res}x${_res}.png" \
            "${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}/apps/${pkgname}.png"
    done
}