查看:
614
|
回复:
0
|
嘉立创下单小助手 Arch Linux 打包
|
taotieren
6
主题
3
回复 |
发表于2022-12-04 22:46:08
|
只看该作者
1#
电梯直达
嘉立创下单小助手 Arch Linux 下打包到 AUR 仓库
现在 JLC 下单小助手终于支持 Linux 平台了。 为了更好方便 Arch Linux 用户使用 JLC 下单小助手,现在将其打包到 AUR 仓库。 以下为打包源码。AUR 仓库地址为:https://aur.archlinux.org/packages/jlc-assistant-bin
Arch Linux 下安装 JLC 下单小助手,使用 AUR 工具,如用:yay,即可安装。好用的话可以到仓库点给投票。
yay -S jlc-assistant-bin其他 Linux 版本可以参考 PKGBUILD 源码自行修改使用。
PKGBUILD 源码:
# Contributor: taotieren <admin@taotieren.com> pkgname=jlc-assistant-bin pkgver=5.0.69 pkgrel=6 pkgdesc="嘉立创下单助手:该应用为您下单提供便利,快速获取优惠及下单信息,无需在网站等待审核审单!在下单助手下单立享打折优惠! " arch=('x86_64') url="https://www.jlc.com/portal/appDownloadsWithConfig.html" license=('custom') provides=(${pkgname}) conflicts=(${pkgname%-bin}) replaces=(${pkgname}) depends=(gtk3 nss libxss electron libappindicator-gtk3 libnotify) makedepends=() backup=() options=() install= source=("${pkgname%-bin}-${pkgver}.zip::https://download.jlc.com/pcAssit/${pkgver}/JLCPcAssit-linux-x64-${pkgver}.zip") sha256sums=('d943ebf9ee328a657cd608bdf301f637ea48988b57adeae1ae770fae944caacd') noextract=() package() { export LC_CTYPE="zh_CN.UTF-8" install -dm0755 "${pkgdir}/usr/lib/${pkgname%-bin}/" # electron file install -dm0755 "${pkgdir}/usr/lib/${pkgname%-bin}/" cd ${srcdir}/${pkgname%-bin}-linux-x64-${pkgver}/${pkgname%-bin}/ cp -r res ${pkgdir}/usr/lib/${pkgname%-bin} cp -r resources ${pkgdir}/usr/lib/${pkgname%-bin} # icon local _icon for _icon in 16 32 64 72 128 256 512; do install -Dm0644 icon/png/${_icon}.png \ ${pkgdir}/usr/share/icons/hicolor/${_icon}x${_icon}/apps/${pkgname%-bin}.png done # desktop entry install -Dm0644 ${pkgname%-bin}.dkt \ ${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop sed -i 's|/opt/jlc-assistant/icon/png/128.png|jlc-assistant.png|g' \ ${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop sed -i 's|/opt/jlc-assistant/||g' ${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop # jlc-assistant file install -Dm0755 /dev/stdin ${pkgdir}/usr/bin/${pkgname%-bin} << EOF #!/bin/sh exec electron /usr/lib/jlc-assistant/resources/app.asar " \$@" EOF # LICENSE # install -Dm0644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname%-bin}/LICENSE }
|
|