~ubuntu-branches/ubuntu/karmic/ibus/karmic-updates

« back to all changes in this revision

Viewing changes to ibus.spec.in

  • Committer: Bazaar Package Importer
  • Author(s): LI Daobing
  • Date: 2009-07-23 20:22:09 UTC
  • mfrom: (1.1.4 upstream) (6.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090723202209-bmgqa80g1umg8l2p
Tags: 1.2.0.20090723-1
new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
%define mod_path ibus-@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@
4
4
%define host_vendor %(if [[ "%{_host_vendor}" == "unknown" ]]; then echo redhat; else echo %{_host_vendor}; fi)
5
5
%define host %{_host_cpu}-%{host_vendor}-%{_host_os}-gnu
 
6
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
 
7
%define gconf2_version 2.12.0
 
8
%define dbus_python_version 0.83.0
 
9
%define im_chooser_version 1.2.5
 
10
 
6
11
Name:       ibus
7
12
Version:    @PACKAGE_VERSION@
8
13
Release:    1%{?dist}
15
20
 
16
21
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
22
 
18
 
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
19
23
 
 
24
BuildRequires:  cvs
20
25
BuildRequires:  gettext-devel
21
26
BuildRequires:  libtool
22
27
BuildRequires:  python
23
28
BuildRequires:  gtk2-devel
24
 
BuildRequires:  dbus-devel
25
 
# BuildRequires:  qt-devel
26
29
BuildRequires:  dbus-glib-devel
27
 
BuildRequires: dbus-python-devel
 
30
BuildRequires:  dbus-python-devel >= %{dbus_python_version}
28
31
BuildRequires:  desktop-file-utils
29
 
BuildRequires: GConf2-devel
30
 
 
31
 
Requires(post):  desktop-file-utils
32
 
Requires(post):  %{_sbindir}/alternatives
33
 
Requires(postun):  desktop-file-utils
34
 
Requires(postun):  %{_sbindir}/alternatives
 
32
BuildRequires:  gtk-doc
 
33
BuildRequires:  GConf2-devel
 
34
BuildRequires:  pygobject2-devel
 
35
BuildRequires:  intltool
 
36
# BuildRequires:  qt-devel
35
37
 
36
38
Requires:   %{name}-libs = %{version}-%{release}
37
 
Requires:   glib2 >= %{glib_ver}
 
39
Requires:   %{name}-gtk = %{version}-%{release}
 
40
 
38
41
Requires:   pygtk2
39
 
Requires:   dbus-python >= 0.83.0
40
 
Requires:   notification-daemon
41
42
Requires:   pyxdg
42
43
Requires:   iso-codes
 
44
Requires:   dbus-python >= %{dbus_python_version}
 
45
Requires:   im-chooser >= %{im_chooser_version}
 
46
Requires:   GConf2 >= %{gconf2_version}
 
47
 
 
48
Requires(post):  desktop-file-utils
 
49
Requires(postun):  desktop-file-utils
 
50
 
 
51
Requires(pre): GConf2 >= %{gconf2_version}
 
52
Requires(post): GConf2 >= %{gconf2_version}
 
53
Requires(preun): GConf2 >= %{gconf2_version}
 
54
 
 
55
Requires(post):  %{_sbindir}/alternatives
 
56
Requires(postun):  %{_sbindir}/alternatives
 
57
 
 
58
Obsoletes:  ibus-qt < 1.1.0
43
59
 
44
60
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf
45
61
 
52
68
Summary:    IBus libraries
53
69
Group:      System Environment/Libraries
54
70
 
 
71
Requires:   glib2 >= %{glib_ver}
 
72
Requires:   dbus >= 1.2.4
 
73
 
55
74
%description libs
56
 
This package contains ibus libraries.
57
 
 
 
75
This package contains the libraries for IBus
58
76
 
59
77
%package gtk
60
78
Summary:    IBus im module for gtk2
61
79
Group:      System Environment/Libraries
62
80
Requires:   %{name} = %{version}-%{release}
 
81
Requires(post): glib2 >= %{glib_ver}
63
82
 
64
83
%description gtk
65
84
This package contains ibus im module for gtk2
84
103
The ibus-devel package contains the header files and developer
85
104
docs for ibus.
86
105
 
 
106
%package devel-docs
 
107
Summary:    Developer documents for ibus
 
108
Group:      Development/Libraries
 
109
Requires:   %{name} = %{version}-%{release}
 
110
Requires:   gtk-doc
 
111
 
 
112
%description devel-docs
 
113
The ibus-devel-docs package contains developer documentation for ibus
 
114
 
 
115
 
87
116
%prep
88
117
%setup -q
 
118
# %patch0 -p1
 
119
# ./autogen.sh --help
89
120
 
90
121
%build
91
 
%configure --disable-static --disable-iso-codes-check
 
122
%configure --disable-static \
 
123
                   --disable-iso-codes-check \
 
124
                   --enable-gtk-doc \
 
125
                   --disable-qt4-immodule
92
126
# make -C po update-gmo
93
127
make %{?_smp_mflags}
94
128
 
103
137
install -pm 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_xinputconf}
104
138
 
