Commit aff2f2aa authored by Bastien Nocera's avatar Bastien Nocera Committed by Daniel Drake

D-Bus activation

Provide .conf and .service files for D-Bus to use, allowing fprintd to be
autostarted
parent 1f54a0c3
AUTOMAKE_OPTIONS = dist-bzip2
SUBDIRS = src tests
SUBDIRS = src data tests
EXTRA_DIST = TODO
......@@ -33,6 +33,6 @@ CFLAGS="$saved_cflags"
AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
AC_SUBST(AM_CFLAGS)
AC_CONFIG_FILES([Makefile] [src/Makefile] [tests/Makefile])
AC_CONFIG_FILES([Makefile] [src/Makefile] [data/Makefile] [tests/Makefile])
AC_OUTPUT
dbus_servicesdir = $(datadir)/dbus-1/system-services
dbus_confdir = $(sysconfdir)/dbus-1/system.d
dbus_services_in_files = net.reactivated.Fprint.service.in
dbus_services_DATA = $(dbus_services_in_files:.service.in=.service)
$(dbus_services_DATA): $(dbus_services_in_files)
sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
dbus_conf_DATA = net.reactivated.Fprint.conf
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only root can own the service -->
<policy user="root">
<allow own="net.reactivated.Fprint"/>
</policy>
</busconfig>
[D-BUS Service]
Name=net.reactivated.Fprint
Exec=@LIBEXECDIR@/fprintd
User=root
......@@ -4,7 +4,7 @@ noinst_HEADERS = $(BUILT_SOURCES)
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = fprintd.xml
bin_PROGRAMS = fprintd
libexec_PROGRAMS = fprintd
fprintd_SOURCES = main.c manager.c device.c file_storage.c
fprintd_LDADD = $(GLIB_LIBS) $(DBUS_GLIB_LIBS) $(FPRINT_LIBS)
......
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