summaryrefslogtreecommitdiff
path: root/contrib/session-helper
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2017-07-25 22:49:33 +0100
committerRichard Hughes <richard@hughsie.com>2017-07-31 12:00:57 +0100
commit158fba0bc37d4cdcbd98d30e97b434ad033732f4 (patch)
treed94c6be43ada1d89c710ac22132e38934168bbb4 /contrib/session-helper
parent9235b120fc0ec33ef13a04d54c403285dae49cb3 (diff)
downloadcolord-158fba0bc37d4cdcbd98d30e97b434ad033732f4.tar.gz
Port to the Meson build system
Diffstat (limited to 'contrib/session-helper')
-rw-r--r--contrib/session-helper/Makefile.am110
-rw-r--r--contrib/session-helper/meson.build90
-rw-r--r--contrib/session-helper/org.freedesktop.ColorHelper.gschema.xml (renamed from contrib/session-helper/org.freedesktop.ColorHelper.gschema.xml.in)24
3 files changed, 102 insertions, 122 deletions
diff --git a/contrib/session-helper/Makefile.am b/contrib/session-helper/Makefile.am
deleted file mode 100644
index 7fbdafa..0000000
--- a/contrib/session-helper/Makefile.am
+++ /dev/null
@@ -1,110 +0,0 @@
-introspectiondir = $(datadir)/dbus-1/interfaces
-dist_introspection_DATA = \
- org.freedesktop.ColorHelper.xml
-
-AM_CPPFLAGS = \
- $(PIE_CFLAGS) \
- -I$(top_srcdir)/lib \
- $(COLORD_GTK_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GNOME_DESKTOP_CFLAGS) \
- $(LCMS_CFLAGS) \
- -I$(top_srcdir)/client \
- -I$(top_builddir)/lib \
- -I$(top_srcdir)/lib/colord \
- -I$(top_builddir)/lib/colord \
- -I$(top_srcdir)/src \
- -DCD_COMPILATION \
- -DCD_DISABLE_DEPRECATED \
- -DG_LOG_DOMAIN=\"Cd\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DLIBDIR=\"$(libdir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
- -DLOCALSTATEDIR=\""$(localstatedir)"\" \
- -DVERSION="\"$(VERSION)\""
-
-COLORD_LIBS = \
- $(top_builddir)/lib/colord/libcolordprivate.la \
- $(top_builddir)/lib/colord/libcolord.la
-
-libcolord_includedir = $(includedir)/colord-1/colord-session
-libcolord_include_HEADERS = \
- cd-session.h
-
-libexec_PROGRAMS = \
- colord-session
-
-colord_session_SOURCES = \
- cd-debug.c \
- cd-debug.h \
- cd-session.h \
- cd-state.c \
- cd-state.h \
- cd-main.c
-
-colord_session_LDADD = \
- $(COLORD_LIBS) \
- $(LCMS_LIBS) \
- $(GLIB_LIBS) \
- -lm
-
-colord_session_LDFLAGS = \
- $(PIE_LDFLAGS)
-
-colord_session_CFLAGS = \
- $(WARN_CFLAGS)
-
-dbusservicemaindir = $(datadir)/dbus-1/services
-dbusservicemain_in_files = org.freedesktop.ColorHelper.service.in
-dbusservicemain_DATA = $(dbusservicemain_in_files:.service.in=.service)
-$(dbusservicemain_DATA): $(dbusservicemain_in_files) Makefile
- @sed -e "s|\@servicedir\@|$(libexecdir)|" $< | \
- sed -e "s|\@daemon_user\@|$(daemon_user)|" > $@
-
-systemduserdir = $(prefix)/lib/systemd/user
-systemduser_in_files = colord-session.service.in
-systemduser_DATA = $(systemduser_in_files:.service.in=.service)
-$(systemduser_DATA): $(systemduser_in_files) Makefile
- @sed -e "s|\@servicedir\@|$(libexecdir)|" $< > $@
-
-if CD_BUILD_SESSION_EXAMPLE
-noinst_PROGRAMS = \
- colord-session-example
-colord_session_example_SOURCES = \
- cd-example.c
-colord_session_example_LDADD = \
- $(COLORD_LIBS) \
- $(COLORD_GTK_LIBS) \
- $(GLIB_LIBS) \
- $(GNOME_DESKTOP_LIBS) \
- $(LCMS_LIBS) -lm
-colord_session_example_CFLAGS = \
- $(WARN_CFLAGS)
-
-test: colord-session-example
- ./colord-session-example \
- --device "xrandr-Lenovo Group Limited" \
- --sensor dummy \
- --title "This is a test profile" \
- --quality high \
- --whitepoint 0
-
-endif
-
-@GSETTINGS_RULES@
-@INTLTOOL_XML_NOMERGE_RULE@
-gsettings_schemas_in_files = org.freedesktop.ColorHelper.gschema.xml.in
-gsettings_SCHEMAS = $(gsettings_schemas_in_files:.gschema.xml.in=.gschema.xml)
-
-EXTRA_DIST = \
- $(gsettings_schemas_in_files) \
- $(systemduser_in_files) \
- $(dbusservicemain_in_files)
-
-DISTCLEANFILES = \
- $(dbusservicemain_DATA) \
- $(systemduser_DATA) \
- org.freedesktop.ColorHelper.gschema.xml
-
--include $(top_srcdir)/git.mk
diff --git a/contrib/session-helper/meson.build b/contrib/session-helper/meson.build
new file mode 100644
index 0000000..6b6bae0
--- /dev/null
+++ b/contrib/session-helper/meson.build
@@ -0,0 +1,90 @@
+cargs = ['-DG_LOG_DOMAIN="Cd"']
+
+install_data('org.freedesktop.ColorHelper.xml',
+ install_dir : join_paths(get_option('datadir'), 'dbus-1', 'interfaces')
+)
+
+install_headers(
+ 'cd-session.h',
+ subdir : 'colord-1/colord-session',
+)
+
+con2 = configuration_data()
+con2.set('servicedir',
+ join_paths(get_option('prefix'),
+ get_option('libexecdir')))
+
+# replace @servicedir@
+configure_file(
+ input : 'colord-session.service.in',
+ output : 'colord-session.service',
+ configuration : con2,
+ install: true,
+ install_dir: systemd.get_pkgconfig_variable('systemduserunitdir'),
+)
+
+# replace @servicedir@
+configure_file(
+ input : 'org.freedesktop.ColorHelper.service.in',
+ output : 'org.freedesktop.ColorHelper.service',
+ configuration : con2,
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services') ,
+)
+
+executable(
+ 'colord-session',
+ sources : [
+ 'cd-debug.c',
+ 'cd-debug.h',
+ 'cd-main.c',
+ 'cd-session.h',
+ 'cd-state.c',
+ 'cd-state.h',
+ ],
+ include_directories : [
+ colord_incdir,
+ lib_incdir,
+ root_incdir,
+ ],
+ dependencies : [
+ gio,
+ lcms,
+ libm,
+ ],
+ link_with : colord,
+ c_args : [
+ cargs,
+ ],
+ install : true,
+ install_dir : get_option('libexecdir')
+)
+
+install_data('org.freedesktop.ColorHelper.gschema.xml',
+ install_dir : 'share/glib-2.0/schemas')
+
+if get_option('enable-session-example')
+ executable(
+ 'colord-session-example',
+ sources : [
+ 'cd-example.c',
+ ],
+ include_directories : [
+ root_incdir,
+ colord_incdir,
+ lib_incdir,
+ root_incdir,
+ ],
+ dependencies : [
+ gio,
+ lcms,
+ libm,
+ colord_gtk,
+ gnome_desktop,
+ ],
+ link_with : colord,
+ c_args : [
+ cargs,
+ ],
+ )
+endif
diff --git a/contrib/session-helper/org.freedesktop.ColorHelper.gschema.xml.in b/contrib/session-helper/org.freedesktop.ColorHelper.gschema.xml
index 092df7e..8d0ab60 100644
--- a/contrib/session-helper/org.freedesktop.ColorHelper.gschema.xml.in
+++ b/contrib/session-helper/org.freedesktop.ColorHelper.gschema.xml
@@ -2,38 +2,38 @@
<schema id="org.freedesktop.ColorHelper" path="/org/freedesktop/color-helper/">
<key name="display-gamma" type="d">
<default>2.4</default>
- <_summary>Default gamma for the display</_summary>
- <_description>
+ <summary>Default gamma for the display</summary>
+ <description>
The default target gamma value for the display.
Common values are 1.8, 2.2 and 2.4.
- </_description>
+ </description>
</key>
<key name="display-whitepoint" type="i">
<default>6500</default>
- <_summary>Default display target whitepoint</_summary>
- <_description>
+ <summary>Default display target whitepoint</summary>
+ <description>
The default target whitepoint in Kelvin for display calibration,
with 0 meaning display native.
Common values are 6500 for D65 and 5000 for D50.
- </_description>
+ </description>
</key>
<key name="sample-delay" type="i">
<default>400</default>
- <_summary>Delay between sample intervals</_summary>
- <_description>
+ <summary>Delay between sample intervals</summary>
+ <description>
This is the delay between setting the sample color and asking the
measuring instrument to take a sample.
It is required because both the graphics driver and the display itself
introduce latency.
- </_description>
+ </description>
</key>
<key name="profile-upload-uri" type="s">
<default>'http://www.hughski.com/profile-store.php'</default>
- <_summary>Web service profile upload URI</_summary>
- <_description>
+ <summary>Web service profile upload URI</summary>
+ <description>
The URI of the web service that allows the calibration tools to upload a
specific profile to the Internet.
- </_description>
+ </description>
</key>
</schema>
</schemalist>