🎨 Update auto aur PKGBUILD. (#12890)
This commit is contained in:
parent
6dbb18e69e
commit
96fddd989e
1 changed files with 34 additions and 10 deletions
44
.github/workflows/auto_aur_release_stable.yml
vendored
44
.github/workflows/auto_aur_release_stable.yml
vendored
|
@ -45,27 +45,51 @@ jobs:
|
|||
arch=("x86_64")
|
||||
url="https://b3log.org/siyuan"
|
||||
license=("AGPL-3.0-only")
|
||||
_pkgname=siyuan-\${pkgver}-linux.AppImage
|
||||
noextract=(siyuan-\${pkgver}-linux.AppImage)
|
||||
options=("!strip" "!debug")
|
||||
depends=("fuse2")
|
||||
optdepends=('pandoc: docx export')
|
||||
source=("https://github.com/siyuan-note/siyuan/releases/download/v\${pkgver}/siyuan-\${pkgver}-linux.AppImage")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
_installdir=/opt/appimages
|
||||
_pkgname=siyuan-\${pkgver}-linux.AppImage
|
||||
noextract=("\${_pkgname}")
|
||||
|
||||
prepare() {
|
||||
chmod a+x \${_pkgname}
|
||||
./\${_pkgname} --appimage-extract >/dev/null
|
||||
sed -i "s+AppRun+\${_installdir}/siyuan.AppImage+" "squashfs-root/siyuan.desktop"
|
||||
sed -i "s+^Icon=.*+Icon=siyuan-bin+" "squashfs-root/siyuan.desktop"
|
||||
chmod +x "\${_pkgname}"
|
||||
./"\${_pkgname}" --appimage-extract > /dev/null
|
||||
}
|
||||
|
||||
build() {
|
||||
# Adjust .desktop so it will work autside of AppImage container
|
||||
sed -i \\
|
||||
-e "s|Exec=AppRun|Exec=/opt/\${pkgname}/\${pkgname}.AppImage|" \\
|
||||
-e "s+^Icon=.*+Icon=siyuan-bin+" \\
|
||||
"squashfs-root/siyuan.desktop"
|
||||
|
||||
# Fix permissions; .AppImage permissions are 700 for all directories
|
||||
chmod -R a-x+rX squashfs-root/usr
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 \${_pkgname} "\${pkgdir}/\${_installdir}/siyuan.AppImage"
|
||||
install -Dm644 "squashfs-root/resources/stage/icon.png" "\${pkgdir}/usr/share/icons/hicolor/512x512/apps/siyuan-bin.png"
|
||||
install -Dm644 "squashfs-root/siyuan.desktop" "\${pkgdir}/usr/share/applications/siyuan-bin.desktop"
|
||||
# AppImage
|
||||
install -Dm755 "\${srcdir}/\${_pkgname}" "\${pkgdir}/opt/\${pkgname}/\${pkgname}.AppImage"
|
||||
install -Dm644 "\${srcdir}/squashfs-root/LICENSE" "\${pkgdir}/opt/\${pkgname}/LICENSE"
|
||||
|
||||
# Desktop file
|
||||
install -Dm644 "\${srcdir}/squashfs-root/siyuan.desktop" \\
|
||||
"\${pkgdir}/usr/share/applications/siyuan.desktop"
|
||||
|
||||
# Icon images
|
||||
install -Dm644 "squashfs-root/resources/stage/icon.png" \\
|
||||
"\${pkgdir}/usr/share/icons/hicolor/512x512/apps/siyuan-bin.png"
|
||||
|
||||
# Symlink executable
|
||||
install -dm755 "\${pkgdir}/usr/bin"
|
||||
ln -s "/opt/\${pkgname}/\${pkgname}.AppImage" "\${pkgdir}/usr/bin/siyuan"
|
||||
|
||||
# Symlink license
|
||||
install -dm755 "\${pkgdir}/usr/share/licenses/\${pkgname}/"
|
||||
ln -s "/opt/\${pkgname}/LICENSE" "\${pkgdir}/usr/share/licenses/\${pkgname}"
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue