xref: /openbmc/openbmc/poky/meta/recipes-core/sysvinit/sysvinit/install.patch (revision 8460358c3d24c71d9d38fd126c745854a6301564)
1From f73a2c768687f3fed0ab570f47fa2157e5d4e586 Mon Sep 17 00:00:00 2001
2From: Qing He <qing.he@intel.com>
3Date: Fri, 18 Jun 2010 09:40:30 +0800
4Subject: [PATCH] sysvinit: upgrade to version 2.88dsf
5
6Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/13]
7---
8 src/Makefile | 37 ++++++++++++++++++++++---------------
9 1 file changed, 22 insertions(+), 15 deletions(-)
10
11diff --git a/src/Makefile b/src/Makefile
12index 21cbb2e..0210171 100644
13--- a/src/Makefile
14+++ b/src/Makefile
15@@ -80,7 +80,14 @@ else
16   INSTALL_DATA	= install -m 644
17 endif
18 INSTALL_DIR	= install -m 755 -d
19-MANDIR		= /usr/share/man
20+
21+ROOT         ?=
22+base_bindir  ?= /bin
23+base_sbindir ?= /sbin
24+bindir       ?= /usr/bin
25+sysconfdir   ?= /etc
26+includedir   ?= /usr/include
27+mandir       ?= /usr/share/man
28
29 ifeq ($(WITH_SELINUX),yes)
30   SELINUX_DEF	=  -DWITH_SELINUX
31@@ -196,31 +203,31 @@ clobber:	cleanobjs
32 distclean:	clobber
33
34 install:	all
35-		$(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/
36-		$(INSTALL_DIR) $(ROOT)/usr/bin/
37+		$(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/
38+		$(INSTALL_DIR) $(ROOT)$(bindir)/
39 		for i in $(BIN); do \
40-			$(INSTALL_EXEC) $$i $(ROOT)/bin/ ; \
41+			$(INSTALL_EXEC) $$i $(ROOT)$(base_bindir)/ ; \
42 		done
43 		for i in $(SBIN); do \
44-			$(INSTALL_EXEC) $$i $(ROOT)/sbin/ ; \
45+			$(INSTALL_EXEC) $$i $(ROOT)$(base_sbindir)/ ; \
46 		done
47 		for i in $(USRBIN); do \
48-			$(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
49+			$(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \
50 		done
51 		# $(INSTALL_DIR) $(ROOT)/etc/
52 		$(INSTALL_DIR) $(ROOT)/etc/inittab.d
53 		# $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/
54-		ln -sf halt $(ROOT)/sbin/reboot
55-		ln -sf halt $(ROOT)/sbin/poweroff
56-		ln -sf init $(ROOT)/sbin/telinit
57-		ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
58-		if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
59-			ln -sf last $(ROOT)/usr/bin/lastb; \
60+		ln -sf halt $(ROOT)$(base_sbindir)/reboot
61+		ln -sf halt $(ROOT)$(base_sbindir)/poweroff
62+		ln -sf init $(ROOT)$(base_sbindir)/telinit
63+		ln -sf $(base_sbindir)/killall5 $(ROOT)$(base_bindir)/pidof
64+		if [ ! -f $(ROOT)$(bindir)/lastb ]; then \
65+			ln -sf last $(ROOT)$(bindir)/lastb; \
66 		fi
67-		$(INSTALL_DIR) $(ROOT)/usr/include/
68-		$(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
69+		$(INSTALL_DIR) $(ROOT)$(includedir)/
70+		$(INSTALL_DATA) initreq.h $(ROOT)$(includedir)/
71 		for man in $(MANPAGES) ; do \
72-		    targetdir=$(ROOT)$(MANDIR)/$$(dirname $$man)/man$${man##*.}; \
73+		    targetdir=$(ROOT)$(mandir)/$$(dirname $$man)/man$${man##*.}; \
74 		    $(INSTALL_DIR) $$targetdir; \
75 		    $(INSTALL_DATA) ../man/$$man $$targetdir/$$(basename $$man); \
76 		    sed -i "1{ $(MANDB); }" $$targetdir/$$(basename $$man); \
77--
782.25.1
79
80