-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
681138e
commit 6a8debd
Showing
4 changed files
with
1,215 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: fcitx5-sogou | ||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+.[0-9]+' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Install rpm | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install rpm chrpath libarchive-tools | ||
- name: Build rpm | ||
run: | | ||
bash create_rpm.sh | ||
- name: Upload srpm and x86_64 to releases | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: release/*.rpm | ||
file_glob: true | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
URL="http://archive.build.openkylin.top" | ||
CPIS_VERSION="10.0.9.0.6" | ||
DATA_VERSION="10.0.1-48.1" | ||
|
||
wget ${URL}/openkylin/pool/pty/c/cpis/cpis-base_${CPIS_VERSION}-202311280935_amd64.deb | ||
wget ${URL}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-dict-keyboard-chs-pcpy_${DATA_VERSION}_all.deb | ||
wget ${URL}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-dict-keyboard-chs-pcwb_${DATA_VERSION}_all.deb | ||
wget ${URL}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-dict-keyboard-multilingual-pcen_${DATA_VERSION}_all.deb | ||
wget ${URL}/openkylin/pool/pty/s/sogou-ime-ng-data/sogou-ime-ng-cpis-user-default-profile_${DATA_VERSION}_all.deb | ||
wget ${URL}/openkylin/pool/pty/s/sogou-ime-ng/sogou-ime-ng-fcitx5-kylin-desktop_${CPIS_VERSION}-20231128000607_amd64.deb | ||
wget ${URL}/openkylin/pool/pty/s/sogou-ime-ng/sogou-ime-ng_${CPIS_VERSION}-20231128000607_amd64.deb | ||
|
||
OUT="fcitx5-sogou-${CPIS_VERSION}" | ||
mkdir -p $OUT | ||
|
||
for deb in $(ls *.deb); do | ||
dir=${deb/.deb/} | ||
mkdir -p $dir | ||
bsdtar -C $dir -xf $deb | ||
bsdtar -C $OUT -xf $dir/data.tar.* | ||
done | ||
|
||
chrpath -d $OUT/usr/lib/x86_64-linux-gnu/cpis-engine-plugin/sogou/libsogounlp.so | ||
chrpath -d $OUT/usr/lib/x86_64-linux-gnu/cpis-engine-plugin/sogou/libhandwriting_fc.so | ||
|
||
tar -cvf ${OUT}.tar.gz ${OUT} | ||
rm -rf ${OUT} | ||
|
||
ls -l | ||
|
||
mkdir -p ~/rpmbuild/SOURCES | ||
cp ${OUT}.tar.gz ~/rpmbuild/SOURCES | ||
cp file.txt ~/rpmbuild/SOURCES | ||
|
||
rpmbuild -ba fcitx5-sogou.spec | ||
mkdir -p release | ||
cp ~/rpmbuild/RPMS/x86_64/*.rpm release | ||
cp ~/rpmbuild/SRPMS/*.rpm release | ||
ls -l release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# | ||
# spec file for package fcitx5-sogou | ||
# | ||
# Copyright (c) 2025 SUSE LLC | ||
# | ||
# All modifications and additions to the file contributed by third parties | ||
# remain the property of their copyright owners, unless otherwise agreed | ||
# upon. The license for this file, and modifications and additions to the | ||
# file, is the same license as for the pristine package itself (unless the | ||
# license for the pristine package is not an Open Source License, in which | ||
# case the license is the MIT License). An "Open Source License" is a | ||
# license that conforms to the Open Source Definition (Version 1.9) | ||
# published by the Open Source Initiative. | ||
|
||
# Please submit bugfixes or comments via https://bugs.opensuse.org/ | ||
# | ||
|
||
|
||
Name: fcitx5-sogou | ||
Version: 10.0.9.0.6 | ||
Release: 0 | ||
Summary: Sogou Pinyin for Linux | ||
License: MIT | ||
URL: https://shufufa.sogou.com/linux | ||
Source: %{name}-%{version}.tar.gz | ||
Source1: file.txt | ||
|
||
%description | ||
Sogou Pinyin for Linux based on Fcitx5 and the new CPIS engine | ||
|
||
%prep | ||
%autosetup | ||
|
||
%build | ||
|
||
%install | ||
mkdir -p %{buildroot} | ||
mv etc %{buildroot} | ||
mv usr %{buildroot} | ||
mv var %{buildroot} | ||
|
||
rm -rf %{buildroot}%{_datadir}/doc | ||
|
||
mkdir -p %{buildroot}%{_libdir}/fcitx5 | ||
ln -sf %{_prefix}/lib/x86_64-linux-gnu/cpis-module-im-fcitx5.so \ | ||
%{buildroot}%{_libdir}/fcitx5/libcpis-module-im-sogou-ime-ng-fcitx5-kylin-desktop.so | ||
%find_lang fcitx5-sogou-ime-ng-fcitx5-kylin-desktop | ||
cat %{_sourcedir}/file.txt >> fcitx5-sogou-ime-ng-fcitx5-kylin-desktop.lang | ||
|
||
%files -f fcitx5-sogou-ime-ng-fcitx5-kylin-desktop.lang | ||
%dir %{_libdir}/fcitx5 | ||
%{_libdir}/fcitx5/libcpis-module-im-sogou-ime-ng-fcitx5-kylin-desktop.so | ||
|
||
%changelog | ||
|
Oops, something went wrong.