Compare commits

...
Sign in to create a new pull request.

65 commits

Author SHA1 Message Date
Fedora Release Engineering
677c59968f Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 07:10:51 +00:00
Fedora Release Engineering
1724e1ca0f Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 18:40:28 +00:00
Fedora Release Engineering
9460dd8aa1 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 18:53:51 +00:00
Miroslav Suchý
899088a632 Migrate subpackage to SPDX license
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2025-01-20 10:03:33 +00:00
Fedora Release Engineering
47212ef6e8 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 11:58:05 +00:00
Fedora Release Engineering
7ef6c6baa5 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 06:43:32 +00:00
Fedora Release Engineering
403f415e12 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 04:44:16 +00:00
Fedora Release Engineering
99f030cc79 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 02:50:25 +00:00
Peng Wu
2cf9338661 Migrate to SPDX license 2023-04-28 14:28:34 +08:00
Fedora Release Engineering
1aa8c3fe30 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 04:20:13 +00:00
Fedora Release Engineering
a72b05caea Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 09:43:55 +00:00
Fedora Release Engineering
05cc83269b - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 01:57:10 +00:00
Fedora Release Engineering
7817fe2fcf - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 18:33:49 +00:00
Fedora Release Engineering
7e7460b41a - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 21:18:59 +00:00
Tom Stellard
50405e2bb5 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 22:05:06 +00:00
Fedora Release Engineering
deccb8ed46 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 09:22:54 +00:00
Fedora Release Engineering
32f0f3c0f2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 11:46:41 +00:00
Fedora Release Engineering
db3443f12b - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 00:41:47 +00:00
Peng Wu
6956e3bdb3 fixes typo 2019-08-05 15:15:13 +08:00
Peng Wu
a5c0016cfc Update scons and use python3 2019-08-05 15:00:50 +08:00
Fedora Release Engineering
6d7ff26604 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 00:34:37 +00:00
Fedora Release Engineering
7c7abaf4f6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 08:58:59 +00:00
50ebb916d9 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:51 +01:00
d0c8a327b2
Remove obsolete ldconfig scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-22 18:41:05 +01:00
Peng Wu
07f7d3ad5c Use python2 2018-07-26 15:26:38 +08:00
Fedora Release Engineering
0dfd99ecb1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 06:59:42 +00:00
Iryna Shcherbina
32c8ab6840 Update Python 2 dependency declarations to new packaging standards 2018-03-18 21:42:27 +01:00
Peng Wu
d5cc25475f disable debug package 2018-03-05 18:01:21 +08:00
Peng Wu
7d3aa70e7a Add BuildRequires gcc-c++ 2018-03-05 16:20:06 +08:00
Fedora Release Engineering
805c4b3d70 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 18:04:29 +00:00
Fedora Release Engineering
262b794b4b - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 08:58:20 +00:00
Fedora Release Engineering
1a61d7f688 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 19:38:03 +00:00
Fedora Release Engineering
e5080dd753 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 14:13:52 +00:00
Peng Wu
5db4a64a20 remove old patches 2016-03-01 11:15:54 +08:00
Peng Wu
a25381ff38 Update to the latest upstream git snapshot 2016-03-01 11:15:42 +08:00
Fedora Release Engineering
d19717631c - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 00:58:18 +00:00
Michael Schwendt
38209071d9 - Rawhide only: Fix pod2man invocation for perl-podlators >= 4.
- Export global compiler flags before building.
- Minor spec cleanup: remove %defattr usage and %clean section,
  use %license, add %_isa to -devel base package dependency,
  don't mix %buildroot and $RPM_BUILD_ROOT
