summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dcda5937ea65dce87d358bdc325b95d9edcea5c2 (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
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_appname=woniu_ali
pkgname="${_appname//_/-}-bin"
pkgver=1.4.0
pkgrel=2
pkgdesc="蜗牛云盘PC版"
arch=("x86_64")
url="https://snail8.cn/app"
_dlurl="https://www.aliyundrive.com/s/fqu79Z2dBbu/folder/638720ab185b2cf913ce4f438aacd4395844098b"
_mrurl="https://github.com/zxp19821005/My_AUR_Files"
license=('LicenseRef-unknown')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
    'gtk3'
    'ffmpeg4.4'
    'alsa-lib'
    'gtk2'
    'mpv'
)
source=(
    "${pkgname%-bin}-${pkgver}.deb::${_mrurl}/releases/download/${_appname}-${pkgver}/${_appname}_linux_x64_${pkgver}.deb"
    "${pkgname%-bin}.sh"
)
sha256sums=('9279d0419eddf8b083e8952dab9d88f773446e047d622c74c5e2a7675919c0cc'
            '019043cb49dbe1b45db9a551a1e70a07d3098c585a94e4b1284d6d3a4554f2dc')
build() {
    sed -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|${_appname}_linux_x64|g" \
        -e "s|@options@||g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    bsdtar -xf "${srcdir}/data."*
    sed -e "s|/opt/${_appname}_linux_x64/${_appname}_linux_x64 %U|${pkgname%-bin} %U|g" \
        -e "s|/opt/${_appname}_linux_x64/${_appname}_linux_x64.png|${pkgname%-bin}|g" \
        -e "s|Utility|Network;|g" \
        -i "${srcdir}/usr/share/applications/${_appname}_linux_x64.desktop"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}/mpv"
    cp -r "${srcdir}/opt/${_appname}_linux_x64/"* "${pkgdir}/usr/lib/${pkgname%-bin}"
    ln -sf "/usr/bin/mpv" "${pkgdir}/usr/lib/${pkgname%-bin}/mpv/mpv"
    install -Dm644 "${srcdir}/usr/share/applications/${_appname}_linux_x64.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
    install -Dm644 "${srcdir}/opt/${_appname}_linux_x64/${_appname}_linux_x64.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
}