/[gentoo-x86]/sys-apps/sysvinit/sysvinit-2.88-r4.ebuild
Gentoo

Contents of /sys-apps/sysvinit/sysvinit-2.88-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (show annotations) (download)
Sat May 17 15:05:12 2014 UTC (4 years, 5 months ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +6 -2 lines
Fix bug #509740 - Add USE=selinux dependency to sec-policy/selinux-shutdown

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/sysvinit-2.88-r4.ebuild,v 1.20 2014/01/21 01:19:42 vapier Exp $
4
5 EAPI="4"
6
7 inherit eutils toolchain-funcs flag-o-matic
8
9 DESCRIPTION="/sbin/init - parent of all processes"
10 HOMEPAGE="http://savannah.nongnu.org/projects/sysvinit"
11 SRC_URI="mirror://nongnu/${PN}/${P}dsf.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
16 IUSE="selinux ibm static kernel_FreeBSD"
17
18 RDEPEND="
19 selinux? (
20 >=sys-libs/libselinux-1.28
21 sec-policy/selinux-shutdown
22 )
23 !>=sys-apps/util-linux-2.23"
24 DEPEND="${RDEPEND}
25 virtual/os-headers"
26
27 S=${WORKDIR}/${P}dsf
28
29 src_prepare() {
30 epatch "${FILESDIR}"/${PN}-2.86-kexec.patch #80220
31 epatch "${FILESDIR}"/${PN}-2.86-shutdown-single.patch #158615
32 epatch "${FILESDIR}"/${P}-makefile.patch #319197
33 epatch "${FILESDIR}"/${P}-selinux.patch #326697
34 sed -i '/^CPPFLAGS =$/d' src/Makefile || die
35
36 # mountpoint/sulogin/utmpdump have moved to util-linux
37 sed -i -r \
38 -e '/^(USR)?S?BIN/s:\<(mountpoint|sulogin|utmpdump)\>::g' \
39 -e '/^MAN[18]/s:\<(mountpoint|sulogin|utmpdump)[.][18]\>::g' \
40 src/Makefile || die
41
42 # Mung inittab for specific architectures
43 cd "${WORKDIR}"
44 cp "${FILESDIR}"/inittab-2.87 inittab || die "cp inittab"
45 local insert=()
46 use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
47 use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
48 use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
49 use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
50 use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
51 if use ibm ; then
52 insert+=(
53 '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
54 '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
55 )
56 fi
57 (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
58 if use kernel_FreeBSD ; then
59 sed -i \
60 -e 's/linux/cons25/g' \
61 -e 's/ttyS0/cuaa0/g' \
62 -e 's/ttyS1/cuaa1/g' \
63 inittab #121786
64 fi
65 if use x86 || use amd64 ; then
66 sed -i \
67 -e '/ttyS[01]/s:9600:115200:' \
68 inittab
69 fi
70 if [[ ${#insert[@]} -gt 0 ]] ; then
71 printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
72 fi
73 }
74
75 src_compile() {
76 local myconf
77
78 tc-export CC
79 append-lfs-flags
80 export DISTRO= #381311
81 use static && append-ldflags -static
82 use selinux && myconf=WITH_SELINUX=yes
83 emake -C src ${myconf} || die
84 }
85
86 src_install() {
87 emake -C src install ROOT="${D}"
88 dodoc README doc/*
89
90 insinto /etc
91 doins "${WORKDIR}"/inittab
92
93 doinitd "${FILESDIR}"/{reboot,shutdown}.sh
94 }
95
96 pkg_postinst() {
97 # Reload init to fix unmounting problems of / on next reboot.
98 # This is really needed, as without the new version of init cause init
99 # not to quit properly on reboot, and causes a fsck of / on next reboot.
100 if [[ ${ROOT} == / ]] ; then
101 # Do not return an error if this fails
102 /sbin/telinit U &>/dev/null
103 fi
104 }

  ViewVC Help
Powered by ViewVC 1.1.20