/[gentoo-x86]/sys-apps/systemd/systemd-43.ebuild
Gentoo

Contents of /sys-apps/systemd/systemd-43.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Apr 5 11:15:27 2012 UTC (2 years, 5 months ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump wrt bug #376047.

(Portage version: 2.2.0_alpha99_p2/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-43.ebuild,v 1.3 2012/04/04 04:09:02 mgorny Exp $
4
5 EAPI=4
6
7 inherit autotools-utils bash-completion-r1 linux-info pam systemd
8
9 DESCRIPTION="System and service manager for Linux"
10 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
11 SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="acl audit cryptsetup gtk lzma pam plymouth selinux tcpd"
17
18 # Vala-0.10 doesn't work with libnotify 0.7.1
19 VALASLOT="0.14"
20 # A little higher than upstream requires
21 # but I had real trouble with 2.6.37 and systemd.
22 MINKV="2.6.38"
23
24 # dbus version because of systemd units
25 # sysvinit for sulogin
26 RDEPEND=">=sys-apps/dbus-1.4.10
27 >=sys-apps/kmod-5
28 sys-apps/sysvinit
29 >=sys-apps/util-linux-2.19
30 >=sys-fs/udev-172
31 sys-libs/libcap
32 acl? ( sys-apps/acl )
33 audit? ( >=sys-process/audit-2 )
34 cryptsetup? ( sys-fs/cryptsetup )
35 gtk? (
36 dev-libs/dbus-glib
37 >=dev-libs/glib-2.26
38 dev-libs/libgee:0
39 x11-libs/gtk+:2
40 >=x11-libs/libnotify-0.7
41 !sys-apps/systemd-ui )
42 lzma? ( app-arch/xz-utils )
43 pam? ( virtual/pam )
44 plymouth? ( sys-boot/plymouth )
45 selinux? ( sys-libs/libselinux )
46 tcpd? ( sys-apps/tcp-wrappers )"
47
48 DEPEND="${RDEPEND}
49 app-arch/xz-utils
50 app-text/docbook-xsl-stylesheets
51 dev-libs/libxslt
52 dev-util/gperf
53 dev-util/intltool
54 gtk? ( dev-lang/vala:${VALASLOT} )
55 >=sys-kernel/linux-headers-${MINKV}"
56
57 # Due to vala being broken.
58 AUTOTOOLS_IN_SOURCE_BUILD=1
59
60 pkg_setup() {
61 enewgroup lock # used by var-lock.mount
62 enewgroup tty 5 # used by mount-setup for /dev/pts
63 }
64
65 src_prepare() {
66 # Force the rebuild of .vala sources
67 touch src/*.vala || die
68
69 # Fix hardcoded path in .vala.
70 sed -i -e 's:/lib/systemd:/usr/lib/systemd:g' src/*.vala || die
71
72 autotools-utils_src_prepare
73 }
74
75 src_configure() {
76 local myeconfargs=(
77 --with-distro=gentoo
78 # install everything to /usr
79 --with-rootprefix=/usr
80 --with-rootlibdir=/usr/$(get_libdir)
81 # but pam modules have to lie in /lib*
82 --with-pamlibdir=/$(get_libdir)/security
83 --localstatedir=/var
84 # make sure we get /bin:/sbin in $PATH
85 --enable-split-usr
86 $(use_enable acl)
87 $(use_enable audit)
88 $(use_enable cryptsetup libcryptsetup)
89 $(use_enable gtk)
90 $(use_enable lzma xz)
91 $(use_enable pam)
92 $(use_enable plymouth)
93 $(use_enable selinux)
94 $(use_enable tcpd tcpwrap)
95 )
96
97 if use gtk; then
98 export VALAC="$(type -p valac-${VALASLOT})"
99 fi
100
101 autotools-utils_src_configure
102 }
103
104 src_install() {
105 autotools-utils_src_install \
106 bashcompletiondir=/tmp
107
108 # compat for init= use
109 dosym ../usr/lib/systemd/systemd /bin/systemd
110 dosym ../lib/systemd/systemd /usr/bin/systemd
111 # rsyslog.service depends on it...
112 dosym ../usr/bin/systemctl /bin/systemctl
113
114 # move files as necessary
115 newbashcomp "${D}"/tmp/systemd-bash-completion.sh ${PN}
116 rm -r "${D}"/tmp || die
117
118 # we just keep sysvinit tools, so no need for the mans
119 rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
120 || die
121 rm "${D}"/usr/share/man/man1/init.1 || die
122
123 # Create /run/lock as required by new baselay/OpenRC compat.
124 insinto /usr/lib/tmpfiles.d
125 doins "${FILESDIR}"/gentoo-run.conf
126
127 # Migration helpers.
128 exeinto /usr/libexec/systemd
129 doexe "${FILESDIR}"/update-etc-systemd-symlinks.sh
130 systemd_dounit "${FILESDIR}"/update-etc-systemd-symlinks.{service,path}
131 systemd_enable_service sysinit.target update-etc-systemd-symlinks.path
132 }
133
134 pkg_preinst() {
135 local CONFIG_CHECK="~AUTOFS4_FS ~CGROUPS ~DEVTMPFS ~FANOTIFY ~IPV6"
136 kernel_is -ge ${MINKV//./ } || ewarn "Kernel version at least ${MINKV} required"
137 check_extra_config
138 }
139
140 optfeature() {
141 elog " [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1} (${2})"
142 }
143
144 pkg_postinst() {
145 mkdir -p "${ROOT}"/run || ewarn "Unable to mkdir /run, this could mean trouble."
146 if [[ ! -L "${ROOT}"/etc/mtab ]]; then
147 ewarn "Upstream suggests that the /etc/mtab file should be a symlink to /proc/mounts."
148 ewarn "It is known to cause users being unable to unmount user mounts. If you don't"
149 ewarn "require that specific feature, please call:"
150 ewarn " $ ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'"
151 ewarn
152 fi
153
154 elog "You may need to perform some additional configuration for some programs"
155 elog "to work, see the systemd manpages for loading modules and handling tmpfiles:"
156 elog " $ man modules-load.d"
157 elog " $ man tmpfiles.d"
158 elog
159
160 elog "To get additional features, a number of optional runtime dependencies may"
161 elog "be installed:"
162 optfeature 'dev-python/dbus-python' 'for systemd-analyze'
163 optfeature 'dev-python/pycairo[svg]' 'for systemd-analyze plotting ability'
164 elog
165
166 ewarn "Please note this is a work-in-progress and many packages in Gentoo"
167 ewarn "do not supply systemd unit files yet. You are testing it on your own"
168 ewarn "responsibility. Please remember than you can pass:"
169 ewarn " init=/sbin/init"
170 ewarn "to your kernel to boot using sysvinit / OpenRC."
171
172 # Don't run it if we're outta /
173 if [[ ! ${ROOT%/} ]]; then
174 # Update symlinks to moved units.
175 sh "${FILESDIR}"/update-etc-systemd-symlinks.sh
176
177 # Try to start migration unit.
178 ebegin "Trying to start migration helper path monitoring."
179 systemctl --system start update-etc-systemd-symlinks.path 2>/dev/null
180 eend ${?}
181 fi
182 }

  ViewVC Help
Powered by ViewVC 1.1.20