mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-09 17:59:26 +00:00
0c1147ad8d
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
127 lines
4.5 KiB
BlitzBasic
127 lines
4.5 KiB
BlitzBasic
DESCRIPTION = "Systemd a init replacement"
|
|
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
|
|
LICENSE = "GPLv2+"
|
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
|
|
|
|
DEPENDS = "docbook-sgml-dtd-4.1-native gperf-native acl readline udev dbus libcap libcgroup tcp-wrappers"
|
|
DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
|
|
|
SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
|
|
|
|
SECTION = "base/shell"
|
|
|
|
inherit gitpkgv
|
|
PKGV = "v${GITPKGVTAG}"
|
|
|
|
PV = "git"
|
|
PR = "r6"
|
|
|
|
inherit useradd pkgconfig autotools vala perlnative
|
|
|
|
SRCREV = "f6cebb3bd5a00d79c8131637c0f6796a75e6af99"
|
|
|
|
SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \
|
|
file://0001-disable-xsltproc-completely.patch \
|
|
${UCLIBCPATCHES} \
|
|
"
|
|
UCLIBCPATCHES = ""
|
|
UCLIBCPATCHES_libc-uclibc = "file://paper-over-mkostemp.patch \
|
|
file://format-replace-m-uclibc.patch \
|
|
"
|
|
|
|
LDFLAGS_libc-uclibc_append = " -lrt"
|
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
SYSTEMDDISTRO ?= "debian"
|
|
SYSTEMDDISTRO_angstrom = "angstrom"
|
|
|
|
# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
|
|
EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
|
|
--with-rootdir=${base_prefix} \
|
|
${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
|
|
--disable-gtk \
|
|
"
|
|
|
|
# There's no docbook-xsl-native, so for the xsltproc check to false
|
|
do_configure_prepend() {
|
|
sed -i /xsltproc/d configure.ac
|
|
}
|
|
|
|
do_install() {
|
|
autotools_do_install
|
|
# provided by a seperate recipe
|
|
rm ${D}${base_libdir}/systemd/system/serial-getty* -f
|
|
|
|
# provide support for initramfs
|
|
ln -s ${base_bindir}/systemd ${D}/init
|
|
}
|
|
|
|
PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs"
|
|
|
|
USERADD_PACKAGES = "${PN}"
|
|
GROUPADD_PARAM_${PN} = "-r lock"
|
|
|
|
FILES_${PN}-initramfs = "/init"
|
|
RDEPENDS_${PN}-initramfs = "${PN}"
|
|
|
|
FILES_${PN}-gui = "${bindir}/systemadm"
|
|
|
|
FILES_${PN}-vconsole-setup = "${base_libdir}/systemd/systemd-vconsole-setup \
|
|
${base_libdir}/systemd/system/systemd-vconsole-setup.service \
|
|
${base_libdir}/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service"
|
|
|
|
FILES_${PN} += " ${base_bindir}/* \
|
|
${datadir}/dbus-1/services \
|
|
${datadir}/dbus-1/system-services \
|
|
${datadir}/polkit-1 \
|
|
${datadir}/${PN} \
|
|
${sysconfdir} \
|
|
${base_libdir}/systemd/* \
|
|
${base_libdir}/systemd/system/* \
|
|
${base_libdir}/udev/rules.d \
|
|
${base_libdir}/security/*.so \
|
|
/cgroup \
|
|
${bindir}/systemd* \
|
|
${libdir}/tmpfiles.d/*.conf \
|
|
${libdir}/systemd \
|
|
"
|
|
|
|
FILES_${PN}-dbg += "${base_libdir}/systemd/.debug ${base_libdir}/systemd/*/.debug ${base_libdir}/security/.debug/"
|
|
FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/"
|
|
|
|
RDEPENDS_${PN} += "dbus-systemd udev-systemd"
|
|
|
|
# kbd -> loadkeys,setfont
|
|
# systemd calls 'modprobe -sab --', which busybox doesn't support due to lack
|
|
# of blacklist support, so use proper modprobe from module-init-tools
|
|
# And pull in the kernel modules mentioned in INSTALL
|
|
# swapon -p is also not supported by busybox
|
|
RRECOMMENDS_${PN} += "kbd kbd-consolefonts \
|
|
systemd-serialgetty \
|
|
util-linux-agetty \
|
|
util-linux-swaponoff \
|
|
util-linux-fsck e2fsprogs-e2fsck \
|
|
module-init-tools \
|
|
kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
|
|
"
|
|
|
|
# TODO:
|
|
# u-a for runlevel and telinit
|
|
|
|
pkg_postinst_systemd () {
|
|
update-alternatives --install ${base_sbindir}/init init ${base_bindir}/systemd 300
|
|
update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300
|
|
update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
|
|
update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
|
|
update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
|
|
}
|
|
|
|
pkg_prerm_systemd () {
|
|
update-alternatives --remove init ${base_bindir}/systemd
|
|
update-alternatives --remove halt ${base_bindir}/systemctl
|
|
update-alternatives --remove reboot ${base_bindir}/systemctl
|
|
update-alternatives --remove shutdown ${base_bindir}/systemctl
|
|
update-alternatives --remove poweroff ${base_bindir}/systemctl
|
|
}
|