Magellan Linux

Contents of /trunk/core/sysvinit/sysvinit-2.88-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12759 - (show annotations) (download)
Mon Jul 2 16:01:59 2012 UTC (11 years, 11 months ago) by niro
File size: 2817 byte(s)
-fixed typos
1 # $Id$
2
3 PNAME="sysvinit"
4 PVER="2.88"
5 PBUILD="r4"
6
7 SPLIT_PACKAGES="sysvinit-tools sysvinit"
8
9 PCAT="sys-apps"
10
11 HOMEPAGE="http://savannah.nongnu.org/projects/${PNAME}"
12
13 SRCFILE="${PNAME}-${PVER}dsf.tar.bz2"
14 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}dsf"
15
16 sminclude mtools cleanutils
17
18 SRC_URI=(
19 http://download.savannah.gnu.org/releases/${PNAME}/${SRCFILE}
20 mirror://${PNAME}/${SRCFILE}
21 mirror://${PNAME}/${PNAME}-${PVER}-makefile.patch
22 )
23
24 UP2SUBSTITUTE="dsf"
25 UP2DATE="updatecmd 'http://download.savannah.gnu.org/releases/${PNAME}?C=M;O=A' | grep ${PNAME}- | grep -v -- '.*-latest' | lasttarball"
26
27 # info: installs no inittab -> this file is in the magellan-initscripts
28
29 split_info_sysvinit-tools()
30 {
31 DESCRIPTION="The sysvinit-tools package contains various tools used for process management."
32 DEPEND=">= virtual/glibc"
33 }
34
35 split_info_sysvinit()
36 {
37 DESCRIPTION="SysV System initialization."
38 DEPEND="== sys-apps/sysvinit-tools-${PVER}"
39 }
40
41 src_prepare()
42 {
43 munpack ${SRCFILE} || die
44 cd ${SRCDIR}
45
46 # fixes a sysvinit bug
47 # see: http://savannah.nongnu.org/bugs/index.php?29758
48 mpatch ${PNAME}-${PVER}-makefile.patch || die
49
50 sed -i 's@Sending processes@& started by init@g' src/init.c || die
51 }
52
53 src_compile()
54 {
55 cd ${SRCDIR}
56 mmake -C src || die
57 }
58
59 src_install_sysvinit-tools()
60 {
61 cd ${SRCDIR}
62
63 # makefile wants ${ROOT} as ${DESTDIR}
64 mmake -C src ROOT=${BINDIR} install || die
65 minstalldocs COPYRIGHT README doc/* || die
66
67 # move everything to satisfy usr-move
68 mv ${BINDIR}/sbin ${BINDIR}/usr || die
69 mv ${BINDIR}/bin/* ${BINDIR}/usr/bin || die
70 mdelete -r /bin || die
71
72 zapmost ${BINDIR} \
73 usr/bin/last \
74 usr/bin/lastb \
75 usr/bin/mesg \
76 usr/bin/utmpdump \
77 usr/bin/wall \
78 usr/bin/pidof \
79 usr/sbin/killall5 \
80 usr/sbin/sulogin \
81 usr/share/man/man1 \
82 usr/share/man/man8/killall5* \
83 usr/share/man/man8/pidof* \
84 usr/share/man/man8/sulogin* \
85 usr/share/doc \
86 || die
87 }
88
89 src_install_sysvinit()
90 {
91 cd ${SRCDIR}
92
93 # makefile wants ${ROOT} as ${DESTDIR}
94 mmake -C src ROOT=${BINDIR} install || die
95 minstalldocs COPYRIGHT README doc/* || die
96
97 # move everything to satisfy usr-move
98 mv ${BINDIR}/sbin ${BINDIR}/usr || die
99 mv ${BINDIR}/bin/* ${BINDIR}/usr/bin || die
100 mdelete -r /bin || die
101
102 # cleanup
103 zapmost ${BINDIR} \
104 usr/sbin/halt \
105 usr/sbin/init \
106 usr/sbin/poweroff \
107 usr/sbin/reboot \
108 usr/sbin/runlevel \
109 usr/sbin/shutdown \
110 usr/sbin/telinit \
111 usr/include \
112 usr/share/man/man5 \
113 usr/share/man/man8/halt* \
114 usr/share/man/man8/init* \
115 usr/share/man/man8/poweroff* \
116 usr/share/man/man8/reboot* \
117 usr/share/man/man8/runlevel* \
118 usr/share/man/man8/shutdown* \
119 usr/share/man/man8/telinit* \
120 usr/share/doc \
121 || die
122 }
123
124 postinstall_sysvinit()
125 {
126 # reloading init
127 echo " Reloading init ..."
128 [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] && /sbin/init U &> /dev/null
129 }