summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortimochan2023-11-16 19:25:29 +0800
committertimochan2023-11-16 19:25:29 +0800
commit683d6d876d12ab9158eea4c2ab47d1538ce98e0f (patch)
treeb13c921cf5d9cb52a92c0b3a0ad3a7376e756567
downloadaur-683d6d876d12ab9158eea4c2ab47d1538ce98e0f.tar.gz
init
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD61
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..63283170ea4e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = clash-nyanpasu-appimage
+ pkgdesc = A Clash GUI based on tauri. Only for Clash Meta.
+ pkgver = 1.4.0
+ pkgrel = 1
+ url = https://github.com/keiko233/clash-nyanpasu
+ arch = x86_64
+ license = GPL3
+ depends = zlib
+ depends = hicolor-icon-theme
+ depends = fuse2
+ provides = clash-nyanpasu
+ noextract = clash-nyanpasu-1.4.0-amd64.AppImage
+ options = !strip
+ source_x86_64 = clash-nyanpasu-1.4.0-amd64.AppImage::https://github.com/keiko233/clash-nyanpasu/releases/download/v1.4.0/clash-nyanpasu_1.4.0_amd64.AppImage
+ sha256sums_x86_64 = 5386610db36683dae504902895618c73797f47b6f3b5955584928bc964153bb5
+
+pkgname = clash-nyanpasu-appimage
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..431beece211d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.AppImage
+/pkg
+/src
+*.tar.zst \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..02b2209c7352
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+_pkgname=clash-nyanpasu
+_Pkgname=clash-nyanpasu
+_disname=clash-nyanpasu
+major_version=1
+minor_version=4
+patch_version=0
+
+pkgname="${_pkgname}"-appimage
+pkgver="${major_version}.${minor_version}.${patch_version}"
+pkgrel=1
+pkgdesc="A Clash GUI based on tauri. Only for Clash Meta."
+arch=('x86_64')
+url="https://github.com/keiko233/clash-nyanpasu"
+license=('GPL3')
+options=(!strip)
+depends=('zlib' 'hicolor-icon-theme' 'fuse2')
+provides=('clash-nyanpasu')
+source_x86_64=("${_Pkgname}-${major_version}.${minor_version}.${patch_version}-amd64.AppImage::https://github.com/keiko233/clash-nyanpasu/releases/download/v${major_version}.${minor_version}.${patch_version}/${_Pkgname}_${major_version}.${minor_version}.${patch_version}_amd64.AppImage")
+sha256sums_x86_64=('5386610db36683dae504902895618c73797f47b6f3b5955584928bc964153bb5')
+
+_appimage="${_Pkgname}-${major_version}.${minor_version}.${patch_version}-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"
+}