aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xprint/etc/init.d/Imakefile
blob: dedefb199de1b4559435b80a5ab18e8cc60f3770 (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
XCOMM $Xorg: Imakefile,v 1.2 2003/01/20 17:02:01 gisburn Exp $

all:: xprint

#if BuildGISWxprintglue
XPCUSTOMGLUE=GISWxprintglue
#elif BuildGISWxprint
XPCUSTOMGLUE = GISWxprint
#elif BuildDebianXprintPackage
XPCUSTOMGLUE = DebianGlue
#else
XPCUSTOMGLUE = default
#endif

#if defined(SunArchitecture)
OS_DEFINES = -DOS_SOLARIS
#elif defined(LinuxArchitecture)
OS_DEFINES = -DOS_LINUX
#elif defined(AIXArchitecture)
OS_DEFINES = -DOS_AIX
#else
OS_DEFINES = 
#endif

#if NothingOutsideProjectRoot
#define EtcDir ProjectRoot/etc
#else
#define EtcDir /etc
#endif

ETCDIR = EtcDir

MakeScriptFromCpp(xprint, -DDEF_XPCUSTOMGLUE=$(XPCUSTOMGLUE) $(OS_DEFINES) -DProjectRoot=$(PROJECTROOT))

#if defined(FreeBSDArchitecture)
InstallNamedProg(xprint,xprint,$(PROJECTROOT)/etc/rc.d)
#else
XCOMM Solaris, Linux, etc.
InstallNamedProg(xprint,xprint,$(ETCDIR)/init.d)
#endif

XCOMM Create startup/shutdown links in /etc/init.d/ for Solaris
#if defined(SunArchitecture) && (OSMajorVersion > 4)

#define InstallStartupLink(rcdir,script,linkname) \
	MakeDir($(DESTDIR)$(ETCDIR)/rcdir) ; \
	RemoveFile($(DESTDIR)$(ETCDIR)/rcdir/linkname) ; \
	ln -s ../init.d/script $(DESTDIR)$(ETCDIR)/rcdir/linkname

install::
	InstallStartupLink(rc0.d,xprint,K38xprint)
	InstallStartupLink(rc1.d,xprint,K38xprint)
	InstallStartupLink(rc2.d,xprint,S81xprint)
	InstallStartupLink(rcS.d,xprint,K38xprint)
#endif /* defined(SunArchitecture) && (OSMajorVersion > 4) */

XCOMM Create startup/shutdown links in /etc/init.d/ for Linux
#if defined(LinuxDistribution)
# if (LinuxDistribution == LinuxSuSE) || \
     (LinuxDistribution == LinuxDebian) || \
     (LinuxDistribution == LinuxUnknown)
XCOMM SuSE Linux(-like)

#define InstallStartupLink(rcdir,script,linkname) \
	MakeDir($(DESTDIR)$(ETCDIR)/rc.d/rcdir) ; \
	ln -sf ../script $(DESTDIR)$(ETCDIR)/rc.d/rcdir/linkname

install::
	echo "# Installing /etc/init.d links for SuSE Linux(-like)"
	InstallStartupLink(rc2.d,xprint,K21xprint)
	InstallStartupLink(rc2.d,xprint,S21xprint)
	InstallStartupLink(rc3.d,xprint,K21xprint)
	InstallStartupLink(rc3.d,xprint,S21xprint)
	InstallStartupLink(rc5.d,xprint,K21xprint)
	InstallStartupLink(rc5.d,xprint,S21xprint)
# elif LinuxDistribution == LinuxRedHat
XCOMM RedHat Linux(-like)

#define InstallStartupLink(rcdir,script,linkname) \
	MakeDir($(DESTDIR)$(ETCDIR)/rcdir) ; \
	ln -sf ../init.d/script $(DESTDIR)$(ETCDIR)/rcdir/linkname

install::
	echo "# Installing /etc/init.d links for RedHat Linux(-like)"
	InstallStartupLink(rc0.d,xprint,K61xprint)
	InstallStartupLink(rc1.d,xprint,K61xprint)
	InstallStartupLink(rc2.d,xprint,S61xprint)
	InstallStartupLink(rc3.d,xprint,S61xprint)
	InstallStartupLink(rc4.d,xprint,S61xprint)
	InstallStartupLink(rc5.d,xprint,S61xprint)
	InstallStartupLink(rc6.d,xprint,K61xprint)
# else
install::
	echo "WARNING: No links for /etc/init.d/xprint set."
# endif /* LinuxDistribution == * */
#endif /* defined(LinuxArchitecture) */