2013-08-04 13:56:23 +02:00
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME = "systemd"
2013-09-13 20:40:18 +03:00
PKG_VERSION = "207"
2013-08-04 13:56:23 +02:00
PKG_REV = "1"
PKG_ARCH = "any"
PKG_LICENSE = "GPL"
PKG_SITE = "http://www.freedesktop.org/wiki/Software/systemd"
PKG_URL = " http://www.freedesktop.org/software/systemd/ $PKG_NAME - $PKG_VERSION .tar.xz "
PKG_DEPENDS = "dbus kmod util-linux glib libgcrypt"
2013-08-06 00:50:34 +02:00
PKG_BUILD_DEPENDS_TARGET = "toolchain attr libcap dbus:bootstrap kmod util-linux glib libgcrypt"
2013-08-04 13:56:23 +02:00
PKG_PRIORITY = "required"
PKG_SECTION = "system"
PKG_SHORTDESC = "systemd: a system and session manager"
PKG_LONGDESC = "systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit."
PKG_IS_ADDON = "no"
PKG_AUTORECONF = "yes"
# libgcrypt is needed actually only for autoreconf
PKG_DEPENDS = " $PKG_DEPENDS libgcrypt "
PKG_BUILD_DEPENDS = " $PKG_BUILD_DEPENDS libgcrypt "
# TODO: use cpp directly to avoid using 'gcc -E' in Makefiles
# export CPP=${TARGET_PREFIX}cpp
PKG_CONFIGURE_OPTS_TARGET = " ac_cv_func_malloc_0_nonnull=yes \
--disable-nls \
--disable-gtk-doc \
--disable-gtk-doc-html \
--disable-gtk-doc-pdf \
--disable-coverage \
--enable-kmod \
--enable-blkid \
--disable-ima \
--disable-chkconfig \
--disable-selinux \
--disable-xz \
--disable-tcpwrap \
--disable-pam \
--disable-acl \
2013-09-13 20:40:18 +03:00
--disable-xattr \
2013-08-04 13:56:23 +02:00
--disable-smack \
--disable-gcrypt \
--disable-audit \
--disable-libcryptsetup \
--disable-qrencode \
--disable-microhttpd \
--disable-binfmt \
--disable-vconsole \
--disable-readahead \
--disable-bootchart \
--disable-quotacheck \
--enable-tmpfiles \
--disable-randomseed \
--enable-logind \
2013-09-13 20:40:18 +03:00
--disable-backlight \
2013-08-04 13:56:23 +02:00
--disable-machined \
--enable-hostnamed \
--enable-timedated \
--disable-localed \
--disable-coredump \
--disable-polkit \
--disable-efi \
--disable-myhostname \
--enable-gudev \
--disable-manpages \
--disable-tests \
--without-python \
2013-09-13 20:40:18 +03:00
--disable-python-devel \
2013-08-04 13:56:23 +02:00
--enable-split-usr \
--with-firmware-path= /storage/.config/firmware:/lib/firmware \
--with-sysvinit-path= \
--with-sysvrcnd-path= \
--with-tty-gid= 5 \
2013-08-28 15:38:51 +03:00
--with-rootprefix= \
2013-08-04 13:56:23 +02:00
--with-rootlibdir= /lib"
p r e _ m a k e _ t a r g e t ( ) {
# dont build parallel
MAKEFLAGS = -j1
}
p o s t _ m a k e i n s t a l l _ t a r g e t ( ) {
2013-08-13 01:28:32 +02:00
# remove unneeded stuff
rm -rf $INSTALL /etc/systemd/system
2013-09-13 20:40:18 +03:00
rm -rf $INSTALL /usr/share/zsh
2013-08-13 01:28:32 +02:00
2013-08-08 03:43:08 +02:00
# replace systemd-machine-id-setup with ours
mkdir -p $INSTALL /bin
rm -rf $INSTALL /bin/systemd-machine-id-setup
cp $PKG_DIR /scripts/systemd-machine-id-setup $INSTALL /bin
2013-08-08 04:00:57 +02:00
# copy openelec helper scripts
2013-08-24 22:07:01 +02:00
mkdir -p $INSTALL /usr/lib/openelec
cp $PKG_DIR /scripts/openelec-userconfig $INSTALL /usr/lib/openelec/
2013-08-08 04:00:57 +02:00
2013-08-04 15:38:57 +02:00
# provide 'halt', 'shutdown', 'reboot' & co.
mkdir -p $INSTALL /sbin
ln -sf /bin/systemctl $INSTALL /sbin/halt
ln -sf /bin/systemctl $INSTALL /sbin/poweroff
ln -sf /bin/systemctl $INSTALL /sbin/reboot
ln -sf /bin/systemctl $INSTALL /sbin/runlevel
ln -sf /bin/systemctl $INSTALL /sbin/shutdown
ln -sf /bin/systemctl $INSTALL /sbin/telinit
mkdir -p $INSTALL /usr/sbin
ln -sf /bin/systemctl $INSTALL /usr/sbin/halt
ln -sf /bin/systemctl $INSTALL /usr/sbin/poweroff
ln -sf /bin/systemctl $INSTALL /usr/sbin/reboot
ln -sf /bin/systemctl $INSTALL /usr/sbin/runlevel
ln -sf /bin/systemctl $INSTALL /usr/sbin/shutdown
ln -sf /bin/systemctl $INSTALL /usr/sbin/telinit
2013-08-04 13:56:23 +02:00
# remove Network adaper renaming rule, this is confusing
rm -rf $INSTALL /lib/udev/rules.d/80-net-name-slot.rules
# remove debug-shell.service, we install our own
rm -rf $INSTALL /lib/systemd/system/debug-shell.service
2013-08-16 21:24:33 +02:00
# remove some generators we never use
rm -rf $INSTALL /lib/systemd/system-generators/systemd-fstab-generator
2013-08-04 13:56:23 +02:00
# remove getty units, we dont want a console
rm -rf $INSTALL /lib/systemd/system/autovt@.service
rm -rf $INSTALL /lib/systemd/system/console-getty.service
rm -rf $INSTALL /lib/systemd/system/console-shell.service
rm -rf $INSTALL /lib/systemd/system/getty@.service
rm -rf $INSTALL /lib/systemd/system/getty.target
rm -rf $INSTALL /lib/systemd/system/multi-user.target.wants/getty.target
2013-08-05 20:11:52 +02:00
# remove rootfs fsck
rm -rf $INSTALL /lib/systemd/system/systemd-fsck-root.service
rm -rf $INSTALL /lib/systemd/system/local-fs.target.wants/systemd-fsck-root.service
2013-08-04 13:56:23 +02:00
mkdir -p $INSTALL /usr/config
2013-08-13 01:28:32 +02:00
cp -PR $PKG_DIR /config/* $INSTALL /usr/config
rm -rf $INSTALL /etc/systemd/system
ln -sf /storage/.config/system.d $INSTALL /etc/systemd/system
rm -rf $INSTALL /etc/modules-load.d
ln -sf /storage/.config/modules-load.d $INSTALL /etc/modules-load.d
rm -rf $INSTALL /etc/sysctl.d
ln -sf /storage/.config/sysctl.d $INSTALL /etc/sysctl.d
rm -rf $INSTALL /etc/tmpfiles.d
ln -sf /storage/.config/tmpfiles.d $INSTALL /etc/tmpfiles.d
2013-08-04 13:56:23 +02:00
}
p o s t _ i n s t a l l ( ) {
2013-08-27 12:31:17 +02:00
add_user systemd-journal-gateway x 191 191 "Journal Gateway" "/" "/bin/sh"
add_group systemd-journal 190
add_group systemd-journal-gateway 191
2013-08-04 13:56:23 +02:00
add_group audio 63
add_group cdrom 11
add_group dialout 18
add_group disk 6
add_group floppy 19
add_group kmem 9
add_group lp 7
add_group tape 33
add_group tty 5
add_group video 39
add_group utmp 22
2013-08-08 03:43:08 +02:00
enable_service machine-id.service
2013-08-11 00:25:22 +02:00
enable_service debugconfig.service
2013-08-08 04:00:57 +02:00
enable_service userconfig.service
2013-08-04 13:56:23 +02:00
}