aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHao Zhang2023-04-08 20:06:08 -0400
committerHao Zhang2023-04-08 20:06:08 -0400
commit0fe69f6c48d1589ac5f8b94b98d446e91ce70798 (patch)
treeb6c6e7ebaabab8ef085e2029561637bb4e271a12
parent9c5627121e75c11be25338dab931519332b93d4c (diff)
downloadaur-fcitx-sogoupinyin.tar.gz
Updated to 4.2.1.145
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD38
2 files changed, 34 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0f0625355537..2fc5b502956f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = fcitx-sogoupinyin
pkgdesc = Sogou Pinyin for Linux
- pkgver = 4.0.1.2800
- pkgrel = 2
+ pkgver = 4.2.1.145
+ pkgrel = 1
url = https://shurufa.sogou.com/linux
arch = x86_64
license = custom
@@ -14,7 +14,6 @@ pkgbase = fcitx-sogoupinyin
depends = qt5-svg
depends = fcitx-qt5
depends = libxss
- source = https://ime.sogoucdn.com/dl/gzindex/1656597217/sogoupinyin_4.0.1.2800_x86_64.deb
- sha256sums = 5d851c647c8b02c7f0b1853c3e516bfd1bdd9c5628333c07e9851a617336deb7
+ depends = gsettings-qt
pkgname = fcitx-sogoupinyin
diff --git a/PKGBUILD b/PKGBUILD
index 99f04e2201fa..98e01270367f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,18 +5,39 @@
# Contributor: Felix Yan <felixonmars [AT] gmail.com>
pkgname=fcitx-sogoupinyin
-pkgver=4.0.1.2800
-_time=1656597217
-_basename=${pkgname:6}
-pkgrel=2
+pkgver=4.2.1.145
+filename=${pkgname:6}_${pkgver}_amd64.deb
+pkgrel=1
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" "libxss")
+depends=("fcitx" "opencc" "libidn11" "lsb-release" "xorg-xprop" "qt5-declarative"
+ "qt5-svg" "fcitx-qt5" "libxss" "gsettings-qt")
+sha256sum="3111af17a6abddd80b856aa9c1f579a137d69f3d735ead936ddb6e5f08b59f3b"
-source=("https://ime.sogoucdn.com/dl/gzindex/$_time/${pkgname:6}_${pkgver}_${arch[0]}.deb")
-sha256sums=("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
+}
package(){
cd $srcdir
@@ -28,4 +49,7 @@ package(){
find $pkgdir/opt/sogoupinyin/files/{.license,share} -type d -exec chmod 755 {} \;
find $pkgdir/opt/sogoupinyin/files/{.license,share} -type f -exec chmod 644 {} \;
+
+ rm -rf $pkgdir/opt/sogoupinyin/files/lib/qt5
+ rm $pkgdir/opt/sogoupinyin/files/bin/qt.conf
}