summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c76aba3abc26099e7177f104b2974df31e7a2601 (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: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=avaloniatftpclient-bin
_appname=TFTPClient
_pkgname="Avalonia-${_appname}"
pkgver=1
pkgrel=2
pkgdesc="Cross platform TFTP client desktop application, uses Avalonia as the UI framework"
arch=("x86_64")
url="https://github.com/jpmikkers/Avalonia-TFTPClient"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
    'dotnet-runtime>=8.0.0'
)
makedepends=(
    'gendesk'
    'icoutils'
)
noextract=("${pkgname%-bin}-${pkgver}.zip")
source=(
    "${pkgname%-bin}-${pkgver}.zip::${url}/files/15011471/${_pkgname//-/}_linux_x64_net8.zip"
    "LICENSE-${pkgver}::https://raw.githubusercontent.com/jpmikkers/Avalonia-TFTPClient/v${pkgver}/LICENSE"
    "${pkgname%-bin}.ico::https://raw.githubusercontent.com/jpmikkers/Avalonia-TFTPClient/v${pkgver}/AvaloniaTFTPClient/TFTPClient/Assets/avalonia-logo.ico"
    "${pkgname%-bin}.sh"
)
sha256sums=('8fb1bc6af493f0aec4cd6f9bacd5efa40a9e427daa63e114ab9a18df7d561607'
            '7e08e464b65f43ec00cb613655de03bee0e9a9ab93d8cc350d97f774608e1cdb'
            'df9262e2176d830bfbef5b5e1dfa12f91c89e8ecb764eee366c3352df371d665'
            '06ee6a208701a87e47206d96f32b91dda076da74f657bf4015c89348a8be90d5')
build() {
    sed -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|${_appname}|g" \
        -e "s|@options@||g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    install -Dm755 -d "${srcdir}/usr/lib/${pkgname%-bin}"
    bsdtar -xf "${srcdir}/${pkgname%-bin}-${pkgver}.zip" -C "${srcdir}/usr/lib/${pkgname%-bin}"
    chmod a+x "${srcdir}/usr/lib/${pkgname%-bin}/${_appname}"
    gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${pkgname%-bin}" --exec="${pkgname%-bin}"
    icotool -i 7 -x "${srcdir}/${pkgname%-bin}.ico" -o "${srcdir}/${pkgname%-bin}.png"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    cp -r "${srcdir}/usr" "${pkgdir}"
    install -Dm644 "${srcdir}/${pkgname%-bin}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
    install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}