summaryrefslogtreecommitdiff
path: root/config/Makefile.am
blob: f292ec9bc29d369ca9f33f693d282bfce295cfa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
pixmapdir = $(datadir)/pixmaps
confdir = $(sysconfdir)/gdm
localedir = $(sysconfdir)/gdm
sessdir = $(sysconfdir)/gdm/Sessions
initdir = $(sysconfdir)/gdm/Init
authdir = $(localstatedir)/gdm
gnomercdir = $(sysconfdir)

gdm.conf: gdm.conf.in Makefile
	sed -e 's,\@datadir\@,$(datadir),g' \
	    -e 's,\@pixmapdir\@,$(pixmapdir),g' \
	    -e 's,\@bindir\@,$(bindir),g' \
	    -e 's,\@sysconfdir\@,$(sysconfdir),g' \
	    -e 's,\@localedir\@,$(localedir),g' \
	    -e 's,\@authdir\@,$(authdir),g' \
	    < $(srcdir)/gdm.conf.in > gdm.conf.tmp; \
	mv -f gdm.conf.tmp gdm.conf

Gnome: Gnome.in Makefile
	sed -e 's,\@sysconfdir\@,$(sysconfdir),g' \
	    < $(srcdir)/Gnome.in > Gnome.tmp \
	    && mv -f Gnome.tmp Gnome

gnomerc: gnomerc.in Makefile
	sed -e 's,\@bindir\@,$(bindir),g' \
	    < $(srcdir)/gnomerc.in > gnomerc.tmp \
	    && mv -f gnomerc.tmp gnomerc

conf_SCRIPTS = gdm.conf
locale_SCRIPTS = locale.alias
gnomerc_SCRIPTS = gnomerc
sess_SCRIPTS = Gnome Xsession
init_SCRIPTS = Default

EXTRA_DIST = \
	gdm.conf.in \
	Gnome.in \
	gnomerc.in \
	Xsession \
	gdm \
	locale.alias \
	Default

install-data-hook: gdm.conf gnomerc Gnome
	if test '!' -d $(confdir); then \
		$(mkinstalldirs) $(confdir); \
		chmod 755 $(confdir); \
	fi
	if test '!' -d $(sessdir); then \
		$(mkinstalldirs) $(sessdir); \
		chmod 755 $(sessdir); \
	fi
	if test '!' -d $(initdir); then \
		$(mkinstalldirs) $(initdir); \
		chmod 755 $(initdir); \
	fi
	if test '!' -d $(authdir); then \
		$(mkinstalldirs) $(authdir); \
		chown gdm.gdm $(authdir); \
		chmod 750 $(authdir); \
	fi

	system=`uname`; \
	if test -f /usr/include/security/pam_appl.h; then \
	  if test '!' -d $(sysconfdir)/pam.d; then \
		$(mkinstalldirs) $(sysconfdir)/pam.d; \
		chmod 755 $(sysconfdir)/pam.d; \
	   fi; \
	   if test $$system = Linux && test '!' -f $(sysconfdir)/pam.d/gdm; then \
		$(INSTALL_DATA) gdm $(sysconfdir)/pam.d/gdm; \
	   fi; \
	   if test $$system = SunOS; then \
		echo "Please add PAM authentication for gdm in $(sysconfdir)/pam.conf!"; \
	   fi; \
	fi