- Insert gitdate into release to follow snapshot guidelines.
- Fix duplicated doc files (#1001266).

- fix bogus date in %changelog
- clean up old tarballs from "sources" file
2015-12-29 21:03:17 +01:00
Dennis Gilmore
e55022ae63 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 02:07:07 +00:00
Kalev Lember
d998789bec Rebuilt for GCC 5 C++11 ABI change 2015-05-02 18:03:10 +02:00
0d05414d68 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-18 04:12:28 +00:00
Peter Robinson
2e86fb7519 Handle AArch64 as well 2014-06-16 13:13:39 +01:00
Dennis Gilmore
771cec8d53 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-08 02:40:48 -05:00
Dennis Gilmore
051e3cd85e - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-04 11:09:57 -05:00
Liang Suilong
754c8ea0ee Upstream to sunpinyin latest git snapshot 2013-07-10 00:29:20 +08:00
Liang Suilong
d10ea857be fix BRs, need perl(Pod::Man) 2013-02-24 11:07:46 +08:00
Liang Suilong
286577f4f7 add BR: perl 2013-02-24 10:47:29 +08:00
Liang Suilong
7a6cd696ab Drop ibus-sunpinyin
Drop xsunpinyin
Update sunpinyin data file
Architecture-dependent data file
2013-02-24 04:16:53 +08:00
Liang Suilong
6bb90fa48b Upload new git snapshot 2013-02-24 01:43:12 +08:00
Liang Suilong
4274b0e314 Upload new source tarball 2013-02-23 19:43:57 +08:00
Liang Suilong
71691275da Merge branch 'master' of ssh://pkgs.fedoraproject.org/sunpinyin 2013-02-23 19:39:40 +08:00
Liang Suilong
2c4175382f remove built-in wrapper 2013-02-23 19:39:22 +08:00
Dennis Gilmore
caca29ea8b - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 18:56:53 -06:00
Fedora
7ecdc3b279 Fix the spec file for building fcitx-sunpinyin 2012-07-29 17:57:59 +08:00
Fedora
9c61cea38b Fix spec error 2012-07-29 04:56:14 +08:00
Fedora
f95fe7d2b0 Fix the spec 2012-07-26 00:14:46 +08:00
Fedora
15cf86c515 Merge branch 'master' of ssh://pkgs.fedoraproject.org/sunpinyin
Conflicts:
	sunpinyin.spec
2012-07-26 00:14:03 +08:00
Fedora
4189e81bf7 Upstream to the latest git snapshot 2012-07-26 00:11:44 +08:00
Dennis Gilmore
c14a5493eb - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-21 17:02:20 -05:00
Fedora
e5f6227651 Fix source tarball 2012-06-03 22:14:14 +08:00
Fedora
dca43c7ac3 Upstream to the latest git snapshot 2012-06-03 21:59:12 +08:00
Fedora
fc0e3df2d6 Upstream to the latest git snapshot of sunpinyin 2012-05-13 17:04:23 +08:00
Peng Wu
c865998d08 fixes compile 2012-03-06 15:27:33 +08:00
Peng Wu
df169a05ed rebuilt for ibus 2012-03-06 14:21:11 +08:00
Dennis Gilmore
515a44537b - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-13 23:57:30 -06:00
Adam Jackson
4787ce7636 Rebuild for new libpng 2011-12-06 01:11:44 -05:00
6 changed files with 446 additions and 148 deletions

12
.gitignore vendored
View file

@ -2,3 +2,15 @@
/sunpinyin-all-in-one-2.0.3.tar.gz
/lm_sc.t3g.arpa.tar.bz2
/dict.utf8.tar.bz2
/sunpinyin-20120513.tar.xz
/sunpinyin-20120603.tar.xz
/sunpinyin-20120726.tar.xz
/sunpinyin-20130223.tar.xz
/sunpinyin-20130224.tar.xz
/lm_sc.t3g.arpa-20121025.tar.bz2
/dict.utf8-20130220.tar.bz2
/sunpinyin-20130710.tar.xz
/dict.utf8-20131214.tar.bz2
/lm_sc.3gm.arpa-20140820.tar.bz2
/sunpinyin-20160301.tar.xz
/sunpinyin-20190805.tar.xz

23
make-git-snapshot.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/sh
# Usage: ./make-git-snapshot.sh [COMMIT]
#
# to make a snapshot of the given tag/branch. Defaults to HEAD.
# Point env var REF to a local mesa repo to reduce clone time.
DIRNAME=sunpinyin-$( date +%Y%m%d )
echo REF ${REF:+--reference $REF}
echo DIRNAME $DIRNAME
echo HEAD ${1:-HEAD}
rm -rf $DIRNAME
git clone ${REF:+--reference $REF} \
git://github.com/sunpinyin/sunpinyin.git $DIRNAME
rm -rf $DIRNAME/wrapper
tar cf $DIRNAME.tar.xz $DIRNAME
# rm -rf $DIRNAME

View file

@ -1,3 +1,3 @@
ffd79b94e88fc160bec7056d8e68d1c2 sunpinyin-all-in-one-2.0.3.tar.gz
d75be3b5472cb06ad634261aa4aa22b5 lm_sc.t3g.arpa.tar.bz2
7b996004c761f8a190a34df25d64668b dict.utf8.tar.bz2
SHA512 (sunpinyin-20190805.tar.xz) = 96105d35d6ba6dee48b46a9ea390809e80cb167983772606099f7bbb37a9cbc7aec1de503c655ab00f8618aebfc7cc8d71e915598de97c98e425eb42c73c60b5
SHA512 (dict.utf8-20131214.tar.bz2) = adaf52a27c6afdeb950912845f3fcb7a6799f997d50a2892ceecf76ed13e3644407338d734832c2ce4b09bce11fec4731774f1eb2dd4c30bea5490555915bd5b
SHA512 (lm_sc.3gm.arpa-20140820.tar.bz2) = ea3ede62eb993c4d21ca7cf339635f4686493a0cefd57df4a31f00a001e67502a13ff9612ff667b941b82b47de00be9f3c9689677d04195a7ef8716bac087519

View file

@ -0,0 +1,34 @@
Index: sunpinyin-20190805/SConstruct
===================================================================
--- sunpinyin-20190805.orig/SConstruct
+++ sunpinyin-20190805/SConstruct
@@ -2,6 +2,7 @@ import platform
import os
import sys
+from functools import reduce
version = "2.0.4"
abi_major = 3
@@ -227,7 +228,7 @@ def CreateEnvironment():
def PassVariables(envvar, env):
for (x, y) in envvar:
if x in os.environ:
- print 'Warning: you\'ve set %s in the environmental variable!' % x
+ print ('Warning: you\'ve set %s in the environmental variable!' % x)
env[y] = os.environ[x]
env = CreateEnvironment()
Index: sunpinyin-20190805/src/SConscript
===================================================================
--- sunpinyin-20190805.orig/src/SConscript
+++ sunpinyin-20190805/src/SConscript
@@ -53,7 +53,7 @@ env.Substfile('sunpinyin-dictgen.mk.in',
})
env.Command('sunpinyin-dictgen', 'sunpinyin-dictgen.mk', [
Copy("$TARGET", "$SOURCE"),
- Chmod("$TARGET", 0755),
+ Chmod("$TARGET", "0755"),
])
# -*- indent-tabs-mode: nil -*- vim:et:ts=4

