Commit a13c7e51 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Switch to use gsettings autoconf rule

Switch to using the GLIB_GSETTINGS autoconf rule to create
the make rules. This adds a '--disable-schemas-compile'
arg to configure, which distro packagers should utilize.

Fixes bug #20223
Signed-off-by: default avatarDaniel P. Berrange <dan@berrange.com>
parent a83803d5
......@@ -31,6 +31,10 @@ variable to point to the data directory, eg in the above example use:
XDG_DATA_DIRS=/usr/share:/usr/local/share:$HOME/libvirt-sandbox/share
export XDG_DATA_DIRS
OS distro packagers should use the --disable-schemas-compile arg
to configure to skip the compilation stage for schema files if
installing to the /usr prefix
Building entangle requires the following external packages to
be present
......
......@@ -65,14 +65,6 @@ PKG_CHECK_MODULES([GIO], [glib-2.0 >= $GIO_REQUIRED])
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
AC_MSG_CHECKING([for glib-compile-schemas])
AC_SUBST([GLIB_COMPILE_SCHEMAS], [$($PKG_CONFIG --variable=glib_compile_schemas gio-2.0)])
if [ test -n "$GLIB_COMPILE_SCHEMAS" ]; then
AC_MSG_RESULT([$GLIB_COMPILE_SCHEMAS])
else
AC_MSG_ERROR([The $GLIB_COMPILE_SCHEMAS binary must be installed before building entangle])
fi
PKG_CHECK_MODULES([GMODULE], [gmodule-2.0 >= $GLIB_REQUIRED])
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
......@@ -130,6 +122,7 @@ if test "$have_xext" = "yes"; then
AC_DEFINE_UNQUOTED([HAVE_XEXT], [], [Use Xext library])
fi
GLIB_GSETTINGS
GTK_DOC_CHECK([1.10],[--flavour no-tmpl])
......
......@@ -39,15 +39,14 @@ and 'hands off' shooting directly from the controlling computer.
%build
%configure
%configure --disable-schemas-compile
make %{?_smp_mflags} V=1
%install
rm -fr %{buildroot}
%makeinstall
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf %{buildroot}%{_datadir}/%{name}/website
rm -f %{buildroot}%{_datadir}/glib-2.0/schemas/gschemas.compiled
%find_lang %{name}
%clean
......
SUBDIRS = icons
GITIGNOREFILES = org.entangle-photo.manager.gschema.valid
noinst_LTLIBRARIES = libentangle_backend.la libentangle_frontend.la
bin_PROGRAMS = entangle
......@@ -22,8 +24,9 @@ desktop_DATA = entangle.desktop
icondir = $(pkgdatadir)
icon_DATA = $(PACKAGE).svg $(wildcard *.png)
gsettingsdir = $(datadir)/glib-2.0/schemas
gsettings_DATA = org.entangle-photo.manager.gschema.xml
gsettings_SCHEMAS = org.entangle-photo.manager.gschema.xml
@GSETTINGS_RULES@
iccdir = $(pkgdatadir)
icc_DATA = sRGB.icc
......@@ -35,7 +38,7 @@ BUILT_SOURCES = \
frontend/entangle-image-display-enums.c \
$(NULL)
EXTRA_DIST = $(builder_DATA) $(desktop_DATA_IN) $(icon_DATA) $(icc_DATA) $(gsettings_DATA)
EXTRA_DIST = $(builder_DATA) $(desktop_DATA_IN) $(icon_DATA) $(icc_DATA) $(gsettings_SCHEMAS)
libentangle_backend_la_SOURCES = \
backend/entangle-camera.h backend/entangle-camera.c \
......@@ -267,18 +270,12 @@ install-data-local:
$(MKDIR_P) $(DESTDIR)$(libdir)/entangle/plugins
$(MKDIR_P) $(DESTDIR)$(datadir)/entangle/plugins
install-data-hook:
$(AM_V_GEN)$(GLIB_COMPILE_SCHEMAS) $(DESTDIR)$(gsettingsdir)
uninstall-local::
rmdir $(DESTDIR)$(libdir)/entangle/plugins ||:
rmdir $(DESTDIR)$(libdir)/entangle ||:
rmdir $(DESTDIR)$(datadir)/entangle/plugins ||:
rmdir $(DESTDIR)$(datadir)/entangle ||:
uninstall-hook:
$(AM_V_GEN)$(GLIB_COMPILE_SCHEMAS) $(DESTDIR)$(gsettingsdir)
Entangle-0.1.gir: entangle $(G_IR_SCANNER) Makefile.am
$(AM_V_GEN)$(G_IR_SCANNER) -v --quiet \
--namespace Entangle \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment