summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--libchewing.spec76
-rw-r--r--sources1
3 files changed, 78 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..f3d9693 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libchewing-0.9.0.tar.zst
diff --git a/libchewing.spec b/libchewing.spec
new file mode 100644
index 0000000..b920704
--- /dev/null
+++ b/libchewing.spec
@@ -0,0 +1,76 @@
+%global libchewing_python_dir %{python3_sitelib}
+
+Name: libchewing
+Version: 0.9.0
+Release: 1
+Summary: Intelligent phonetic input method library for Traditional Chinese
+
+License: LGPL-2.1-or-later AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0
+URL: https://chewing.im/
+Source0: https://github.com/chewing/libchewing/releases/download/v%{version}/%{name}-%{version}.tar.zst
+
+BuildRequires: sqlite-devel
+BuildRequires: python3-devel
+BuildRequires: cmake
+Obsoletes: python2-libchewing < 0.5.1-13
+
+%description
+libchewing is an intelligent phonetic input method library for Chinese.
+
+It provides the core algorithm and logic that can be used by various
+input methods. The Chewing input method is a smart bopomofo phonetics
+input method that is useful for inputting Mandarin Chinese.
+
+%package -n %{name}-devel
+Summary: Development files for libchewing
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description -n %{name}-devel
+Headers and other files needed to develop applications using the %{name}
+library.
+
+%package -n python3-%{name}
+Summary: Python binding for libchewing
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+
+%description -n python3-%{name}
+Python binding of libchewing.
+
+%prep
+%autosetup -p1
+
+%build
+%cmake
+%cmake_build
+
+%install
+%cmake_install
+
+mkdir -p %{buildroot}%{libchewing_python_dir}
+cp -p contrib/python/chewing.py %{buildroot}%{libchewing_python_dir}
+
+rm -f %{buildroot}/%{_infodir}/dir
+
+%files
+%license COPYING
+%doc README.md AUTHORS NEWS TODO
+%{_datadir}/%{name}
+%{_libdir}/*.so.*
+%{_infodir}/%{name}.info.*
+
+%files devel
+%{_includedir}/chewing
+%{_libdir}/pkgconfig/chewing.pc
+%{_libdir}/*.so
+
+%files -n python3-%{name}
+%{libchewing_python_dir}/chewing.py
+%{libchewing_python_dir}/__pycache__/*
+
+%changelog
+* Wed Aug 14 2024 Funda Wang <fundawang@yeah.net> - 0.9.0-1
+- update to 0.9.0
+
+* Wed Jul 20 2022 misaka00251 <misaka00251@misakanet.cn> - 0.5.1-1
+- Init package
diff --git a/sources b/sources
new file mode 100644
index 0000000..7be42c2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+81042ab5d1a0ded01f77b90996e8e5ec libchewing-0.9.0.tar.zst