Create GSettings schema with the available enum types

This commit is contained in:
Gergely Polonkai 2014-10-14 23:19:51 +02:00 committed by gitolite tester
parent c03f1eac6a
commit c461b743e4
4 changed files with 38 additions and 1 deletions

2
.gitignore vendored
View File

@ -14,6 +14,7 @@
/.dirstamp
*.gir
*.typelib
*.gschema.valid
ChangeLog
# Files created by the build tools
@ -90,6 +91,7 @@ Makefile.in
/data/swe-glib.spec
/src/*.vapi
/src/gswe-version.h
/data/*.gschema.xml
# Documentation related files
/docs/reference/*/*.args

View File

@ -70,6 +70,9 @@ AC_PATH_PROG([GTESTER], [gtester])
AC_PATH_PROG([GTESTER_REPORT], [gtester-report])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32.0])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.32.0])
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26])
GLIB_GSETTINGS
AC_CONFIG_MACRO_DIR([m4])
LIBSWE_LIBS='$(top_builddir)/swe/src/libswe-$(SWE_VERSION).la'

View File

@ -1,6 +1,14 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = swe-glib.pc $(NULL)
eu.polonkai.gergely.swe-glib.gschema.xml: gschema.template $(top_builddir)/src/gswe-types.h
$(GLIB_MKENUMS) --comments "<!-- @comment@ -->" --template $(filter %.template,$^) $(filter-out %.template,$^) > \
$@.tmp && mv $@.tmp $@
gsettings_SCHEMAS = eu.polonkai.gergely.swe-glib.gschema.xml
@GSETTINGS_RULES@
swephdir = $(pkgdatadir)
sweph_DATA = \
sweph-data/seas_00.se1 \
@ -74,5 +82,7 @@ sweph_DATA = \
EXTRA_DIST = \
$(sweph_DATA) \
swe-glib.spec
swe-glib.spec \
gschema.template
DISTCLEANFILES = $(gsettings_SCHEMAS)

22
data/gschema.template Normal file
View File

@ -0,0 +1,22 @@
/*** BEGIN file-header ***/
<schemalist>
/*** END file-header ***/
/*** BEGIN file-production ***/
/*** END file-production ***/
/*** BEGIN value-header ***/
<enum id="eu.polonkai.gergely.swe-glib.@EnumName@">
/*** END value-header ***/
/*** BEGIN value-production ***/
<value nick="@valuenick@" value="@valuenum@"/>
/*** END value-production ***/
/*** BEGIN value-tail ***/
</enum>
/*** END value-tail ***/
/*** BEGIN file-tail ***/
</schemalist>
/*** END file-tail ***/