summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81adc8b955dc4842e2630025befaf708e97e249e (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
# Maintainer: awhb

_pkgname="deemix-gui"
_carchbase="x86"
_carchbit="64"
_originalappimagefilename="linux-x${_carchbit}-latest.AppImage"
_appimage="${_pkgname}.AppImage"

pkgname="${_pkgname}-appimage"
pkgver=20221215
pkgrel=5
pkgdesc="A gui electron app for the deemix lib"
arch=("${_carchbase}_${_carchbit}")
url="https://gitlab.com/RemixDev/deemix-gui"
license=("GPL3")
depends=("alsa-lib" "dbus-glib" "gtk3" "libdbusmenu-gtk2" "libindicator-gtk2" "nss")
source=("https://archive.org/download/deemix-download-mirror/gui/${_originalappimagefilename}")
sha256sums=('7b69de7a6b00cc69e20695c83d86ca9392d01e860bbc58f9ffc42ccc27284d83')
md5sums=('1b51eeaa29ecea32af2c08f262fd576b')

prepare() {
    mv ./${_originalappimagefilename} ./${_appimage}
    chmod u+x ./${_appimage}
    ./${_appimage} --appimage-extract
}

package() {
    install -dm755 "${pkgdir}/usr/bin"
    install -dm755 "${pkgdir}/usr/lib"
    install -dm755 "${pkgdir}/usr/share"
    install -dm755 "${pkgdir}/usr/share/applications"
    install -dm755 "${pkgdir}/usr/share/licenses"
    install -dm755 "${pkgdir}/usr/share/licenses/${_pkgname}"

    cp -a "../LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"

    cp -a "${srcdir}/squashfs-root" "${pkgdir}/usr/lib/${_pkgname}"
    find "${pkgdir}/usr/lib/${_pkgname}" -type d -exec chmod 755 "{}" \;

    cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share"
    chmod -R 755 "${pkgdir}/usr/share/icons"

    sed -i -e "s/AppRun/deemix-gui/" "${pkgdir}/usr/lib/${_pkgname}/${_pkgname}.desktop"
    ln -s "/usr/lib/${_pkgname}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
    ln -s "/usr/lib/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}