105
139
# install .desktop files
 
140
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus.desktop
 
141
echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop
 
142
echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop
 
143
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop
106
144
desktop-file-install --delete-original          \
107
145
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
108
146
  $RPM_BUILD_ROOT%{_datadir}/applications/*
112
150
%clean
113
151
rm -rf $RPM_BUILD_ROOT
114
152
 
 
153
%post
 
154
update-desktop-database -q
 
155
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
 
156
 
 
157
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
158
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
 
159
 
115
160
%pre
116
 
if [ "$1" -gt 1 ] ; then
117
 
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
118
 
gconftool-2 --makefile-uninstall-rule \
119
 
%{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
 
161
if [ "$1" -gt 1 ]; then
 
162
        export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
163
        gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
120
164
fi
121
165
 
122
 
%post
123
 
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
124
 
gconftool-2 --makefile-install-rule \
125
 
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
126
 
 
127
166
%preun
128
 
if [ "$1" -eq 0 ] ; then
129
 
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
130
 
gconftool-2 --makefile-uninstall-rule \
131
 
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
 
167
if [ "$1" -eq 0 ]; then
 
168
        export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
169
        gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
132
170
fi
133
171
 
134
 
%post libs
135
 
/sbin/ldconfig
136
 
update-desktop-database -q
137
 
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
138
 
 
139
 
%post gtk
140
 
%{_bindir}/update-gtk-immodules %{host} || :
141
 
 
142
 
%postun libs
143
 
/sbin/ldconfig
 
172
%postun
144
173
update-desktop-database -q
145
174
if [ "$1" = "0" ]; then
146
175
  %{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
148
177
  [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
149
178
fi
150
179
 
 
180
%post libs
 
181
/sbin/ldconfig
 
182
 
 
183
%postun libs
 
184
/sbin/ldconfig
 
185
 
 
186
%post gtk
 
187
%{_bindir}/update-gtk-immodules %{host} || :
 
188
 
151
189
%postun gtk
152
190
%{_bindir}/update-gtk-immodules %{host} || :
153
191
 
154
192
%files -f %{name}.lang
155
193
%defattr(-,root,root,-)
156
194
%doc AUTHORS COPYING README
157
 
%{python_sitelib}/ibus
 
195
%dir %{python_sitelib}/ibus
 
196
%{python_sitelib}/ibus/*
 
197
%dir %{_datadir}/ibus/
158
198
%{_bindir}/ibus-daemon
159
199
%{_bindir}/ibus-setup
160
 
%{_datadir}/ibus
 
200
%{_datadir}/ibus/*
161
201
%{_datadir}/applications/*
162
202
%{_datadir}/pixmaps/*
163
203
%{_libexecdir}/ibus-gconf
164
204
%{_libexecdir}/ibus-ui-gtk
165
205
%{_libexecdir}/ibus-x11
166
 
%config(noreplace) %{_xinputconf}
167
 
%config(noreplace) %{_sysconfdir}/gconf/schemas/%{name}.schemas
168
 
%config(noreplace) %{_sysconfdir}/xdg/autostart/ibus.desktop
 
206
# %{_sysconfdir}/xdg/autostart/ibus.desktop
 
207
%{_sysconfdir}/gconf/schemas/ibus.schemas
 
208
%config %{_xinputconf}
169
209
 
170
210
%files libs
171
211
%defattr(-,root,root,-)
172
 
%{_libdir}/libibus.so*
 
212
%{_libdir}/libibus.so.*
173
213
 
174
214
%files gtk
175
215
%defattr(-,root,root,-)
183
223
%defattr(-,root,root,-)
184
224
%{_libdir}/lib*.so
185
225
%{_includedir}/*
 
226
%{_libdir}/pkgconfig/*
 
227
 
 
228
%files devel-docs
186
229
%{_datadir}/gtk-doc/html/*
187
 
%{_libdir}/pkgconfig/*
188
230
 
189
231
%changelog
190
 
* @DATE_DISPLAY@ Huang Peng <shawn.p.huang@gmail.com> - @VERSION@-1
 
232
* @DATE_DISPLAY@ Peng Huang <shawn.p.huang@gmail.com> - @VERSION@-1
191
233
- Current version.
192
 
 
193
 
* Thu Aug 07 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.0.20080810-1
194
 
- The first version.
195