171
sunpinyin-use-python3.patch Normal file
View file

@ -0,0 +1,171 @@
commit d0693ba9f2686ffa46328da129ffef345258fa12
Author: Peng Wu <alexepico@gmail.com>
Date: Thu Jul 26 15:08:41 2018 +0800
Use python3
Index: sunpinyin-20190805/SConstruct
===================================================================
--- sunpinyin-20190805.orig/SConstruct
+++ sunpinyin-20190805/SConstruct
@@ -299,11 +299,11 @@ def CheckPKG(context, name):
def CheckPython(context):
context.Message('Checking for Python library...')
- ret = context.TryAction('python-config --prefix')[0]
+ ret = context.TryAction('python3-config --prefix')[0]
context.Result(ret)
if ret:
- context.env.MergeFlags(['!python-config --includes',
- '!python-config --libs'])
+ context.env.MergeFlags(['!python3-config --includes',
+ '!python3-config --libs'])
return ret
Index: sunpinyin-20190805/python/pinyin_info_gen.py
===================================================================
--- sunpinyin-20190805.orig/python/pinyin_info_gen.py
+++ sunpinyin-20190805/python/pinyin_info_gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
@@ -38,60 +38,60 @@
from pinyin_data import *
def fmt_str_array (name, var) :
- print 'static const char *%s[] = { %s };' % (name, ', '.join ('"%s"' % s for s in var))
+ print('static const char *%s[] = { %s };' % (name, ', '.join ('"%s"' % s for s in var)))
def fmt_array_size (name):
- print 'static const unsigned num_%s = sizeof(%s) / sizeof(*%s);' % (name, name, name)
+ print('static const unsigned num_%s = sizeof(%s) / sizeof(*%s);' % (name, name, name))
def fmt_str_pair_array (name, var) :
- print 'static const char *%s[] = {' % name
+ print('static const char *%s[] = {' % name)
for s1, s2 in var:
- print ' %-7s %s' % ('"%s",' % s1, '"%s",' % s2)
- print '};'
+ print(' %-7s %s' % ('"%s",' % s1, '"%s",' % s2))
+ print('};')
def fmt_pair_array_size (name):
- print 'static const unsigned num_%s = sizeof(%s) / sizeof(*%s) / 2;' % (name, name, name)
+ print('static const unsigned num_%s = sizeof(%s) / sizeof(*%s) / 2;' % (name, name, name))
fmt_str_array ('initials', initials)
fmt_array_size ('initials')
-print ''
+print('')
fmt_str_array('finals', finals)
fmt_array_size ('finals')
-print ''
+print('')
fmt_str_array('fuzzy_finals', inner_fuzzy_finals)
fmt_array_size ('fuzzy_finals')
-print ''
+print('')
fmt_str_pair_array ('fuzzy_pairs', fuzzy_pairs)
fmt_pair_array_size ('fuzzy_pairs')
-print ''
+print('')
fmt_str_pair_array ('auto_correction_pairs', sorted(auto_correction_pairs.items()))
fmt_pair_array_size ('auto_correction_pairs')
-print ''
+print('')
-print 'static const unsigned fuzzy_finals_map [] = {'
+print('static const unsigned fuzzy_finals_map [] = {')
for s in inner_fuzzy_finals:
- print ' %-7s %-7s %-7s /* %-4s -> %-4s len %d */' % ('0x%02x,' % finals.index(s), '0x%02x,' % valid_syllables[s[1:]], '%d,' % (len(s)-1,), s, s[1:], len(s)-1)
-print '};\n'
+ print(' %-7s %-7s %-7s /* %-4s -> %-4s len %d */' % ('0x%02x,' % finals.index(s), '0x%02x,' % valid_syllables[s[1:]], '%d,' % (len(s)-1,), s, s[1:], len(s)-1))
+print('};\n')
-print 'static const TPyTabEntry pinyin_table[] = {'
+print('static const TPyTabEntry pinyin_table[] = {')
for syllable, hex_syllable in sorted(valid_syllables.items()):
- print ' { %-9s %s },' % ('"%s",' % syllable, '0x%05x' % hex_syllable)
-print '};\n'
+ print(' { %-9s %s },' % ('"%s",' % syllable, '0x%05x' % hex_syllable))
+print('};\n')
-print 'static const unsigned fuzzy_pre_syllables [] = {'
+print('static const unsigned fuzzy_pre_syllables [] = {')
for s in fuzzy_pre_syllables:
- print ' %-11s %-7s %-11s /* %s */' % ('0x%05x,' % valid_syllables[s[:-1]], "'%s'," % s[-1], '0x%05x,' % valid_syllables[s], s)
-print ' 0x0,'
-print '};\n'
+ print(' %-11s %-7s %-11s /* %s */' % ('0x%05x,' % valid_syllables[s[:-1]], "'%s'," % s[-1], '0x%05x,' % valid_syllables[s], s))
+print(' 0x0,')
+print('};\n')
-print 'static const unsigned fuzzy_pro_syllables [] = {'
+print('static const unsigned fuzzy_pro_syllables [] = {')
for s in fuzzy_pro_syllables:
- print ' %-11s %-7s %-11s /* %s */' % ('0x%05x,' % valid_syllables[s], "'%s'," % s[0], '0x%05x,' % valid_syllables[s[1:]], s)
-print ' 0x0,'
-print '};\n'
+ print(' %-11s %-7s %-11s /* %s */' % ('0x%05x,' % valid_syllables[s], "'%s'," % s[0], '0x%05x,' % valid_syllables[s[1:]], s))
+print(' 0x0,')
+print('};\n')
# -*- indent-tabs-mode: nil -*- vim:et:ts=4
Index: sunpinyin-20190805/python/quanpin_trie_gen.py
===================================================================
--- sunpinyin-20190805.orig/python/quanpin_trie_gen.py
+++ sunpinyin-20190805/python/quanpin_trie_gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
@@ -42,7 +42,7 @@ import sys
orig_trie = trie.Trie ()
pytrie = trie.DATrie ()
-for syllable, hex_syllable in pinyin_data.valid_syllables.items():
+for syllable, hex_syllable in list(pinyin_data.valid_syllables.items()):
orig_trie.add(syllable[::-1], hex_syllable)
pytrie.construct_from_trie (orig_trie)
Index: sunpinyin-20190805/python/trie.py
===================================================================
--- sunpinyin-20190805.orig/python/trie.py
+++ sunpinyin-20190805/python/trie.py
@@ -133,7 +133,7 @@ class DATrie (object):
trie = Trie()
for w in words:
- trie.add (w, itval.next() if itval else -1)
+ trie.add (w, next(itval) if itval else -1)
self.construct_from_trie (trie, values!=None)
@@ -161,7 +161,7 @@ class DATrie (object):
if progress_cb:
progress_cb ()
- for i in xrange (self.chr_encoder (max(trie.root.trans))+1):
+ for i in range (self.chr_encoder (max(trie.root.trans))+1):
if self.check[i] == -1:
self.check[i] = 0
@@ -272,7 +272,7 @@ def test ():
v, l = match_longest (datrie, s+'b')
assert (len(s) == l and valid_syllables[s] == v)
- print 'test executed successfully'
+ print('test executed successfully')
if __name__ == "__main__":
test ()

