2014-07-27 14:38:27 +02:00
|
|
|
# RPM macros for ibus
|
2014-07-27 17:45:22 +02:00
|
|
|
# You should use %%{_ibus_icondir} and %%{_ibus_tabledir}
|
|
|
|
# in %%files section
|
|
|
|
# For ibus table packaging, you have to:
|
|
|
|
# Use %%ibus_table_requires as requires
|
|
|
|
# Use %%ibus_table_index_post %%DB_NAME in %%post to create
|
|
|
|
# table indexes for your table package.
|
2014-07-27 14:38:27 +02:00
|
|
|
%_ibus_includedir %{_includedir}/ibus-1.0
|
|
|
|
%_ibus_libdir %{_libdir}/ibus
|
|
|
|
%_ibus_libexecdir %{_ibus_libdir}
|
|
|
|
%_ibus_datadir %{_datadir}/ibus
|
|
|
|
%_ibus_componentdir %{_ibus_datadir}/component
|
|
|
|
%_ibus_enginedir %{_ibus_datadir}/engine
|
|
|
|
%_ibus_keymapdir %{_ibus_datadir}/keymaps
|
|
|
|
%_ibus_setupdir %{_ibus_datadir}/setup
|
|
|
|
%_ibus_autostartdir %{_sysconfdir}/X11/xim.d
|
|
|
|
%_ibus_tabledir %{_datadir}/ibus-table/tables
|
|
|
|
%_ibus_icondir %{_datadir}/ibus-table/icons
|
|
|
|
|
|
|
|
%ibus_requires \
|
|
|
|
Requires: ibus
|
|
|
|
|
|
|
|
%ibus_table_requires \
|
|
|
|
Requires: ibus-table
|
2014-07-27 17:45:22 +02:00
|
|
|
Requires(post): ibus-table
|
2014-07-27 14:38:27 +02:00
|
|
|
|
2014-07-27 17:45:22 +02:00
|
|
|
%ibus_table_index_post() \
|
|
|
|
%if "x%1" != "x%%1" \
|
|
|
|
DB_NAME="%1" \
|
|
|
|
%else \
|
|
|
|
echo "Missing argument DB_NAME in call to %%ibus_table_create_index." \
|
|
|
|
false \
|
|
|
|
%endif \
|
2014-07-27 19:42:50 +02:00
|
|
|
/usr/bin/ibus-table-createdb -i -n %{_ibus_tabledir}/${DB_NAME}.db || true
|