xref: /OK3568_Linux_fs/buildroot/package/s6/s6.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# s6
4#
5################################################################################
6
7S6_VERSION = 2.10.0.3
8S6_SITE = http://skarnet.org/software/s6
9S6_LICENSE = ISC
10S6_LICENSE_FILES = COPYING
11S6_INSTALL_STAGING = YES
12S6_DEPENDENCIES = execline
13
14S6_CONF_OPTS = \
15	--prefix=/ \
16	--with-sysdeps=$(STAGING_DIR)/lib/skalibs/sysdeps \
17	--with-include=$(STAGING_DIR)/include \
18	--with-dynlib=$(STAGING_DIR)/lib \
19	--with-lib=$(STAGING_DIR)/lib/execline \
20	--with-lib=$(STAGING_DIR)/lib/skalibs \
21	$(if $(BR2_STATIC_LIBS),,--disable-allstatic) \
22	$(SHARED_STATIC_LIBS_OPTS)
23
24define S6_CONFIGURE_CMDS
25	(cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(S6_CONF_OPTS))
26endef
27
28define S6_BUILD_CMDS
29	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
30endef
31
32define S6_INSTALL_TARGET_CMDS
33	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
34endef
35
36define S6_REMOVE_STATIC_LIB_DIR
37	rm -rf $(TARGET_DIR)/usr/lib/s6
38endef
39
40S6_POST_INSTALL_TARGET_HOOKS += S6_REMOVE_STATIC_LIB_DIR
41
42define S6_INSTALL_STAGING_CMDS
43	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
44endef
45
46HOST_S6_DEPENDENCIES = host-execline
47
48HOST_S6_CONF_OPTS = \
49	--prefix=$(HOST_DIR) \
50	--with-sysdeps=$(HOST_DIR)/lib/skalibs/sysdeps \
51	--with-include=$(HOST_DIR)/include \
52	--with-dynlib=$(HOST_DIR)/lib \
53	--disable-static \
54	--enable-shared \
55	--disable-allstatic
56
57define HOST_S6_CONFIGURE_CMDS
58	(cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure $(HOST_S6_CONF_OPTS))
59endef
60
61define HOST_S6_BUILD_CMDS
62	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)
63endef
64
65define HOST_S6_INSTALL_CMDS
66	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install-dynlib install-include
67endef
68
69$(eval $(generic-package))
70$(eval $(host-generic-package))
71