summaryrefslogtreecommitdiffstats
path: root/ibus-pinyin.spec.in
blob: 0366c20f1c69c8f162db2441ac8e78cdf4f79507 (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
72
73
74
75
76
77
78
79
Name:       @PACKAGE_NAME@
Version:    @PACKAGE_VERSION@
Release:    1%{?dist}
Summary:    The Chinese Pinyin engine for IBus input platform
License:    GPLv2+
Group:      System Environment/Libraries
URL:        http://code.google.com/p/ibus
Source0:    http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
Source1:    pinyin-database-1.2.99.tar.bz2

BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gettext-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  sqlite-devel
BuildRequires:  libuuid-devel
BuildRequires:  ibus-devel >= 1.2.0

Requires(post): sqlite

Requires:   ibus >= 1.2.0

%description
The Chinese Pinyin input method for IBus platform.

%package    open-phrase
Summary:    The open phrase database for ibus Pinyin
Group:      System Environment/Libraries
Requires(post): sqlite

%description open-phrase
The open phrase database for ibus Pinyin engine.

%prep
%setup -q
cp %{SOURCE1} data/db/open-phrase

%build
%configure --disable-static --enable-db-open-phrase
# make -C po update-gmo
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} NO_INDEX=true install

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
cd %{_datadir}/ibus-pinyin/db
sqlite3 android.db ".read create_index.sql"

%post open-phrase
cd %{_datadir}/ibus-pinyin/db
sqlite3 open-phrase.db ".read create_index.sql"

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%{_libexecdir}/ibus-engine-pinyin
%{_libexecdir}/ibus-setup-pinyin
%{_datadir}/@PACKAGE@/icons
%{_datadir}/@PACKAGE@/setup
%{_datadir}/@PACKAGE@/db/create_index.sql
%{_datadir}/@PACKAGE@/db/android.db
%dir %{_datadir}/@PACKAGE@
%dir %{_datadir}/@PACKAGE@/db
%{_datadir}/ibus/component/*

%files open-phrase
%{_datadir}/@PACKAGE@/db/open-phrase.db

%changelog
* Fri Aug 08 2008 Peng Huang <shawn.p.huang@gmail.com> - @VERSION@-1
- The first version.