forked from fujiwarat/ibus-xkb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ibus-xkb.spec.in
191 lines (162 loc) · 4.31 KB
/
ibus-xkb.spec.in
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
%define gconf2_version 2.12.0
%define dbus_python_version 0.83.0
%define with_dconf 1
%define with_pygobject3 1
%define with_xkb 1
Name: ibus-xkb
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
Summary: IBus XKB
License: LGPLv2+
Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
# Patch0: ibus-xkb-HEAD.patch
BuildRequires: dbus-glib-devel
BuildRequires: dbus-python-devel >= %{dbus_python_version}
BuildRequires: gettext-devel
BuildRequires: ibus-devel
BuildRequires: intltool
BuildRequires: iso-codes-devel
BuildRequires: libtool
BuildRequires: python
%if %with_dconf
BuildRequires: dconf-devel
BuildRequires: dbus-x11
BuildRequires: vala
BuildRequires: vala-tools
%endif
# for AM_GCONF_SOURCE_2 in configure.ac
BuildRequires: GConf2-devel
%if %with_pygobject3
BuildRequires: gobject-introspection-devel
%endif
BuildRequires: libxkbfile-devel
BuildRequires: libgnomekbd-devel
Requires: %{name}-libs = %{version}-%{release}
Requires: ibus
Requires: iso-codes
Requires: dbus-python >= %{dbus_python_version}
%if %with_dconf
Requires: dconf
%else
Requires: GConf2 >= %{gconf2_version}
%endif
%if %with_pygobject3
Requires: pygobject3
%endif
Requires: pyxdg
Requires: libgnomekbd
%if !%with_dconf
Requires(pre): GConf2 >= %{gconf2_version}
Requires(post): GConf2 >= %{gconf2_version}
Requires(preun): GConf2 >= %{gconf2_version}
%endif
%define _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf
%description
The XKB engine for IBus platform. It provides XKB keymaps.
%package libs
Summary: IBus libraries
Group: System Environment/Libraries
Requires: glib2
Requires: dbus >= 1.2.4
%description libs
This package contains the libraries for IBus XKB
%package devel
Summary: Development tools for ibus
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: glib2-devel
Requires: dbus-devel
%description devel
The ibus-xkb-devel package contains the header files and developer
docs for ibus-xkb.
%prep
%setup -q
# %patch0 -p1
%build
%configure \
--disable-static \
%if %with_dconf
--disable-gconf \
--enable-dconf \
%endif
--enable-introspection
# make -C po update-gmo
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
rm -f $RPM_BUILD_ROOT%{_libdir}/libibus-xkb-1.0.la
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
%if !%with_dconf
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus-xkb.schemas >& /dev/null || :
%endif
%pre
%if !%with_dconf
if [ "$1" -gt 1 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus-xkb.schemas >& /dev/null || :
fi
%endif
%preun
%if !%with_dconf
if [ "$1" -eq 0 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus-xkb.schemas >& /dev/null || :
fi
%endif
%postun
if [ "$1" -eq 0 ]; then
%if %with_dconf
glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
dconf update
%endif
fi
%posttrans
%if %with_dconf
glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
dconf update
%endif
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%{_bindir}/ibus-setup-xkb
%{_datadir}/applications/*.desktop
%{_datadir}/ibus/setup-xkb
%{_datadir}/ibus/component/*.xml
%if %with_dconf
%{_datadir}/GConf/gsettings/*
%{_datadir}/glib-2.0/schemas/*.xml
%endif
%{_libexecdir}/ibus-engine-xkb
%{_libexecdir}/ibus-xkb-ui-gtk3
%if %with_xkb
%{_libexecdir}/ibus-xkb
%endif
%if %with_dconf
%{_sysconfdir}/dconf/db/ibus.d/01-xkb
%else
%{_sysconfdir}/gconf/schemas/ibus.schemas
%endif
%files libs
%defattr(-,root,root,-)
%{_libdir}/libibus-xkb-1.0.so.*
%{_libdir}/girepository-1.0/IBusXKB-1.0.typelib
%files devel
%defattr(-,root,root,-)
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_datadir}/gir-1.0/IBusXKB-1.0.gir
%{_datadir}/vala/vapi/ibus-xkb-1.0.deps
%{_datadir}/vala/vapi/ibus-xkb-1.0.vapi
%changelog
* @DATE_DISPLAY@ Takao Fujiwara <[email protected]> - @VERSION@-1
- Current version.