summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eb558849478b7bbf8060fb630cd8299fa5533b31 (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
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_pkgname=prospect-mail
pkgname="${_pkgname}-beta-bin"
_appname="Prospect Mail"
pkgver=0.5.2
_electronversion=27
pkgrel=5
pkgdesc="The Outlook desktop client for the new Outlook Interface from Microsoft 365.Use system-width electron."
arch=(
    "aarch64"
    "armv7h"
    "x86_64"
)
url="https://github.com/julian-alarcon/prospect-mail"
license=("MIT")
provides=("${_pkgname}")
conflicts=(
    "${_pkgname}"
    "${pkgname%-bin}"
)
depends=(
    "electron${_electronversion}"
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.pacman::${url}/releases/download/v${pkgver//_/-}/${_pkgname}-${pkgver//_/-}-aarch64.pacman")
source_armv7h=("${pkgname%-bin}-${pkgver}-armv7h.pacman::${url}/releases/download/v${pkgver//_/-}/${_pkgname}-${pkgver//_/-}-armv7l.pacman")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.pacman::${url}/releases/download/v${pkgver//_/-}/${_pkgname}-${pkgver//_/-}.pacman")
source=(
    "LICENSE-${pkgver}::https://raw.githubusercontent.com/julian-alarcon/prospect-mail/v${pkgver//_/-}/LICENSE"
    "${pkgname%-bin}.sh"
)
sha256sums=('d0e5830cefea162e44ae617ea67300234f69b9fc9c2c9e220ad2b56f9cc189df'
            '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
sha256sums_aarch64=('5e34e57f495623106338b34fa05cef14199ae7189cf2c91c04641070e24e4979')
sha256sums_armv7h=('7ec1e0a63c83b99b84ad565042927e4e6696b192b5d4fcd853c8059484438a7a')
sha256sums_x86_64=('60995b68d8224942c65172381bf098d233dc3194f9b2e1e90d50b236d8fa6513')
build() {
    sed -e "s|@electronversion@|${_electronversion}|" \
        -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|app.asar|g" \
        -e "s|@cfgdirname@|${_appname}|g" \
        -e "s|@options@||g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    sed "s|\"/opt/${_appname}/${_pkgname}\"|${pkgname%-bin}|g;s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \
        -i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
    install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"    
    for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512;do
        install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \
            "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"
    done
    install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}