diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-08-06 20:01:40 +0200 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2012-08-06 23:24:27 -0400 |
commit | a5cca5e8c228b272a985c28411311002ba092685 (patch) | |
tree | 6f1195d26f05dae0ff870a8e00d46a656fa66bba /data/Makefile.am | |
parent | 42ef43e603d65390c2c86e276489c8a08c7808a0 (diff) | |
download | gdm-a5cca5e8c228b272a985c28411311002ba092685.tar.gz |
systemd: install a gdm.service unit file by default
https://fedoraproject.org/wiki/Features/DisplayManagerRework
Some changes by Ray Strode.
https://bugzilla.gnome.org/show_bug.cgi?id=681339
Diffstat (limited to 'data/Makefile.am')
-rw-r--r-- | data/Makefile.am | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index ffbc7684..6a44b405 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -150,6 +150,22 @@ MAINTAINERCLEANFILES = \ *~ \ Makefile.in +systemdsystemunit = + +if HAVE_SYSTEMD + +gdm.service: $(srcdir)/gdm.service.in + $(AM_V_GEN)sed \ + -e 's,[@]sbindir[@],$(sbindir),g' \ + -e 's,[@]GDM_INITIAL_VT[@],$(GDM_INITIAL_VT),g' \ + < $< > $@ +systemdsystemunit += gdm.service +CLEANFILES += gdm.service + +endif + +EXTRA_DIST += gdm.service.in + uninstall-hook: rm -f \ $(DESTDIR)$(GDM_CUSTOM_CONF) \ @@ -173,7 +189,13 @@ uninstall-hook: $(DESTDIR)$(sysconfdir)/dconf/db \ $(DESTDIR)$(sysconfdir)/dconf -install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstream-settings 00-upstream-settings-locks + if test -n "$(systemdsystemunit)"; then \ + rm -f $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/$(systemdsystemunit); \ + rmdir $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR) || : ; \ + fi + + +install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstream-settings 00-upstream-settings-locks $(systemdsystemunit) if test '!' -d $(DESTDIR)$(gdmconfdir); then \ $(mkinstalldirs) $(DESTDIR)$(gdmconfdir); \ chmod 755 $(DESTDIR)$(gdmconfdir); \ @@ -253,6 +275,13 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstr chown root:gdm $(DESTDIR)$(xauthdir) || : ; \ fi + if test -n "$(systemdsystemunit)" -a '!' -d $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR); then \ + $(mkinstalldirs) $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR); \ + chmod 0755 $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR); \ + chown root:root $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR) || : ; \ + $(INSTALL_DATA) $(builddir)/$(systemdsystemunit) $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/$(systemdsystemunit); \ + fi + if test '!' -d $(DESTDIR)$(screenshotdir); then \ $(mkinstalldirs) $(DESTDIR)$(screenshotdir); \ chmod 0755 $(DESTDIR)$(screenshotdir); \ @@ -311,3 +340,4 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstr $(INSTALL_DATA) $(srcdir)/00-upstream-settings $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d $(INSTALL_DATA) $(srcdir)/00-upstream-settings-locks $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks test -z "$(DESTDIR)" && dconf update || : + |