summaryrefslogtreecommitdiffstats
path: root/meta-systemd/recipes-core/systemd/systemd_git.bb
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2012-07-11 13:24:32 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2012-07-16 09:39:05 +0200
commita5b2aea321b2851ed82828e6204c075a2329059c (patch)
tree06c57ad79e5cdcb0b8b62bb6e910c29c379fac8c /meta-systemd/recipes-core/systemd/systemd_git.bb
parent5ed19733f5193b752da650841a1383adb532fffd (diff)
downloadmeta-openembedded-a5b2aea321b2851ed82828e6204c075a2329059c.tar.gz
move systemd recipes to meta-systemd
Diffstat (limited to 'meta-systemd/recipes-core/systemd/systemd_git.bb')
-rw-r--r--meta-systemd/recipes-core/systemd/systemd_git.bb156
1 files changed, 156 insertions, 0 deletions
diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
new file mode 100644
index 000000000..f4ca72a12
--- /dev/null
+++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
@@ -0,0 +1,156 @@
1DESCRIPTION = "Systemd a init replacement"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
5
6DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline udev dbus libcap libcgroup tcp-wrappers"
7DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
8
9SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
10
11SECTION = "base/shell"
12
13inherit gitpkgv
14PKGV = "v${GITPKGVTAG}"
15
16PV = "git"
17PR = "r27"
18
19inherit useradd pkgconfig autotools vala perlnative
20
21SRCREV = "3eff4208ffecedd778fec260f0d4b18e94dab443"
22
23SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
24 ${UCLIBCPATCHES} \
25 "
26UCLIBCPATCHES = ""
27UCLIBCPATCHES_libc-uclibc = "file://paper-over-mkostemp.patch \
28 file://format-replace-m-uclibc.patch \
29 "
30
31LDFLAGS_libc-uclibc_append = " -lrt"
32
33S = "${WORKDIR}/git"
34
35SYSTEMDDISTRO ?= "debian"
36SYSTEMDDISTRO_angstrom = "angstrom"
37
38# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
39EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
40 --with-rootprefix=${base_prefix} \
41 --with-rootlibdir=${base_libdir} \
42 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
43 --disable-gtk \
44 --enable-xz \
45 --disable-manpages \
46 --disable-coredump \
47 "
48
49# There's no docbook-xsl-native, so for the xsltproc check to false
50do_configure_prepend() {
51 sed -i /xsltproc/d configure.ac
52
53 # we only have /home/root, not /root
54 sed -i -e 's:=/root:=/home/root:g' units/*.service*
55}
56
57do_install() {
58 autotools_do_install
59 # provided by a seperate recipe
60 rm ${D}${systemd_unitdir}/system/serial-getty* -f
61
62 # provide support for initramfs
63 ln -s ${systemd_unitdir}/systemd ${D}/init
64
65 # create dir for journal
66 install -d ${D}${localstatedir}/log/journal
67
68 # create machine-id
69 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
70 touch ${D}${sysconfdir}/machine-id
71}
72
73python populate_packages_prepend (){
74 systemdlibdir = d.getVar("base_libdir", True)
75 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
76}
77
78PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze"
79
80USERADD_PACKAGES = "${PN}"
81GROUPADD_PARAM_${PN} = "-r lock"
82
83FILES_${PN}-analyze = "${bindir}/systemd-analyze"
84RDEPENDS_${PN}-analyze = "python-dbus"
85RRECOMMENDS_${PN}-analyze = "python-pycairo"
86
87FILES_${PN}-initramfs = "/init"
88RDEPENDS_${PN}-initramfs = "${PN}"
89
90FILES_${PN}-gui = "${bindir}/systemadm"
91
92FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \
93 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
94 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
95
96RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
97
98FILES_${PN} = " ${base_bindir}/* \
99 ${datadir}/dbus-1/services \
100 ${datadir}/dbus-1/system-services \
101 ${datadir}/polkit-1 \
102 ${datadir}/${PN} \
103 ${sysconfdir} \
104 ${systemd_unitdir}/* \
105 ${systemd_unitdir}/system/* \
106 ${base_libdir}/udev/rules.d \
107 ${base_libdir}/security/*.so \
108 /cgroup \
109 ${bindir}/systemd* \
110 ${libdir}/tmpfiles.d/*.conf \
111 ${libdir}/systemd \
112 ${libdir}/binfmt.d \
113 ${libdir}/modules-load.d \
114 ${libdir}/sysctl.d \
115 ${localstatedir} \
116 ${libexecdir} \
117 "
118
119FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
120FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/"
121
122RDEPENDS_${PN} += "dbus-systemd udev-systemd"
123
124# kbd -> loadkeys,setfont
125# systemd calls 'modprobe -sab --', which busybox doesn't support due to lack
126# of blacklist support, so use proper modprobe from module-init-tools
127# And pull in the kernel modules mentioned in INSTALL
128# swapon -p is also not supported by busybox
129# busybox mount is broken
130RRECOMMENDS_${PN} += "systemd-serialgetty \
131 util-linux-agetty \
132 util-linux-swaponoff \
133 util-linux-fsck e2fsprogs-e2fsck \
134 module-init-tools \
135 util-linux-mount util-linux-umount \
136 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
137"
138
139# TODO:
140# u-a for runlevel and telinit
141
142pkg_postinst_systemd () {
143update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300
144update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300
145update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
146update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
147update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
148}
149
150pkg_prerm_systemd () {
151update-alternatives --remove init ${systemd_unitdir}/systemd
152update-alternatives --remove halt ${base_bindir}/systemctl
153update-alternatives --remove reboot ${base_bindir}/systemctl
154update-alternatives --remove shutdown ${base_bindir}/systemctl
155update-alternatives --remove poweroff ${base_bindir}/systemctl
156}