1 ################################################################################
5 ################################################################################
8 SYSTEMD_SITE
= $(call github
,systemd
,systemd
,v
$(SYSTEMD_VERSION
))
9 SYSTEMD_LICENSE
= LGPLv2.1
+, GPLv2
+ (udev
), Public Domain
(few source files
, see README
)
10 SYSTEMD_LICENSE_FILES
= LICENSE.GPL2 LICENSE.LGPL2.1 README
11 SYSTEMD_INSTALL_STAGING
= YES
12 SYSTEMD_DEPENDENCIES
= \
19 SYSTEMD_PROVIDES
= udev
20 SYSTEMD_AUTORECONF
= YES
22 # Make sure that systemd will always be built after busybox so that we have
23 # a consistent init setup between two builds
24 ifeq ($(BR2_PACKAGE_BUSYBOX
),y
)
25 SYSTEMD_DEPENDENCIES
+= busybox
28 SYSTEMD_CONF_OPTS
+= \
34 --disable-libcryptsetup \
35 --with-dbuspolicydir
=/etc
/dbus-1
/system.d \
36 --with-dbussessionservicedir
=/usr
/share
/dbus-1
/services \
37 --with-dbussystemservicedir
=/usr
/share
/dbus-1
/system-services \
45 SYSTEMD_CFLAGS
= $(TARGET_CFLAGS
) -fno-lto
47 # Override path to kmod, used in kmod-static-nodes.service
49 CFLAGS
="$(SYSTEMD_CFLAGS)" \
50 ac_cv_path_KMOD
=/usr
/bin
/kmod
52 define SYSTEMD_RUN_INTLTOOLIZE
53 cd
$(@D
) && $(HOST_DIR
)/usr
/bin
/intltoolize
--force --automake
55 SYSTEMD_PRE_CONFIGURE_HOOKS
+= SYSTEMD_RUN_INTLTOOLIZE
57 ifeq ($(BR2_PACKAGE_SYSTEMD_COMPAT
),y
)
58 SYSTEMD_CONF_OPTS
+= --enable-compat-libs
60 SYSTEMD_CONF_OPTS
+= --disable-compat-libs
63 ifeq ($(BR2_PACKAGE_ACL
),y
)
64 SYSTEMD_CONF_OPTS
+= --enable-acl
65 SYSTEMD_DEPENDENCIES
+= acl
67 SYSTEMD_CONF_OPTS
+= --disable-acl
70 ifeq ($(BR2_PACKAGE_LIBSECCOMP
),y
)
71 SYSTEMD_CONF_OPTS
+= --enable-seccomp
72 SYSTEMD_DEPENDENCIES
+= libseccomp
74 SYSTEMD_CONF_OPTS
+= --disable-seccomp
77 ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS
),y
)
78 SYSTEMD_CONF_OPTS
+= --enable-kdbus
80 SYSTEMD_CONF_OPTS
+= --disable-kdbus
83 ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
),y
)
84 SYSTEMD_DEPENDENCIES
+= xz libgcrypt
85 SYSTEMD_CONF_OPTS
+= \
88 --with-libgcrypt-prefix
=$(STAGING_DIR
)/usr
90 SYSTEMD_CONF_OPTS
+= \
95 ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
),y
)
96 SYSTEMD_DEPENDENCIES
+= libmicrohttpd
98 SYSTEMD_CONF_OPTS
+= --disable-microhttpd
101 ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD
),y
)
102 SYSTEMD_CONF_OPTS
+= --enable-networkd
103 define SYSTEMD_INSTALL_RESOLVCONF_HOOK
104 ln
-sf ..
/run
/systemd
/resolve
/resolv.conf \
105 $(TARGET_DIR
)/etc
/resolv.conf
108 SYSTEMD_CONF_OPTS
+= --disable-networkd
109 define SYSTEMD_INSTALL_SERVICE_NETWORK
110 $(INSTALL
) -D
-m
644 package
/systemd
/network.service \
111 $(TARGET_DIR
)/etc
/systemd
/system
/network.service
112 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
113 ln
-fs ..
/network.service \
114 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/network.service
118 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD
),y
)
119 SYSTEMD_CONF_OPTS
+= --enable-timesyncd
120 define SYSTEMD_INSTALL_SERVICE_TIMESYNC
121 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
122 ln
-sf ..
/..
/..
/..
/lib
/systemd
/system
/systemd-timesyncd.service \
123 $(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
/systemd-timesyncd.service
126 SYSTEMD_CONF_OPTS
+= --disable-timesyncd
129 ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
),y
)
130 SYSTEMD_CONF_OPTS
+= --enable-smack
132 SYSTEMD_CONF_OPTS
+= --disable-smack
135 # mq_getattr needs -lrt
136 SYSTEMD_MAKE_OPTS
+= LIBS
=-lrt
137 SYSTEMD_MAKE_OPTS
+= LDFLAGS
+=-ldl
139 define SYSTEMD_INSTALL_INIT_HOOK
140 ln
-fs ..
/lib
/systemd
/systemd
$(TARGET_DIR
)/sbin
/init
141 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/halt
142 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/poweroff
143 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/reboot
145 ln
-fs ..
/..
/..
/lib
/systemd
/system
/multi-user.target \
146 $(TARGET_DIR
)/etc
/systemd
/system
/default.target
149 define SYSTEMD_INSTALL_MACHINEID_HOOK
150 touch
$(TARGET_DIR
)/etc
/machine-id
153 define SYSTEMD_SANITIZE_PATH_IN_UNITS
154 find
$(TARGET_DIR
)/lib
/systemd
/system
-name
'*.service' \
155 -exec
$(SED
) 's,$(HOST_DIR),,g' {} \
;
158 SYSTEMD_POST_INSTALL_TARGET_HOOKS
+= \
159 SYSTEMD_INSTALL_INIT_HOOK \
160 SYSTEMD_INSTALL_MACHINEID_HOOK \
161 SYSTEMD_INSTALL_RESOLVCONF_HOOK \
162 SYSTEMD_SANITIZE_PATH_IN_UNITS
165 systemd-journal
-1 systemd-journal
-1 * /var
/log
/journal
- - Journal
166 systemd-journal-gateway
-1 systemd-journal-gateway
-1 * /var
/log
/journal
- - Journal Gateway
167 systemd-journal-remote
-1 systemd-journal-remote
-1 * /var
/log
/journal
/remote
- - Journal Remote
168 systemd-journal-upload
-1 systemd-journal-upload
-1 * - - - Journal Upload
169 systemd-resolve
-1 systemd-resolve
-1 * - - - Network Name Resolution Manager
170 systemd-bus-proxy
-1 systemd-bus-proxy
-1 * - - - Proxy D-Bus messages to
/from a bus
171 systemd-timesync
-1 systemd-timesync
-1 * - - - Network Time Synchronization
172 systemd-network
-1 systemd-network
-1 * - - - Network Manager
173 - - input
-1 * - - - Input device group
176 define SYSTEMD_DISABLE_SERVICE_TTY1
177 rm -f
$(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/getty@tty1.service
180 ifneq ($(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_PORT
)),)
181 # systemd needs getty.service for VTs and serial-getty.service for serial ttys
182 define SYSTEMD_INSTALL_SERVICE_TTY
183 if echo
$(BR2_TARGET_GENERIC_GETTY_PORT
) | egrep
-q
'tty[0-9]*$$'; \
187 SERVICE
="serial-getty"; \
189 ln
-fs ..
/..
/..
/..
/lib
/systemd
/system
/$${SERVICE}@.service \
190 $(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/$${SERVICE}@
$(BR2_TARGET_GENERIC_GETTY_PORT
).service
194 define SYSTEMD_INSTALL_INIT_SYSTEMD
195 $(SYSTEMD_DISABLE_SERVICE_TTY1
)
196 $(SYSTEMD_INSTALL_SERVICE_TTY
)
197 $(SYSTEMD_INSTALL_SERVICE_NETWORK
)
198 $(SYSTEMD_INSTALL_SERVICE_TIMESYNC
)
201 $(eval
$(autotools-package
))