summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD82
1 files changed, 46 insertions, 36 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3e58a8b5cb49..f31bab5b7b2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,53 @@
-# Maintainer: Shane Lyx <shanelyx at outlook dot com>
pkgname=another-redis-desktop-manager
-pkgver=1.2.4
+pkgver=1.6.0
pkgrel=1
-pkgdesc="Another Redis Desktop Manager"
-arch=("x86_64")
+pkgdesc="A faster, better and more stable redis desktop manager, compatible with Linux, windows, mac. What's more, it won't crash when loading massive keys." # 包描述
+arch=('any')
url="https://github.com/qishibo/AnotherRedisDesktopManager"
-license=('MIT')
-depends=('libappindicator-sharp' 'libappindicator-gtk3' 'libappindicator-gtk2' 'gconf' 'libindicator-gtk3' 'libindicator-gtk2'
- 'libnotify' 'libxss' 'libxtst')
-
-source=(
- "https://github.com/qishibo/AnotherRedisDesktopManager/releases/download/v1.2.4/Another.Redis.Desktop.Manager.1.2.4.AppImage"
- "another-redis-desktop-manager.desktop"
- "another-redis-desktop-manager.png"
- "LICENSE"
-)
-
-md5sums=('9818915d396b59af1037b17fd1c3460f'
- '11ac6e7e9d578a9ad0b548c3fc9a2527'
- '3f7c15e66be6ffd8b70fbb50882fc0dd'
- '74fd786ee05276f7550f94e8ed1bf495')
-
-package(){
- cd ${srcdir}
- 7z x Another.Redis.Desktop.Manager.1.2.4.AppImage -o"${pkgdir}/opt/Another.Redis.Desktop.Manager"
- chmod -R 755 "${pkgdir}/opt"
-
- # desktop
- mkdir -p ${pkgdir}/usr/share/applications
- install -Dm644 another-redis-desktop-manager.desktop ${pkgdir}/usr/share/applications/
-
- # icon
- mkdir -p ${pkgdir}/usr/share/icons/hicolor/512x512/apps
- install -Dm644 another-redis-desktop-manager.png ${pkgdir}/usr/share/icons/hicolor/512x512/apps/
-
- #license
- mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/
+license=('MIT')
+provides=('another-redis-desktop-manager' 'another-redis-desktop-manager.Appimage')
+conflicts=('another-redis-desktop-manager' 'another-redis-desktop-manager-Appimage')
+image="${pkgname}.AppImage"
+source=("${image}::${url}/releases/download/v${pkgver}/Another-Redis-Desktop-Manager.${pkgver}.AppImage") #源码
+md5sums=('c3c88c5c9fffae3af497ef657c425bb6')
+options=(!strip)
+
+
+prepare() {
+ chmod +x "${image}"
+ ./"${image}" --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/${pkgname}.desktop"
+
+ # Fix permissions; .AppImage permissions are 700 for all directories
+ chmod -R a-x+rX squashfs-root/usr
}
+package() {
+ # AppImage
+ install -Dm755 "${srcdir}/${image}" "${pkgdir}/opt/${pkgname}/${image}"
+ install -Dm644 "${srcdir}/squashfs-root/LICENSE.electron.txt" "${pkgdir}/opt/${pkgname}/LICENSE"
+ # Desktop file
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname}.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/${pkgname}.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}"
+}