diff --git a/configure.ac b/configure.ac index 0c0309e..4b9d39c 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,7 @@ AC_MSG_RESULT([${enable_systemd}]) ### Checks for programs AC_PROG_CC +AC_PROG_SED PKG_PROG_PKG_CONFIG # Set edje_cc path @@ -199,7 +200,6 @@ src/daemon/Makefile data/Makefile data/themes/Makefile data/themes/default/Makefile -data/entrance.service ]) diff --git a/data/Makefile.am b/data/Makefile.am index 8fa2a04..86ea78a 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,6 +1,8 @@ MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = entrance entrance.conf entrance.other entrance.service.in + SUBDIRS = themes pamdir = $(sysconfdir)/pam.d/ @@ -12,6 +14,24 @@ conf_DATA = entrance.conf if HAVE_SYSTEMD systemddir = /usr/lib/systemd/system/ systemd_DATA = entrance.service -endif -EXTRA_DIST = entrance entrance.conf entrance.other +sed_process = @SED@ \ +-e 's,@VERSION\@,$(VERSION),g' \ +-e 's,@VMAJ\@,$(VMAJ),g' \ +-e 's,@prefix\@,$(prefix),g' \ +-e 's,@exec_prefix\@,$(exec_prefix),g' \ +-e 's,@libdir\@,$(libdir),g' \ +-e 's,@includedir\@,$(includedir),g' \ +-e 's,@pkgincludedir\@,$(pkgincludedir),g' \ +-e 's,@SBINDIR\@,$(sbindir),g' \ +< $< > $@ || rm $@ + +pc_verbose = $(pc_verbose_@AM_V@) +pc_verbose_ = $(pc_verbose_@AM_DEFAULT_V@) +pc_verbose_0 = @echo " SED " $@; + +entrance.service: $(top_srcdir)/data/entrance.service.in Makefile + $(AM_V_at)rm -f $@ + $(pc_verbose)$(sed_process) + +endif diff --git a/data/entrance.service.in b/data/entrance.service.in index 8520dbb..9ea3788 100644 --- a/data/entrance.service.in +++ b/data/entrance.service.in @@ -6,7 +6,7 @@ After=systemd-user-sessions.service Environment="LD_LIBRARY_PATH=@prefix@/lib" "PATH=$PATH:@prefix@/bin" -ExecStart=@prefix@/sbin/entrance --nodaemon +ExecStart=@SBINDIR@/entrance --nodaemon Restart= always [Install]