aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 95240e46175f0c6274afaebe6a9f301d21dc47f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pkgname=fcitx5-sogou
pkgver=10.0.9.0.6
pkgrel=1
pkgdesc="Sogou Pinyin for Linux"
arch=("x86_64")
url="https://shurufa.sogou.com/linux"
license=("custom")
makedepends=("chrpath")
depends=(
    "fcitx5" "hicolor-icon-theme"
    "glibc" "gcc-libs" "qt5-base" "openal" "libx11" "libxtst"
    "systemd-libs" "gtk3" "gdk-pixbuf2" "glib2" "dbus" "cairo" "curl"
)
optdepends=("kcm-fcitx5")
# mirrors="http://archive.build.openkylin.top"
mirrors="https://mirrors.aliyun.com"
source=(
    "${mirrors}/openkylin/pool/pty/c/cpis/cpis-base_10.0.9.0.6-202311280935_amd64.deb"

    "${mirrors}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-dict-keyboard-chs-pcpy_10.0.1-48_all.deb"
    "${mirrors}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-dict-keyboard-chs-pcwb_10.0.1-48_all.deb"
    "${mirrors}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-dict-keyboard-multilingual-pcen_10.0.1-48_all.deb"
    "${mirrors}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-user-default-profile_10.0.1-48_all.deb"

    "${mirrors}/openkylin/pool/pty/s/sogou-ime-ng/sogou-ime-ng-fcitx5-kylin-desktop_10.0.9.0.6-20231128000607_amd64.deb"
    "${mirrors}/openkylin/pool/pty/s/sogou-ime-ng/sogou-ime-ng_10.0.9.0.6-20231128000607_amd64.deb"
)
noextract=("${source[@]##*/}")
sha256sums=(
    '615482541d573bd5b07d119f9b5f93d741a7c5a4d89fc6cc3bd93c1b76205af5'

    '5ed618852c4ff691d1a13bc1c36d3e94a931019c93d32b321d6b150ec3d31140'
    '39e3e00ad43071122b3ef31da3b5864f1f620ddadfe056050bc75be51cea026b'
    'a63571863249ce86a3ec510c07ea55a00459bc782cedfb9d6a99d9c205116ddc'
    'b6d98c6ec9eebcd7c579c9e845d7de04bb7ea682adc738da67e186a4cc99233a'

    '99fd9f7b512cc367b44f13029b282fcb2387ddb1e26f7caa1ffa1cfe5f0b5532'
    '9fd28578f1980ed715bcda5e7e0ae80239638e3af82f57c3d156f8d5946e6c82'
)
# sha256sums=(
#     'SKIP'

#     'SKIP'
#     'SKIP'
#     'SKIP'
#     'SKIP'
    
#     'SKIP'
#     'SKIP'
# )

prepare() {
    for deb in "${noextract[@]}"; do
        dir=${deb/.deb/}
        mkdir -p $dir
        bsdtar -C $dir -xf $deb
    done
}

package() {
    for deb in "${noextract[@]}"; do
        dir=${deb/.deb/}
        bsdtar -C $pkgdir -xf $dir/data.tar.*
    done

    chrpath -d $pkgdir/usr/lib/x86_64-linux-gnu/cpis-engine-plugin/sogou/libsogounlp.so
    chrpath -d $pkgdir/usr/lib/x86_64-linux-gnu/cpis-engine-plugin/sogou/libhandwriting_fc.so

    mkdir $pkgdir/usr/lib/fcitx5
    ln -s /usr/lib/x86_64-linux-gnu/cpis-module-im-fcitx5.so $pkgdir/usr/lib/fcitx5/libcpis-module-im-sogou-ime-ng-fcitx5-kylin-desktop.so
}