Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Commit

Permalink
build: Add --with-systemdsystemunitdir configure option
Browse files Browse the repository at this point in the history
  • Loading branch information
hadess committed May 22, 2015
1 parent 6bd7e24 commit 853371b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ SUBDIRS = data src docs

DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
--with-udevrulesdir=$$dc_install_base/$(udevrulesdir)
--with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)

EXTRA_DIST = README.md
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ AC_ARG_WITH([udevrulesdir],
[with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"])
AC_SUBST([udevrulesdir], [$with_udevrulesdir])

AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
[],
[with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
if test x$with_systemdsystemunitdir != xno; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi

PKG_CHECK_MODULES(IIO_SENSOR_PROXY, gio-2.0 gudev-1.0)

AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen])
Expand Down
7 changes: 4 additions & 3 deletions data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
udevrules_DATA = 40-iio-sensor-proxy.rules

servicedir = /usr/lib/systemd/system/
service_DATA = iio-sensor-proxy.service
systemdservicedir = $(systemdsystemunitdir)
systemdservice_in_files = iio-sensor-proxy.service.in
systemdservice_DATA = iio-sensor-proxy.service
iio-sensor-proxy.service: iio-sensor-proxy.service.in Makefile
$(AM_V_GEN) $(SED) -e "s|\@sbindir\@|$(sbindir)|" $< > $@

dbus_confdir = /etc/dbus-1/system.d
dbus_conf_DATA = net.hadess.SensorProxy.conf

CLEANFILES = iio-sensor-proxy.service
EXTRA_DIST = $(udevrules_DATA) $(dbus_conf_DATA) iio-sensor-proxy.service.in
EXTRA_DIST = $(udevrules_DATA) $(dbus_conf_DATA) $(systemdservice_in_files)

0 comments on commit 853371b

Please sign in to comment.