python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / systemd / systemd.mk
blob0d2f4163004ec4ec3fcd224d8cd080ffacdb27c1
1 ################################################################################
3 # systemd
5 ################################################################################
7 SYSTEMD_VERSION = 232
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 = \
13 host-intltool \
14 libcap \
15 util-linux \
16 kmod \
17 host-gperf
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
26 endif
28 SYSTEMD_CONF_OPTS += \
29 --with-rootprefix= \
30 --enable-blkid \
31 --enable-static=no \
32 --disable-manpages \
33 --disable-ima \
34 --disable-libcryptsetup \
35 --disable-efi \
36 --disable-gnuefi \
37 --disable-ldconfig \
38 --disable-tests \
39 --disable-coverage \
40 --with-default-dnssec=no \
41 --without-python
43 SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto
45 # Override path to kmod, used in kmod-static-nodes.service
46 SYSTEMD_CONF_ENV = \
47 CFLAGS="$(SYSTEMD_CFLAGS)" \
48 ac_cv_path_KMOD=/usr/bin/kmod
50 define SYSTEMD_RUN_INTLTOOLIZE
51 cd $(@D) && $(HOST_DIR)/usr/bin/intltoolize --force --automake
52 endef
53 SYSTEMD_PRE_CONFIGURE_HOOKS += SYSTEMD_RUN_INTLTOOLIZE
55 ifeq ($(BR2_PACKAGE_ACL),y)
56 SYSTEMD_CONF_OPTS += --enable-acl
57 SYSTEMD_DEPENDENCIES += acl
58 else
59 SYSTEMD_CONF_OPTS += --disable-acl
60 endif
62 ifeq ($(BR2_PACKAGE_AUDIT),y)
63 SYSTEMD_CONF_OPTS += --enable-audit
64 SYSTEMD_DEPENDENCIES += audit
65 else
66 SYSTEMD_CONF_OPTS += --disable-audit
67 endif
69 ifeq ($(BR2_PACKAGE_LIBIDN),y)
70 SYSTEMD_CONF_OPTS += --enable-libidn
71 SYSTEMD_DEPENDENCIES += libidn
72 else
73 SYSTEMD_CONF_OPTS += --disable-libidn
74 endif
76 ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
77 SYSTEMD_CONF_OPTS += --enable-seccomp
78 SYSTEMD_DEPENDENCIES += libseccomp
79 else
80 SYSTEMD_CONF_OPTS += --disable-seccomp
81 endif
83 ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
84 SYSTEMD_CONF_OPTS += --enable-xkbcommon
85 SYSTEMD_DEPENDENCIES += libxkbcommon
86 else
87 SYSTEMD_CONF_OPTS += --disable-xkbcommon
88 endif
90 ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS),y)
91 SYSTEMD_CONF_OPTS += --enable-kdbus
92 else
93 SYSTEMD_CONF_OPTS += --disable-kdbus
94 endif
96 ifeq ($(BR2_PACKAGE_BZIP2),y)
97 SYSTEMD_DEPENDENCIES += bzip2
98 SYSTEMD_CONF_OPTS += --enable-bzip2
99 else
100 SYSTEMD_CONF_OPTS += --disable-bzip2
101 endif
103 ifeq ($(BR2_PACKAGE_LZ4),y)
104 SYSTEMD_DEPENDENCIES += lz4
105 SYSTEMD_CONF_OPTS += --enable-lz4
106 else
107 SYSTEMD_CONF_OPTS += --disable-lz4
108 endif
110 ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
111 SYSTEMD_DEPENDENCIES += linux-pam
112 SYSTEMD_CONF_OPTS += --enable-pam
113 else
114 SYSTEMD_CONF_OPTS += --disable-pam
115 endif
117 ifeq ($(BR2_PACKAGE_XZ),y)
118 SYSTEMD_DEPENDENCIES += xz
119 SYSTEMD_CONF_OPTS += --enable-xz
120 else
121 SYSTEMD_CONF_OPTS += --disable-xz
122 endif
124 ifeq ($(BR2_PACKAGE_ZLIB),y)
125 SYSTEMD_DEPENDENCIES += zlib
126 SYSTEMD_CONF_OPTS += --enable-zlib
127 else
128 SYSTEMD_CONF_OPTS += --disable-zlib
129 endif
131 ifeq ($(BR2_PACKAGE_LIBCURL),y)
132 SYSTEMD_DEPENDENCIES += libcurl
133 SYSTEMD_CONF_OPTS += --enable-libcurl
134 else
135 SYSTEMD_CONF_OPTS += --disable-libcurl
136 endif
138 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
139 SYSTEMD_DEPENDENCIES += libgcrypt
140 SYSTEMD_CONF_OPTS += \
141 --enable-gcrypt \
142 --with-libgcrypt-prefix=$(STAGING_DIR)/usr \
143 --with-libgpg-error-prefix=$(STAGING_DIR)/usr
144 else
145 SYSTEMD_CONF_OPTS += --disable-gcrypt
146 endif
148 ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
149 SYSTEMD_DEPENDENCIES += libmicrohttpd
150 SYSTEMD_CONF_OPTS += --enable-microhttpd
151 ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
152 SYSTEMD_CONF_OPTS += --enable-qrencode
153 SYSTEMD_DEPENDENCIES += libqrencode
154 else
155 SYSTEMD_CONF_OPTS += --disable-qrencode
156 endif
157 else
158 SYSTEMD_CONF_OPTS += --disable-microhttpd --disable-qrencode
159 endif
161 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
162 SYSTEMD_DEPENDENCIES += libselinux
163 SYSTEMD_CONF_OPTS += --enable-selinux
164 else
165 SYSTEMD_CONF_OPTS += --disable-selinux
166 endif
168 ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
169 SYSTEMD_CONF_OPTS += --enable-hwdb
170 else
171 SYSTEMD_CONF_OPTS += --disable-hwdb
172 endif
174 ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y)
175 SYSTEMD_CONF_OPTS += --enable-binfmt
176 else
177 SYSTEMD_CONF_OPTS += --disable-binfmt
178 endif
180 ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y)
181 SYSTEMD_CONF_OPTS += --enable-vconsole
182 else
183 SYSTEMD_CONF_OPTS += --disable-vconsole
184 endif
186 ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y)
187 SYSTEMD_CONF_OPTS += --enable-quotacheck
188 else
189 SYSTEMD_CONF_OPTS += --disable-quotacheck
190 endif
192 ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES),y)
193 SYSTEMD_CONF_OPTS += --enable-tmpfiles
194 else
195 SYSTEMD_CONF_OPTS += --disable-tmpfiles
196 endif
198 ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
199 SYSTEMD_CONF_OPTS += --enable-sysusers
200 else
201 SYSTEMD_CONF_OPTS += --disable-sysusers
202 endif
204 ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT),y)
205 SYSTEMD_CONF_OPTS += --enable-firstboot
206 else
207 SYSTEMD_CONF_OPTS += --disable-firstboot
208 endif
210 ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED),y)
211 SYSTEMD_CONF_OPTS += --enable-randomseed
212 else
213 SYSTEMD_CONF_OPTS += --disable-randomseed
214 endif
216 ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT),y)
217 SYSTEMD_CONF_OPTS += --enable-backlight
218 else
219 SYSTEMD_CONF_OPTS += --disable-backlight
220 endif
222 ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL),y)
223 SYSTEMD_CONF_OPTS += --enable-rfkill
224 else
225 SYSTEMD_CONF_OPTS += --disable-rfkill
226 endif
228 ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
229 SYSTEMD_CONF_OPTS += --enable-logind
230 else
231 SYSTEMD_CONF_OPTS += --disable-logind
232 endif
234 ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y)
235 SYSTEMD_CONF_OPTS += --enable-machined
236 else
237 SYSTEMD_CONF_OPTS += --disable-machined
238 endif
240 ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y)
241 SYSTEMD_CONF_OPTS += --enable-importd
242 else
243 SYSTEMD_CONF_OPTS += --disable-importd
244 endif
246 ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
247 SYSTEMD_CONF_OPTS += --enable-hostnamed
248 else
249 SYSTEMD_CONF_OPTS += --disable-hostnamed
250 endif
252 ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME),y)
253 SYSTEMD_CONF_OPTS += --enable-myhostname
254 else
255 SYSTEMD_CONF_OPTS += --disable-myhostname
256 endif
258 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED),y)
259 SYSTEMD_CONF_OPTS += --enable-timedated
260 else
261 SYSTEMD_CONF_OPTS += --disable-timedated
262 endif
264 ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED),y)
265 SYSTEMD_CONF_OPTS += --enable-localed
266 else
267 SYSTEMD_CONF_OPTS += --disable-localed
268 endif
270 ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
271 SYSTEMD_CONF_OPTS += --enable-coredump
272 SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * /var/lib/systemd/coredump - - Core Dumper
273 else
274 SYSTEMD_CONF_OPTS += --disable-coredump
275 endif
277 ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT),y)
278 SYSTEMD_CONF_OPTS += --enable-polkit
279 else
280 SYSTEMD_CONF_OPTS += --disable-polkit
281 endif
283 ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
284 SYSTEMD_CONF_OPTS += --enable-networkd
285 SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - Network Manager
286 define SYSTEMD_INSTALL_RESOLVCONF_HOOK
287 ln -sf ../run/systemd/resolve/resolv.conf \
288 $(TARGET_DIR)/etc/resolv.conf
289 endef
290 SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
291 ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
292 define SYSTEMD_INSTALL_NETWORK_CONFS
293 sed s/SYSTEMD_NETWORKD_DHCP_IFACE/$(SYSTEMD_NETWORKD_DHCP_IFACE)/ \
294 package/systemd/dhcp.network > \
295 $(TARGET_DIR)/etc/systemd/network/dhcp.network
296 endef
297 endif
298 else
299 SYSTEMD_CONF_OPTS += --disable-networkd
300 define SYSTEMD_INSTALL_SERVICE_NETWORK
301 $(INSTALL) -D -m 644 package/systemd/network.service \
302 $(TARGET_DIR)/etc/systemd/system/network.service
303 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
304 ln -fs ../network.service \
305 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service
306 endef
307 endif
309 ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
310 SYSTEMD_CONF_OPTS += --enable-resolved
311 SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
312 else
313 SYSTEMD_CONF_OPTS += --disable-resolved
314 endif
316 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
317 SYSTEMD_CONF_OPTS += --enable-timesyncd
318 SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization
319 define SYSTEMD_INSTALL_SERVICE_TIMESYNC
320 mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
321 ln -sf ../../../../lib/systemd/system/systemd-timesyncd.service \
322 $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
323 endef
324 else
325 SYSTEMD_CONF_OPTS += --disable-timesyncd
326 endif
328 ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y)
329 SYSTEMD_CONF_OPTS += --enable-smack
330 else
331 SYSTEMD_CONF_OPTS += --disable-smack
332 endif
334 ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE),y)
335 SYSTEMD_CONF_OPTS += --enable-hibernate
336 else
337 SYSTEMD_CONF_OPTS += --disable-hibernate
338 endif
340 define SYSTEMD_INSTALL_INIT_HOOK
341 ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init
342 ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt
343 ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff
344 ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot
346 ln -fs ../../../lib/systemd/system/multi-user.target \
347 $(TARGET_DIR)/etc/systemd/system/default.target
348 endef
350 define SYSTEMD_INSTALL_MACHINEID_HOOK
351 touch $(TARGET_DIR)/etc/machine-id
352 endef
354 SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
355 SYSTEMD_INSTALL_INIT_HOOK \
356 SYSTEMD_INSTALL_MACHINEID_HOOK \
357 SYSTEMD_INSTALL_RESOLVCONF_HOOK
359 define SYSTEMD_USERS
360 - - input -1 * - - - Input device group
361 - - systemd-journal -1 * - - - Journal
362 systemd-bus-proxy -1 systemd-bus-proxy -1 * - - - Proxy D-Bus messages to/from a bus
363 systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
364 systemd-journal-remote -1 systemd-journal-remote -1 * /var/log/journal/remote - - Journal Remote
365 systemd-journal-upload -1 systemd-journal-upload -1 * - - - Journal Upload
366 $(SYSTEMD_COREDUMP_USER)
367 $(SYSTEMD_NETWORKD_USER)
368 $(SYSTEMD_RESOLVED_USER)
369 $(SYSTEMD_TIMESYNCD_USER)
370 endef
372 define SYSTEMD_DISABLE_SERVICE_TTY1
373 rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service
374 endef
376 ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
377 # systemd needs getty.service for VTs and serial-getty.service for serial ttys
378 # also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
379 define SYSTEMD_INSTALL_SERVICE_TTY
380 if echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
381 then \
382 SERVICE="getty"; \
383 else \
384 SERVICE="serial-getty"; \
385 fi; \
386 ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \
387 $(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service; \
388 if [ $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) -gt 0 ] ; \
389 then \
390 $(SED) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR)/lib/systemd/system/$${SERVICE}@.service; \
392 endef
393 endif
395 define SYSTEMD_INSTALL_INIT_SYSTEMD
396 $(SYSTEMD_DISABLE_SERVICE_TTY1)
397 $(SYSTEMD_INSTALL_SERVICE_TTY)
398 $(SYSTEMD_INSTALL_SERVICE_NETWORK)
399 $(SYSTEMD_INSTALL_SERVICE_TIMESYNC)
400 $(SYSTEMD_INSTALL_NETWORK_CONFS)
401 endef
403 $(eval $(autotools-package))