View file

@ -1,26 +1,27 @@
# TODO: fixes scons to generate debug information
%global debug_package %{nil}
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/xsunpinyin.conf
%define gitdate 20190805
Name: sunpinyin
Version: 2.0.3
Release: 1%{?dist}
Version: 3.0.0
Release: 0.17.%{gitdate}git%{?dist}
Summary: A statistical language model based Chinese input method engine
Group: System Environment/Libraries
License: LGPLv2 or CDDL
License: LGPL-2.1-only OR CDDL-1.0
URL: http://code.google.com/p/sunpinyin/
Source0: http://sunpinyin.googlecode.com/files/%{name}-all-in-one-%{version}.tar.gz
Source1: xinput-x%{name}
Source2: http://open-gram.googlecode.com/files/lm_sc.t3g.arpa.tar.bz2
Source3: http://open-gram.googlecode.com/files/dict.utf8.tar.bz2
Source0: %{name}-%{gitdate}.tar.xz
Source2: http://downloads.sourceforge.net/project/open-gram/lm_sc.3gm.arpa-20140820.tar.bz2
Source3: http://downloads.sourceforge.net/project/open-gram/dict.utf8-20131214.tar.bz2
Patch0: sunpinyin-use-python3.patch
Patch1: sunpinyin-fixes-scons.patch
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: sqlite-devel
BuildRequires: gtk2-devel
BuildRequires: ibus-devel
BuildRequires: gettext
BuildRequires: scons
%ifarch %{ix86} x86_64 armv5tel mips64el
Requires: %{name}-data-le
%else
Requires: %{name}-data-be
%endif
BuildRequires: python3-scons
BuildRequires: perl(Pod::Man)
BuildRequires: python3-devel
%description
Sunpinyin is an input method engine for Simplified Chinese. It is an SLM based
@ -31,169 +32,226 @@ systems. The 2.0 release currently supports iBus, XIM, and Mac OS X.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files that allows user
to write their own front-end for sunpinyin.
%package data-le
%package data
Summary: Little-endian data files for %{name}
Group: System Environment/Libraries
License: CC-BY-SA
Conflicts: %{name}-data-be
BuildArch: noarch
License: CC-BY-SA-3.0
Obsoletes: %{name}-data-le
Obsoletes: %{name}-data-be
%description data-le
%description data
The %{name}-data package contains necessary lexicon data and its index data
files needed by the sunpinyin input methods on little endian architectures.
%package data-be
Summary: Big-endian data files for %{name}
Group: System Environment/Libraries
License: CC-BY-SA
Conflicts: %{name}-data-le
BuildArch: noarch
%description data-be
The %{name}-data package contains necessary lexicon data and its index data
files needed by the sunpinyin input methods on big endian architectures.
%package -n ibus-%{name}
Summary: Sunpinyin input method engine for ibus
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: ibus
%description -n ibus-%{name}
This package provides SunPinyin input method for IBus framework.
%package -n x%{name}
Summary: Standalone XIM server for Sunpinyin
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: im-chooser
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
%description -n x%{name}
This package provides a XIM server with SunPinyin input method. It works much
the same way as fcitx does.
files needed by the sunpinyin input methods.
%prep
%setup -q -n %{name}-%{version}
%autosetup -p1 -n %{name}-%{gitdate}
# Hack to honor correct compiler flags
sed -i 's/-O2 -pipe/%{optflags}/' SConstruct
sed -i 's/-O2 -pipe/%{optflags}/' wrapper/{ibus,xim}/SConstruct
# Fix libexecdir path for ibus-sunpinyin
sed -i 's\lib/ibus-sunpinyin\libexec\' wrapper/ibus/SConstruct
cp %SOURCE2 %{_builddir}/%{name}-%{version}/raw
cp %SOURCE3 %{_builddir}/%{name}-%{version}/raw
%build
scons %{?_smp_mflags} --prefix=%{_prefix}
# We need to do this so wrappers can link against libsunpinyin
sed -i 's\libdir=.*$\libdir=%{_builddir}/%{name}-%{version}\' sunpinyin-*.pc
sed -i 's\includedir=.*$\includedir=%{_builddir}/%{name}-%{version}/src\' sunpinyin-*.pc
cp -p sunpinyin-2.0.pc sunpinyin-2.0.pc.bak
ln -s libsunpinyin*.so libsunpinyin.so
export PKG_CONFIG_PATH=%{_builddir}/%{name}-%{version}
pushd wrapper/ibus
scons %{?_smp_mflags} --prefix=%{_prefix}
mkdir -p raw
cp %SOURCE2 raw
cp %SOURCE3 raw
pushd raw
tar xvf lm_sc.3gm.arpa-20140820.tar.bz2
tar xvf dict.utf8-20131214.tar.bz2
popd
pushd wrapper/xim
scons %{?_smp_mflags} --prefix=%{_prefix}
%build
# export CFLAGS, CXXFLAGS, LDFLAGS, ...
%configure || :
scons %{?_smp_mflags} --prefix=%{_prefix} --libdir=%{_libdir} --datadir=%{_datadir}
export PATH=`pwd`/src:$PATH
pushd raw
ln -sf ../doc/SLM-inst.mk Makefile
make %{?_smp_mflags} VERBOSE=1
popd
%install
scons %{?_smp_mflags} --prefix=%{_prefix} install --install-sandbox=%{buildroot}
%if %{_lib}==lib64
mkdir -p %{buildroot}%{_libdir}
mv %{buildroot}%{_prefix}/lib/*.so* %{buildroot}%{_libdir}
mv %{buildroot}%{_prefix}/lib/pkgconfig %{buildroot}%{_libdir}/pkgconfig
sed -i 's\{exec_prefix}/lib\{exec_prefix}/%{_lib}\' \
%{buildroot}%{_libdir}/pkgconfig/sunpinyin-2.0.pc
%endif
# Put them back so the install doesn't fail
cp -p sunpinyin-2.0.pc.bak sunpinyin-2.0.pc
export PKG_CONFIG_PATH=%{_builddir}/%{name}-%{version}
pushd wrapper/ibus
scons %{?_smp_mflags} --prefix=%{_prefix} install --install-sandbox=%{buildroot}
scons %{?_smp_mflags} --prefix=%{_prefix} --libdir=%{_libdir} --datadir=%{_datadir} install --install-sandbox=%{buildroot}
pushd raw
make install DESTDIR=%{buildroot} INSTALL="install -p"
popd
pushd wrapper/xim
scons %{?_smp_mflags} --prefix=%{_prefix} install --install-sandbox=%{buildroot}
popd
# additional %%doc files to include by path to avoid duplicates/conflicts
# see https://bugzilla.redhat.com/1001266
install -m0644 AUTHORS TODO %{buildroot}%{_docdir}/%{name}
# install xinput config file
install -pm 644 -D %{SOURCE1} %{buildroot}%{_xinputconf}
%find_lang ibus-%{name}
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n x%{name}
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc \
%{_xinputconf} 50 || :
%postun -n x%{name}
if [ "$1" = "0" ]; then
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
# if alternative was set to manual, reset to auto
[ -L %{_sysconfdir}/alternatives/xinputrc -a \
"`readlink %{_sysconfdir}/alternatives/xinputrc`" = \
"%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING *.LICENSE
%doc README TODO
%license COPYING *.LICENSE
%{_libdir}/libsunpinyin*.so.*
%{_docdir}/%{name}/README
%{_docdir}/%{name}/AUTHORS
%{_docdir}/%{name}/TODO
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsunpinyin*.so
%{_libdir}/pkgconfig/sunpinyin*.pc
%{_includedir}/sunpinyin*
%ifarch %{ix86} x86_64 armv5tel mips64el
%files data-le
%defattr(-,root,root,-)
%{_prefix}/lib/%{name}
%else
%files data-be
%defattr(-,root,root,-)
%{_prefix}/lib/%{name}
%endif
%files -n ibus-%{name} -f ibus-%{name}.lang
%defattr(-,root,root,-)
%{_prefix}/lib/ibus-sunpinyin/ibus*
%{_datadir}/ibus/component/*
%{_datadir}/ibus-%{name}
%files -n x%{name}
%defattr(-,root,root,-)
%{_bindir}/x%{name}*
%{_datadir}/x%{name}
%config %{_xinputconf}
%files data
%{_datadir}/%{name}
%{_bindir}/*
%{_mandir}/man1/*.1.gz
%{_docdir}/%{name}/SLM-*.mk
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.17.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.16.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.15.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.14.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.13.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.12.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.11.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Apr 28 2023 Peng Wu <pwu@redhat.com> - 3.0.0-0.10.20190805git
- Migrate to SPDX license
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.9.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.8.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.7.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.6.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.5.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.4.20190805git
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.3.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.2.20190805git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Aug 5 2019 Peng Wu <pwu@redhat.com> - 3.0.0-0.1.20190805git
- Update scons and use python3
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.26.20160301git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.25.20160301git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 26 2018 Peng Wu <pwu@redhat.com> - 2.0.4-0.24.20160301git%{?dist}
- Use python2
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.23.20160301git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Mar 18 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.4-0.22.20160301git
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.21.20160301git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.20.20160301git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.19.20160301git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.18.20160301git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Mar 1 2016 Peng Wu <pwu@redhat.com> - 2.0.4-0.17.20160301git
- Update to the latest upstream git snapshot
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-0.16.20130710git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Dec 29 2015 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.4-0.15.20130710git
- Rawhide only: Fix pod2man invocation for perl-podlators >= 4.
- Export global compiler flags before building.
- Minor spec cleanup: remove %%defattr usage and %%clean section,
use %%license, add %%_isa to -devel base package dependency,
don't mix %%buildroot and $RPM_BUILD_ROOT
- Insert gitdate into release to follow snapshot guidelines.
- Fix duplicated doc files (#1001266).
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.0.4-0.13
- Rebuilt for GCC 5 C++11 ABI change
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Mon Jun 16 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.0.4-0.11
- Handle AArch64 as well
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jul 10 2013 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.8
- Upstream to the latest git snapshot
* Sun Feb 24 2013 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.7
- Drop ibus-sunpinyin
- Drop xsunpinyin
- Architecture-dependent data file
- Upstream sunpinyin data file
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 28 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.5
- Fix the spec file for building fcitx-sunpinyin
* Thu Jul 26 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.4
- Upstream to the latest git snapshot
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-0.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sun Jun 03 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.2
- Upstream to the latest git snapshot
* Sun May 13 2012 Liang Suilong <liangsuilong@gmail.com> - 2.0.4-0.1
- Upstream to the latest git snapshot
- Add BR: python-devel
- Upgrade to the latest SLM Data
- Drop the patch: sunpinyin-fixes-unistd-compile.patch
* Tue Mar 06 2012 Peng Wu <pwu@redhat.com> - 2.0.3-4
- Rebuilt for ibus-1.4.99
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 2.0.3-2
- Rebuild for new libpng
* Fri Feb 18 2011 Howard Ning <mrlhwliberty@gmail.com> - 2.0.3-1
- New upstream