summaryrefslogtreecommitdiff
path: root/packages/sysvinit/sysvinit-2.86/install.patch
blob: 01c1367c0356666f57f15cf9cc631b04055238fa (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

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- sysvinit-2.85/src/Makefile~install
+++ sysvinit-2.85/src/Makefile
@@ -47,7 +47,15 @@
 BIN_GROUP	= root
 BIN_COMBO	= $(BIN_OWNER):$(BIN_GROUP)
 INSTALL		= install -o $(BIN_OWNER) -g $(BIN_GROUP)
-MANDIR		= /usr/share/man
+
+ROOT       =
+bindir     = /bin
+sbindir    = /sbin
+usrbindir  = /usr/bin
+usrbindir  = /usr/bin
+includedir = /usr/include
+mandir	   = /usr/share/man
+
 
 # Additional libs for GNU libc.
 ifneq ($(wildcard /usr/lib/libcrypt.a),)
@@ -110,32 +118,39 @@
 distclean:	clobber
 
 install:
+		install -d $(ROOT)$(bindir)
 		for i in $(BIN); do \
-			$(INSTALL) -m 755 $$i $(ROOT)/bin/; \
+			$(INSTALL) -m 755 $$i $(ROOT)$(bindir)/; \
 		done
+		install -d $(ROOT)$(sbindir)
 		for i in $(SBIN); do \
-			$(INSTALL) -m 755 $$i $(ROOT)/sbin/; \
+			$(INSTALL) -m 755 $$i $(ROOT)$(sbindir)/; \
 		done
+		install -d $(ROOT)$(usrbindir)
 		for i in $(USRBIN); do \
-			$(INSTALL) -m 755 $$i $(ROOT)/usr/bin/; \
+			$(INSTALL) -m 755 $$i $(ROOT)$(usrbindir)/; \
 		done
 		# $(INSTALL) -m 755 etc/initscript.sample $(ROOT)/etc/
-		ln -sf halt $(ROOT)/sbin/reboot
-		ln -sf halt $(ROOT)/sbin/poweroff
-		ln -sf init $(ROOT)/sbin/telinit
-		ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
-		if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
-			ln -sf last $(ROOT)/usr/bin/lastb; \
+		ln -sf halt $(ROOT)$(sbindir)/reboot
+		ln -sf halt $(ROOT)$(sbindir)/poweroff
+		ln -sf init $(ROOT)$(sbindir)/telinit
+		ln -sf ../sbin/killall5 $(ROOT)$(bindir)/pidof
+		if [ ! -f $(ROOT)$(usrbindir)/lastb ]; then \
+			ln -sf last $(ROOT)$(usrbindir)/lastb; \
 		fi
-		$(INSTALL) -m 644 initreq.h $(ROOT)/usr/include/
+		install -d $(ROOT)$(includedir)
+		$(INSTALL) -m 644 initreq.h $(ROOT)$(includedir)/
+		install -d $(ROOT)$(mandir)/man1 \
+			   $(ROOT)$(mandir)/man5 \
+			   $(ROOT)$(mandir)/man8
 		for i in $(MAN1); do \
-			$(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man1/; \
+			$(INSTALL) -m 644 ../man/$$i $(ROOT)$(mandir)/man1/; \
 		done
 		for i in $(MAN5); do \
-			$(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man5/; \
+			$(INSTALL) -m 644 ../man/$$i $(ROOT)$(mandir)/man5/; \
 		done
 		for i in $(MAN8); do \
-			$(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man8/; \
+			$(INSTALL) -m 644 ../man/$$i $(ROOT)$(mandir)/man8/; \
 		done
 ifeq ($(ROOT),)
 		#