summaryrefslogtreecommitdiff
path: root/config/Makefile.am
blob: 999e176be1b0644f47a15bc7dca4a017cefed9a2 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
pixmapdir = $(datadir)/pixmaps
confdir = $(sysconfdir)/gdm
localedir = $(sysconfdir)/gdm
sessdir = $(sysconfdir)/gdm/Sessions
initdir = $(sysconfdir)/gdm/Init
authdir = $(localstatedir)/gdm
gnomercdir = $(sysconfdir)/gdm
postdir = $(sysconfdir)/gdm/PostSession
predir = $(sysconfdir)/gdm/PreSession


noinst_DATA = gdm.conf

EXTRA_DIST = \
	gdm.conf.in \
	Gnome.in \
	gnomerc.in \
	Xsession \
	gdm \
	locale.alias \
	Default \
	PostSession \
	PreSession \
	Default.redhat \
	XKeepsCrashing

install-data-hook: gdm.conf gnomerc Gnome
	if test '!' -d $(confdir); then \
		$(mkinstalldirs) $(confdir); \
		chmod 755 $(confdir); \
	fi
	if test '!' -f $(confdir)/gdm.conf; then \
		$(INSTALL_DATA) gdm.conf $(confdir)/gdm.conf; \
	fi
	$(INSTALL_DATA) gdm.conf $(confdir)/factory-gdm.conf

	$(INSTALL_SCRIPT) $(srcdir)/XKeepsCrashing $(confdir)/XKeepsCrashing

	-if test -f $(localedir)/locale.alias; then \
		cp $(localedir)/locale.alias $(localedir)/locale.alias.orig; \
	fi
	$(INSTALL_DATA) $(srcdir)/locale.alias $(localedir)/locale.alias

	if test '!' -d $(sessdir); then \
		$(mkinstalldirs) $(sessdir); \
		chmod 755 $(sessdir); \
	fi

	-if test -f $(sessdir)/Xsession; then \
		cp $(sessdir)/Xsession $(sessdir)/Xsession.orig; \
	fi
	$(INSTALL_SCRIPT) $(srcdir)/Xsession $(sessdir)/Xsession

	-if test -f $(sessdir)/Gnome; then \
		cp $(sessdir)/Gnome $(sessdir)/Gnome.orig; \
	fi
	$(INSTALL_SCRIPT) Gnome $(sessdir)/Gnome

	-if test -f /etc/redhat-release; then \
		if test -f $(sessdir)/Default; then \
			cp $(sessdir)/Default $(sessdir)/Default.orig; \
		fi; \
		$(INSTALL_SCRIPT) $(srcdir)/Default.redhat $(sessdir)/Default; \
	fi

	if test '!' -d $(initdir); then \
		$(mkinstalldirs) $(initdir); \
		chmod 755 $(initdir); \
	fi
	-if test -f $(initdir)/Default; then \
		cp $(initdir)/Default $(initdir)/Default.orig; \
	fi
	$(INSTALL_SCRIPT) $(srcdir)/Default $(initdir)/Default

	if test '!' -d $(predir); then \
		$(mkinstalldirs) $(predir); \
		chmod 755 $(predir); \
	fi
	-if test -f $(predir)/Default; then \
		cp $(predir)/Default $(predir)/Default.orig; \
	fi
	$(INSTALL_SCRIPT) $(srcdir)/PreSession $(predir)/Default

	if test '!' -d $(postdir); then \
		$(mkinstalldirs) $(postdir); \
		chmod 755 $(postdir); \
	fi
	-if test -f $(postdir)/Default; then \
		cp $(postdir)/Default $(postdir)/Default.orig; \
	fi
	$(INSTALL_SCRIPT) $(srcdir)/PostSession $(postdir)/Default

	if test '!' -d $(gnomercdir); then \
		$(mkinstalldirs) $(gnomercdir); \
		chmod 755 $(gnomercdir); \
	fi

	if test '!' -f $(gnomercdir)/gnomerc; then \
		$(INSTALL_SCRIPT) gnomerc $(gnomercdir)/gnomerc; \
	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 $(DESTDIR)$(PAM_PREFIX)/pam.d; then \
		$(mkinstalldirs) $(DESTDIR)$(PAM_PREFIX)/pam.d; \
		chmod 755 $(DESTDIR)$(PAM_PREFIX)/pam.d; \
	   fi; \
	   if test $$system = Linux && test '!' -f $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm; then \
		$(INSTALL_DATA) gdm $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm; \
	   fi; \
	   if test $$system = SunOS; then \
		echo "Please add PAM authentication for gdm in $(PAM_PREFIX)/pam.conf!"; \
	   fi; \
	fi