aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHao Zhang2022-12-15 11:52:59 -0500
committerHao Zhang2022-12-15 11:52:59 -0500
commit9c5627121e75c11be25338dab931519332b93d4c (patch)
treed869527ed0a59249e630af1b2e12fe09e7e61df5
parenta23214dc5fc747c6d414189ab9429a365ee78332 (diff)
downloadaur-9c5627121e75c11be25338dab931519332b93d4c.tar.gz
Changed source URL and added libxss dependency
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD38
-rwxr-xr-xsogou-autostart15
3 files changed, 13 insertions, 47 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 86df1634fb7b..0f0625355537 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = fcitx-sogoupinyin
pkgdesc = Sogou Pinyin for Linux
pkgver = 4.0.1.2800
- pkgrel = 1
+ pkgrel = 2
url = https://shurufa.sogou.com/linux
arch = x86_64
license = custom
@@ -13,7 +13,8 @@ pkgbase = fcitx-sogoupinyin
depends = qt5-declarative
depends = qt5-svg
depends = fcitx-qt5
- source = sogou-autostart
- sha256sums = 4357c28ba35d9441e47cc5c9a4c5f1ccbb8957cb3434212a609201aee485c092
+ depends = libxss
+ source = https://ime.sogoucdn.com/dl/gzindex/1656597217/sogoupinyin_4.0.1.2800_x86_64.deb
+ sha256sums = 5d851c647c8b02c7f0b1853c3e516bfd1bdd9c5628333c07e9851a617336deb7
pkgname = fcitx-sogoupinyin
diff --git a/PKGBUILD b/PKGBUILD
index f68a73de94fe..99f04e2201fa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,40 +6,17 @@
pkgname=fcitx-sogoupinyin
pkgver=4.0.1.2800
-pkgrel=1
-filename=sogoupinyin_${pkgver}_x86_64.deb
+_time=1656597217
+_basename=${pkgname:6}
+pkgrel=2
pkgdesc="Sogou Pinyin for Linux"
arch=("x86_64")
url="https://shurufa.sogou.com/linux"
license=("custom")
-depends=("fcitx" "opencc" "libidn11" "lsb-release" "xorg-xprop" "qt5-declarative" "qt5-svg" "fcitx-qt5")
+depends=("fcitx" "opencc" "libidn11" "lsb-release" "xorg-xprop" "qt5-declarative" "qt5-svg" "fcitx-qt5" "libxss")
-source=("sogou-autostart")
-sha256sums=("4357c28ba35d9441e47cc5c9a4c5f1ccbb8957cb3434212a609201aee485c092")
-sha256sum="5d851c647c8b02c7f0b1853c3e516bfd1bdd9c5628333c07e9851a617336deb7"
-
-prepare(){
- msg "Retrieving sources..."
- if [[ -f $startdir/$filename ]]; then
- msg2 "$(gettext "Found %s")" "$filename"
- else
- msg2 "$(gettext "Downloading %s...")" "$filename"
- curl -s $url | grep -o "https://[0-9a-z:\/\._]*/$filename" | xargs curl -o $startdir/$filename
- fi
- ln -s $startdir/$filename
- msg "Validating source files with sha256sums..."
- printf ' %s ... ' "$filename" >&2
- if [[ $sha256sum = $(sha256sum $filename | cut -d' ' -f1) ]]; then
- printf '%s\n' "$(gettext "Passed")" >&2
- else
- printf '%s\n' "$(gettext "FAILED")" >&2
- error "$(gettext "One or more files did not pass the validity check!")"
- exit 1
- fi
- msg "Extracting sources..."
- msg2 "Extracting $filename with bsdtar"
- bsdtar -xf $filename
-}
+source=("https://ime.sogoucdn.com/dl/gzindex/$_time/${pkgname:6}_${pkgver}_${arch[0]}.deb")
+sha256sums=("5d851c647c8b02c7f0b1853c3e516bfd1bdd9c5628333c07e9851a617336deb7")
package(){
cd $srcdir
@@ -48,4 +25,7 @@ package(){
mv "$pkgdir"/usr/lib/*-linux-gnu/fcitx "$pkgdir"/usr/lib/
rmdir "$pkgdir"/usr/lib/*-linux-gnu
+
+ find $pkgdir/opt/sogoupinyin/files/{.license,share} -type d -exec chmod 755 {} \;
+ find $pkgdir/opt/sogoupinyin/files/{.license,share} -type f -exec chmod 644 {} \;
}
diff --git a/sogou-autostart b/sogou-autostart
deleted file mode 100755
index a658f8d8d14f..000000000000
--- a/sogou-autostart
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# Wait for fcitx to startup
-for i in $(seq 30); do
- if fcitx-remote &> /dev/null; then
- sogou-qimpanel $@
- echo 'sogou-qimpanel started'
- exit
- else
- sleep 1
- fi
-done
-
-echo 'sogou-qimpanel failed to start: fcitx not running'
-exit 1