diff options
author | timochan | 2023-08-28 12:32:55 +0800 |
---|---|---|
committer | timochan | 2023-08-28 12:32:55 +0800 |
commit | 6395b206ba731b63ef230756ec79a69b258a9934 (patch) | |
tree | d0b4efec6e2f1442d91f424b4491bae26433b7b9 | |
download | aur-6395b206ba731b63ef230756ec79a69b258a9934.tar.gz |
init
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 72 |
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1cb9e1c156c8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = qplugged-appimage + pkgdesc = 一个支持所有桌面平台的 IM 前端界面 + pkgver = 0.7.0 + pkgrel = 1 + url = https://github.com/QPlugged/QPlugged + arch = x86_64 + license = AGPL-3 + depends = zlib + depends = hicolor-icon-theme + depends = fuse2 + provides = qplugged + noextract = Qplugged-0.7.0-linux-amd64.AppImage + options = !strip + source_x86_64 = Qplugged-0.7.0-linux-amd64.AppImage::https://github.com/QPlugged/QPlugged/releases/download/qplugged-v0.7.0/qplugged_amd64.AppImage + sha256sums_x86_64 = 0723160d22aaae9bdcf76328024dc7a7ff7d462721f15f140cd8151ec5b125c4 + +pkgname = qplugged-appimage diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..33f080c9ebd0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.AppImage +*.tar.zst +/src +/pkg
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0c2cc43f47aa --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +### +# @Author: timochan +# @Date: 2023-08-23 11:02:41 + # @LastEditors: timochan + # @LastEditTime: 2023-08-28 11:37:32 + # @FilePath: /qplugged-appimage/PKGBUILD +### +# Based off of: https://daveparrish.net/posts/2019-11-16-Better-AppImage-PKGBUILD-template.html +# Maintainer: timochan <i@timochan.cn> + +_pkgname=qplugged +_Pkgname=Qplugged +_disname=q-plugged +major_version=0 +minor_version=7 +patch_version=0 + +pkgname="${_pkgname}"-appimage +pkgver="${major_version}.${minor_version}.${patch_version}" +pkgrel=1 +pkgdesc="一个支持所有桌面平台的 IM 前端界面" +arch=('x86_64') +url="https://github.com/QPlugged/QPlugged" +license=('AGPL-3') +options=(!strip) +depends=('zlib' 'hicolor-icon-theme' 'fuse2') +provides=('qplugged') + +source_x86_64=("${_Pkgname}-${major_version}.${minor_version}.${patch_version}-linux-amd64.AppImage::https://github.com/QPlugged/QPlugged/releases/download/qplugged-v${major_version}.${minor_version}.${patch_version}/qplugged_amd64.AppImage") +sha256sums_x86_64=('0723160d22aaae9bdcf76328024dc7a7ff7d462721f15f140cd8151ec5b125c4') + +_appimage="${_Pkgname}-${major_version}.${minor_version}.${patch_version}-linux-amd64.AppImage" +noextract=("${_appimage}") + +prepare() { + chmod +x "${_appimage}" + ./"${_appimage}" --appimage-extract +} + +build() { + # Adjust .desktop so it will work outside of AppImage container + sed -i \ + -e "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|" \ + -e "s|Icon=.*|Icon=/usr/share/icons/${_pkgname}.png|" \ + "squashfs-root/${_disname}.desktop" + + # Fix permissions; .AppImage permissions are 700 for all directories + chmod -R a-x+rX squashfs-root/usr +} + +package() { + # AppImage + install -Dm755 "${srcdir}/${_appimage}" "${pkgdir}/opt/${pkgname}/${pkgname}.AppImage" + + # Desktop file + install -Dm644 "${srcdir}/squashfs-root/${_disname}.desktop" \ + "${pkgdir}/usr/share/applications/${_pkgname}.desktop" + + # Icon images + install -dm755 "${pkgdir}/usr/share/" + cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/" + ln -s "$(realpath ${srcdir}/squashfs-root/${_disname}.png --relative-to ${srcdir}/squashfs-root/usr/share/icons)" \ + "${pkgdir}/usr/share/icons/${_pkgname}.png" + + # Symlink executable + install -dm755 "${pkgdir}/usr/bin" + ln -s "/opt/${pkgname}/${pkgname}.AppImage" "${pkgdir}/usr/bin/${_pkgname}" + + # Symlink license + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}/" + ln -s "/opt/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" +} |