diff options
author | Allen Zhong | 2021-06-10 19:23:16 +0800 |
---|---|---|
committer | Allen Zhong | 2021-09-07 11:45:17 +0800 |
commit | b3489aa73474162fa3d2fb1363fa159f97c1b7ea (patch) | |
tree | 8192702220e2d9ef6273e3680435084a71d55508 | |
download | aur-b3489aa73474162fa3d2fb1363fa159f97c1b7ea.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rw-r--r-- | bytedance-feishu-stable-bin.install | 130 |
4 files changed, 175 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..37d3eb8cf820 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = bytedance-feishu-stable-bin + pkgdesc = 飞书Linux版本. 飞书整合即时消息、日历、音视频会议、云文档、工作台等功能于一体,成就团队和个人,更高效、更愉悦。 + pkgver = 4.3.0 + pkgrel = 1 + url = https://www.feishu.cn/ + install = bytedance-feishu-stable-bin.install + arch = x86_64 + groups = + license = unknown + depends = ca-certificates + depends = libx11 + depends = libxtst + options = !strip + options = !emptydirs + source = file://bytedance-feishu_4.3.0-49_amd64.deb + sha256sums = fbd28428ec3df298a03b7bf61d140b8533b16b4506e7a6ba73395ba5b807deef + +pkgname = bytedance-feishu-stable-bin diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..abea4f7f8dbf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.deb +*.log +*.xz +*.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fc3e2d317991 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,23 @@ +# Generated by debtap +# Maintainer: Allen Zhong <allen@moe.cat> +pkgname=bytedance-feishu-stable-bin +pkgver=4.3.0 +_pkgrel=49 +pkgrel=1 +pkgdesc="飞书Linux版本. 飞书整合即时消息、日历、音视频会议、云文档、工作台等功能于一体,成就团队和个人,更高效、更愉悦。" +arch=('x86_64') +url="https://www.feishu.cn/" +license=('unknown') +groups=('') +depends=('ca-certificates' 'libx11' 'libxtst') +#optdepends=('android-emulator' +# 'libu2f-udev') +options=('!strip' '!emptydirs') +install=${pkgname}.install +source=("file://bytedance-feishu_${pkgver}-${_pkgrel}_amd64.deb") +sha256sums=('fbd28428ec3df298a03b7bf61d140b8533b16b4506e7a6ba73395ba5b807deef') + +package(){ + # Extract package data + tar xpvf "${srcdir}/data.tar.xz" --xattrs-include='*' --numeric-owner -C "${pkgdir}" +} diff --git a/bytedance-feishu-stable-bin.install b/bytedance-feishu-stable-bin.install new file mode 100644 index 000000000000..f5bfbcc0ab0f --- /dev/null +++ b/bytedance-feishu-stable-bin.install @@ -0,0 +1,130 @@ +post_install() { + # Add icons to the system icons + XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`" + if [ ! -x "$XDG_ICON_RESOURCE" ]; then + echo "Error: Could not find xdg-icon-resource" >&2 + exit 1 + fi + for icon in product_logo_48.png product_logo_24.png product_logo_256.png product_logo_16.png product_logo_64.png product_logo_128.png product_logo_32.png ; do + size="$(echo ${icon} | sed 's/[^0-9]//g')" + "$XDG_ICON_RESOURCE" install --size "${size}" "/opt/bytedance/feishu/${icon}" \ + "bytedance-feishu" + done + + UPDATE_MENUS="`which update-mime-database usr/share/mime &> /dev/null 2> /dev/null || true`" + if [ -x "$UPDATE_MENUS" ]; then + update-mime-database usr/share/mime &> /dev/null + fi + + # Update cache of .desktop file MIME types. Non-fatal since it's just a cache. + update-desktop-database > /dev/null 2>&1 || true + + NSS_FILES="libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d \ + libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d" + + add_nss_symlinks() { + get_lib_dir + for f in $NSS_FILES + do + target=$(echo $f | sed 's/\.[01]d$//') + if [ -f "/$LIBDIR/$target" ]; then + ln -snf "/$LIBDIR/$target" "/opt/bytedance/feishu/$f" + elif [ -f "/usr/$LIBDIR/$target" ]; then + ln -snf "/usr/$LIBDIR/$target" "/opt/bytedance/feishu/$f" + else + echo $f not found in "/$LIBDIR/$target" or "/usr/$LIBDIR/$target". + exit 1 + fi + done + } + + remove_nss_symlinks() { + for f in $NSS_FILES + do + rm -rf "/opt/bytedance/feishu/$f" + done + } + + remove_udev_symlinks() { + rm -rf "/opt/bytedance/feishu/libudev.so.0" + } + + remove_udev_symlinks +} + +post_upgrade() { + post_install +} + +pre_remove() { + action="$1" + if [ "$2" = "in-favour" ]; then + # Treat conflict remove as an upgrade. + action="upgrade" + fi + # Don't clean-up just for an upgrade.` + if [ "$action" = "upgrade" ] ; then + return + fi + + # Remove icons from the system icons + XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`" + if [ ! -x "$XDG_ICON_RESOURCE" ]; then + echo "Error: Could not find xdg-icon-resource" >&2 + exit 1 + fi + for icon in product_logo_48.png product_logo_24.png product_logo_256.png product_logo_16.png product_logo_64.png product_logo_128.png product_logo_32.png ; do + size="$(echo ${icon} | sed 's/[^0-9]//g')" + "$XDG_ICON_RESOURCE" uninstall --size "${size}" "bytedance-feishu" + done + + UPDATE_MENUS="`which update-mime-database usr/share/mime &> /dev/null 2> /dev/null || true`" + if [ -x "$UPDATE_MENUS" ]; then + update-mime-database usr/share/mime &> /dev/null + fi + + # Update cache of .desktop file MIME types. Non-fatal since it's just a cache. + update-desktop-database > /dev/null 2>&1 || true + +} + +post_remove() { + action="$1" + + # Only do complete clean-up on purge. + if [ "$action" != "purge" ] ; then + return + fi + + NSS_FILES="libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d \ + libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d" + + add_nss_symlinks() { + get_lib_dir + for f in $NSS_FILES + do + target=$(echo $f | sed 's/\.[01]d$//') + if [ -f "/$LIBDIR/$target" ]; then + ln -snf "/$LIBDIR/$target" "/opt/bytedance/feishu/$f" + elif [ -f "/usr/$LIBDIR/$target" ]; then + ln -snf "/usr/$LIBDIR/$target" "/opt/bytedance/feishu/$f" + else + echo $f not found in "/$LIBDIR/$target" or "/usr/$LIBDIR/$target". + exit 1 + fi + done + } + + { + for f in $NSS_FILES + do + rm -rf "/opt/bytedance/feishu/$f" + done + } + + { + rm -rf "/opt/bytedance/feishu/libudev.so.0" + } + + remove_udev_symlinks +} |