2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-03-23 16:49:52 +01:00
|
|
|
#
|
|
|
|
# systemd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2014-03-27 10:51:57 +01:00
|
|
|
SYSTEMD_VERSION = 212
|
2012-03-23 16:49:52 +01:00
|
|
|
SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/
|
2012-04-04 16:46:59 +02:00
|
|
|
SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz
|
2014-03-27 10:51:57 +01:00
|
|
|
SYSTEMD_LICENSE = LGPLv2.1+; GPLv2+ for udev; MIT-like license for few source files listed in README
|
2014-03-02 20:20:56 +01:00
|
|
|
SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 LICENSE.MIT
|
2012-05-20 12:52:49 +02:00
|
|
|
SYSTEMD_INSTALL_STAGING = YES
|
2012-03-23 16:49:52 +01:00
|
|
|
SYSTEMD_DEPENDENCIES = \
|
|
|
|
host-intltool \
|
|
|
|
libcap \
|
2014-02-07 14:21:34 +01:00
|
|
|
util-linux \
|
2014-03-02 16:14:21 +01:00
|
|
|
kmod \
|
|
|
|
host-gperf
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2014-05-15 19:37:05 +02:00
|
|
|
SYSTEMD_PROVIDES = udev
|
|
|
|
|
2012-03-23 16:49:52 +01:00
|
|
|
# Make sure that systemd will always be built after busybox so that we have
|
|
|
|
# a consistent init setup between two builds
|
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_DEPENDENCIES += busybox
|
2012-03-23 16:49:52 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
SYSTEMD_CONF_OPT += \
|
2014-02-07 14:21:34 +01:00
|
|
|
--with-rootprefix= \
|
|
|
|
--with-rootlibdir=/lib \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--enable-static=no \
|
|
|
|
--disable-manpages \
|
2012-03-23 16:49:52 +01:00
|
|
|
--disable-selinux \
|
|
|
|
--disable-pam \
|
|
|
|
--disable-libcryptsetup \
|
|
|
|
--with-dbuspolicydir=/etc/dbus-1/system.d \
|
|
|
|
--with-dbussessionservicedir=/usr/share/dbus-1/services \
|
|
|
|
--with-dbussystemservicedir=/usr/share/dbus-1/system-services \
|
|
|
|
--with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
|
2014-02-07 14:21:34 +01:00
|
|
|
--with-firmware-path=/lib/firmware \
|
|
|
|
--enable-split-usr \
|
|
|
|
--enable-introspection=no \
|
|
|
|
--disable-efi \
|
|
|
|
--disable-myhostname \
|
|
|
|
--disable-tcpwrap \
|
|
|
|
--disable-tests \
|
2014-03-17 15:25:42 +01:00
|
|
|
--disable-dbus \
|
2014-02-07 14:21:34 +01:00
|
|
|
--without-python
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2014-04-14 11:25:36 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_COMPAT),y)
|
|
|
|
SYSTEMD_CONF_OPT += --enable-compat-libs
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPT += --disable-compat-libs
|
|
|
|
endif
|
|
|
|
|
2012-03-23 16:49:52 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ACL),y)
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_CONF_OPT += --enable-acl
|
|
|
|
SYSTEMD_DEPENDENCIES += acl
|
2012-03-23 16:49:52 +01:00
|
|
|
else
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_CONF_OPT += --disable-acl
|
2012-03-23 16:49:52 +01:00
|
|
|
endif
|
|
|
|
|
2014-02-07 14:21:34 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
|
|
|
|
SYSTEMD_CONF_OPT += --enable-gudev
|
|
|
|
SYSTEMD_DEPENDENCIES += libglib2
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPT += --disable-gudev
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += \
|
|
|
|
xz \
|
|
|
|
libgcrypt
|
|
|
|
SYSTEMD_CONF_OPT += \
|
|
|
|
--enable-xz \
|
|
|
|
--enable-gcrypt \
|
|
|
|
--with-libgcrypt-prefix=$(STAGING_DIR)/usr
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPT += \
|
|
|
|
--disable-xz \
|
|
|
|
--disable-gcrypt
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += libmicrohttpd
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPT += --disable-microhttpd
|
2012-04-04 16:46:59 +02:00
|
|
|
endif
|
|
|
|
|
2014-03-17 15:25:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
|
|
|
|
SYSTEMD_CONF_OPT += --enable-networkd
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPT += --disable-networkd
|
|
|
|
endif
|
|
|
|
|
2012-03-31 23:57:35 +02:00
|
|
|
# mq_getattr needs -lrt
|
|
|
|
SYSTEMD_MAKE_OPT += LIBS=-lrt
|
2012-04-04 16:46:59 +02:00
|
|
|
SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl
|
2012-03-31 23:57:35 +02:00
|
|
|
|
2012-03-23 16:49:52 +01:00
|
|
|
define SYSTEMD_INSTALL_INIT_HOOK
|
2014-02-07 14:21:34 +01:00
|
|
|
ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init
|
|
|
|
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt
|
|
|
|
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff
|
|
|
|
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2014-02-07 14:21:34 +01:00
|
|
|
ln -fs ../../../lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
|
2012-03-23 16:49:52 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define SYSTEMD_INSTALL_TTY_HOOK
|
|
|
|
rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service
|
2014-02-07 14:21:34 +01:00
|
|
|
ln -fs ../../../../lib/systemd/system/serial-getty@.service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service
|
|
|
|
endef
|
|
|
|
|
|
|
|
define SYSTEMD_INSTALL_MACHINEID_HOOK
|
|
|
|
touch $(TARGET_DIR)/etc/machine-id
|
|
|
|
endef
|
|
|
|
|
|
|
|
define SYSTEMD_SANITIZE_PATH_IN_UNITS
|
|
|
|
find $(TARGET_DIR)/lib/systemd/system -name '*.service' \
|
2014-02-15 03:42:57 +01:00
|
|
|
-exec $(SED) 's,$(HOST_DIR),,g' {} \;
|
2012-03-23 16:49:52 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_INSTALL_INIT_HOOK \
|
2012-03-23 16:49:52 +01:00
|
|
|
SYSTEMD_INSTALL_TTY_HOOK \
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_INSTALL_MACHINEID_HOOK \
|
|
|
|
SYSTEMD_SANITIZE_PATH_IN_UNITS
|
|
|
|
|
|
|
|
define SYSTEMD_USERS
|
|
|
|
systemd-journal -1 systemd-journal -1 * /var/log/journal - - Journal
|
|
|
|
systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
|
|
|
|
endef
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|