summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbcb23e44a8a0566c4f08e7bc70bf59dfe4755fd (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
# Generated by debtap
# Maintainer: Allen Zhong <pdev@zhoal.pw>
# Maintainer: Xuanwo <github@xuanwo.io>
# Maintainer: Zhou Zhiqiang <aur@strrl.dev>
# Contributor: Feishu Linux Team <contact@feishu.cn>
pkgname=feishu-bin
pkgver=7.28.10
#_pkgrel=1
_pkgtyp=stable
_pkghash_x64=018b8d40
_pkghash_arm64=8ce25ba1
pkgrel=1
pkgdesc="Linux client of Feishu (Lark) from Bytedance."
arch=('x86_64' 'aarch64')
url="https://www.feishu.cn/"
license=('unknown')
depends=('ca-certificates' 'gtk3' 'nss' 'xdg-utils' 'dnsmasq')
replaces=('bytedance-feishu-stable-bin')
conflicts=('feishu')
provides=('bytedance-feishu' 'feishu')
options=('!strip' '!emptydirs')
install=${pkgname}.install
source_x86_64=("https://sf3-cn.feishucdn.com/obj/ee-appcenter/${_pkghash_x64}/Feishu-linux_x64-${pkgver}.deb")
source_aarch64=("https://sf3-cn.feishucdn.com/obj/ee-appcenter/${_pkghash_arm64}/Feishu-linux_arm64-${pkgver}.deb")
sha256sums_x86_64=('ad58bd6d11eed7f9eed79de0025eb1175207b7aba80011d777c00de09a021a8d')
sha256sums_aarch64=('22c8c6bb21ef9833632580815d1d4d15285a56c59461c177395e62858f5f265d')

package(){
  # Extract package data
  tar xpvf "${srcdir}/data.tar.xz" --xattrs-include='*' --numeric-owner -C "${pkgdir}"

  # Modify files
  cd "${pkgdir}"
  ln -s bytedance-feishu-${_pkgtyp} usr/bin/feishu

  sed -i "s/bytedance-feishu-${_pkgtyp}/feishu/g" "${pkgdir}/usr/share/applications/bytedance-feishu.desktop"
  sed -i 's/StartupNotify=true/StartupNotify=true\nStartupWMClass=feishu/g' "${pkgdir}/usr/share/applications/bytedance-feishu.desktop"

  sed -i "s/bytedance-feishu-${_pkgtyp}/feishu/g" "${pkgdir}/usr/share/menu/bytedance-feishu.menu"
  sed -i "s/bytedance-feishu/feishu/g" "${pkgdir}/usr/share/menu/bytedance-feishu.menu"

  sed -i 's/bytedance-feishu/feishu/g' "${pkgdir}/usr/share/appdata/bytedance-feishu.appdata.xml"

  sed -i 's/bytedance-feishu/feishu/g' "${pkgdir}/opt/bytedance/feishu/bytedance-feishu"

  mv "${pkgdir}"/usr/share/menu/{bytedance-,}feishu.menu
  mv "${pkgdir}"/usr/share/applications/{bytedance-,}feishu.desktop
  mv "${pkgdir}"/usr/share/appdata/{bytedance-,}feishu.appdata.xml
  mv "${pkgdir}"/usr/share/man/man1/{bytedance-feishu-${_pkgtyp},feishu}.1.gz
  mv "${pkgdir}"/usr/share/doc/{bytedance-feishu-${_pkgtyp},feishu}

  # Fix directory permissions
  find "${pkgdir}" -type d | xargs chmod 755
}