Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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