summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD47
-rw-r--r--tricks.desktop12
3 files changed, 35 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6bbea22349b6..c6dfbe4725b3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = tricks-bin
pkgdesc = The social network for programmers!
- pkgver = 0.9.0
- pkgrel = 2
+ pkgver = 1.0.0
+ pkgrel = 1
url = https://tricks.aseman.io/
arch = x86_64
license = GPL3
@@ -9,11 +9,9 @@ pkgbase = tricks-bin
conflicts = tricks
options = !emptydirs
options = !strip
- source = https://tricks.aseman.io/tricks/static/downloads/Tricks-0.9.0_linux.tar.xz
+ source = https://tricks.aseman.io/tricks/static/downloads/Tricks-1.0.0_linux.AppImage
source = https://raw.githubusercontent.com/Aseman-Land/Tricks/main/LICENSE
- source = tricks.desktop
- sha256sums = 6b984e20c98bc2d6ef76af5b56134d450f806b8004ad27c70d3fcf3e074ba4e2
+ sha256sums = b40ac37ad95179f91a76d4ae65802504df34dfa3f0d64996ab3a6b2092b77162
sha256sums = 2ca9503d76d1ffab14f599b4741382eec11face60ad1f0d7a41897809003a286
- sha256sums = 8cb921da1169ae970e26f46007e2ff4471c3804302bc0089809c09aac35577eb
pkgname = tricks-bin
diff --git a/PKGBUILD b/PKGBUILD
index f4afa31e7432..dd3dbbd3d619 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Ali Molaei <ali dot molaei at protonmail dot com>
pkgname=tricks-bin
-pkgver=0.9.0
-pkgrel=2
+pkgver=1.0.0
+pkgrel=1
pkgdesc="The social network for programmers!"
arch=('x86_64')
url="https://tricks.aseman.io/"
@@ -10,20 +10,35 @@ license=('GPL3')
conflicts=('tricks')
provides=('tricks')
options=('!emptydirs' '!strip')
-source=("https://tricks.aseman.io/tricks/static/downloads/Tricks-${pkgver}_linux.tar.xz"
- "https://raw.githubusercontent.com/Aseman-Land/Tricks/main/LICENSE"
- "tricks.desktop")
-sha256sums=('6b984e20c98bc2d6ef76af5b56134d450f806b8004ad27c70d3fcf3e074ba4e2'
- '2ca9503d76d1ffab14f599b4741382eec11face60ad1f0d7a41897809003a286'
- '8cb921da1169ae970e26f46007e2ff4471c3804302bc0089809c09aac35577eb')
-
-prepare() {
- tar xf "Tricks-${pkgver}_linux.tar.xz"
-}
+source=("https://tricks.aseman.io/tricks/static/downloads/Tricks-${pkgver}_linux.AppImage"
+ "https://raw.githubusercontent.com/Aseman-Land/Tricks/main/LICENSE")
+sha256sums=('b40ac37ad95179f91a76d4ae65802504df34dfa3f0d64996ab3a6b2092b77162'
+ '2ca9503d76d1ffab14f599b4741382eec11face60ad1f0d7a41897809003a286')
+
+
+_filename="Tricks-${pkgver}_linux.AppImage"
+_squashfs_desktop_file="Tricks.desktop"
+_desktop_file="/usr/share/applications/tricks.desktop"
+_appimage_name=$(echo "${_filename}"|sed -E 's/-[0-9]*.[0-9]*.[0-9]*//')
+_install_path="/opt/tricks-bin/${_appimage_name}"
package() {
- install -D -m644 tricks.desktop -t "${pkgdir}"/usr/share/applications/
- install -D -m755 tricks-"${pkgver}"_linux/tricks.bin -T "${pkgdir}"/usr/bin/tricks
- install -D -m644 tricks-"${pkgver}"_linux/icon.png -T "${pkgdir}"/usr/share/icons/tricks.png
- install -D -m644 LICENSE -t "${pkgdir}"/usr/share/licenses/"${pkgname}"/
+ chmod +x "${_filename}"
+ mkdir -p squashfs-root/usr/share/icons/hicolor/{72x72,16x16}/apps
+ ./${_filename} --appimage-extract "tricks.png" > /dev/null 2>&1
+ ./${_filename} --appimage-extract ${_squashfs_desktop_file} > /dev/null 2>&1
+ echo "Exec=${_install_path} --no-check-desktop-installation" >> "squashfs-root/${_squashfs_desktop_file}"
+
+ install -dm755 "${pkgdir}/usr/share/icons"
+ cp -dpr --no-preserve=ownership "squashfs-root/tricks.png" "${pkgdir}/usr/share/icons/"
+ chmod -R 755 "${pkgdir}/usr/share/icons"
+ find "${pkgdir}/usr/share/icons" -type f -name "tricks.png" -exec chmod 644 {} \;
+
+ install -Dm644 "squashfs-root/${_squashfs_desktop_file}" "${pkgdir}/${_desktop_file}"
+ install -Dm755 "${_filename}" "${pkgdir}/${_install_path}"
+ mkdir "${pkgdir}/usr/bin/" && chmod 755 "${pkgdir}/usr/bin/"
+ ln -s "${_install_path}" "${pkgdir}/usr/bin/tricks"
+
+ install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/tricks-bin/LICENSE"
+
}
diff --git a/tricks.desktop b/tricks.desktop
deleted file mode 100644
index 66b7f6c971fc..000000000000
--- a/tricks.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.1
-Name=Tricks
-GenericName=The social network for programmers!
-Comment=Tricks is a social network for programmers!
-Icon=tricks
-Exec=tricks
-Terminal=false
-Categories=Social;Chat;Internet;Messaging
-
-