$(gsettings_schemas_in_files) \
make-dconf-override-db.sh \
profile/ibus \
+ 00-upstream-settings \
$(NULL)
DISTCLEANFILES = \
MAINTAINERCLEANFILES = \
$(gsettings_schemas_in_files) \
+ 00-upstream-settings \
$(NULL)
-CLEANFILES = \
- db/ibus \
- $(NULL)
+dconfprofiledir = $(sysconfdir)/dconf/profile
+dconfprofile_DATA = profile/ibus
-dconfprofiledir = $(sysconfdir)/dconf
-nobase_dconfprofile_DATA = db/ibus profile/ibus
+dconfdbdir = $(sysconfdir)/dconf/db/ibus.d
+dconfdb_DATA = 00-upstream-settings
org.freedesktop.ibus.gschema.xml.in: $(top_srcdir)/data/ibus.schemas.in
$(AM_V_GEN) gsettings-schema-convert --force --gconf --xml \
--schema-id "org.freedesktop.ibus" \
--output $@ $<
-db/ibus: $(srcdir)/make-dconf-override-db.sh $(gsettings_SCHEMAS)
+00-upstream-settings: $(srcdir)/make-dconf-override-db.sh $(gsettings_SCHEMAS)
@$(MKDIR_P) db
- $(AM_V_GEN) $(srcdir)/make-dconf-override-db.sh $@ || \
+ $(AM_V_GEN) $(srcdir)/make-dconf-override-db.sh > $@ || \
{ rc=$$?; $(RM) -rf $@; exit $$rc; }
+install-data-hook:
+ dconf update
+
-include $(top_srcdir)/git.mk
# in case that schema is not installed on the system
glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD"
-gsettings list-recursively org.freedesktop.ibus.general | \
-while read schema key val; do
- gsettings set "$schema" "$key" "$val"
+cat <<EOF
+# This file is a part of the IBus packaging and should not be changed.
+#
+# Instead create your own file next to it with a higher numbered prefix,
+# and run
+#
+# dconf update
+#
+EOF
+
+# Loop over top level schemas since "gsettings list-recursively" only
+# looks for direct children.
+schemas="org.freedesktop.ibus.general org.freedesktop.ibus.panel"
+current_schema=
+for schema in $schemas; do
+ gsettings list-recursively $schema | \
+ while read schema key val; do
+ if test "$schema" != "$current_schema"; then
+ echo
+ echo $schema | sed 's/org\.freedesktop\(.*\)/[desktop\1]/' | tr '.' '/'
+ current_schema="$schema"
+ fi
+ echo "$key=$val"
+ done
done
-gsettings list-recursively org.freedesktop.ibus.panel | \
-while read schema key val; do
- gsettings set "$schema" "$key" "$val"
-done
-
-mv $XDG_CONFIG_HOME/dconf/user "$1"
rm -rf $TMPDIR
kill $DBUS_SESSION_BUS_PID