summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b15fdbb0fd6b69bc888a726de9002015aa282bf3 (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.11.9
#_pkgrel=24
_pkgtyp=stable
_pkghash_x64=ec62a2df
_pkghash_arm64=923be831
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=('98c48fb3c3276f1bb1ab659c687eeee1d3de6a59b466c3d40bcb4e10307b8fb0')
sha256sums_aarch64=('78076a239104665abbc076a15b7d3622d7602dc11341747a9295d66aa934313e')

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
}