1 ################################################################################
5 ################################################################################
7 SWUPDATE_VERSION
= 2015.07
8 SWUPDATE_SITE
= $(call github
,sbabic
,swupdate
,$(SWUPDATE_VERSION
))
9 SWUPDATE_LICENSE
= GPLv2
+, MIT
, Public Domain
10 SWUPDATE_LICENSE_FILES
= COPYING
12 https
://github.com
/sbabic
/swupdate
/commit
/5a5ef5909f5da5b2070d58ffaee924bb8e6a51e1.patch \
13 https
://github.com
/sbabic
/swupdate
/commit
/f26577423eb65728fcd10f78f9978dd07d51dcb9.patch
15 # swupdate bundles its own version of mongoose (version 3.8) and
16 # lsqlite3 (version 0.8)
18 ifeq ($(BR2_PACKAGE_JSON_C
),y
)
19 SWUPDATE_DEPENDENCIES
+= json-c
20 SWUPDATE_MAKE_ENV
+= HAVE_JSON_C
=y
22 SWUPDATE_MAKE_ENV
+= HAVE_JSON_C
=n
25 ifeq ($(BR2_PACKAGE_LIBCONFIG
),y
)
26 SWUPDATE_DEPENDENCIES
+= libconfig
27 SWUPDATE_MAKE_ENV
+= HAVE_LIBCONFIG
=y
29 SWUPDATE_MAKE_ENV
+= HAVE_LIBCONFIG
=n
32 ifeq ($(BR2_PACKAGE_LIBCURL
),y
)
33 SWUPDATE_DEPENDENCIES
+= libcurl
34 SWUPDATE_MAKE_ENV
+= HAVE_LIBCURL
=y
36 SWUPDATE_MAKE_ENV
+= HAVE_LIBCURL
=n
39 ifeq ($(BR2_PACKAGE_LUA_5_2
),y
)
40 SWUPDATE_DEPENDENCIES
+= lua
41 SWUPDATE_MAKE_ENV
+= HAVE_LUA
=y
43 SWUPDATE_MAKE_ENV
+= HAVE_LUA
=n
46 ifeq ($(BR2_PACKAGE_MTD
),y
)
47 SWUPDATE_DEPENDENCIES
+= mtd
48 SWUPDATE_MAKE_ENV
+= HAVE_LIBMTD
=y
49 SWUPDATE_MAKE_ENV
+= HAVE_LIBUBI
=y
51 SWUPDATE_MAKE_ENV
+= HAVE_LIBMTD
=n
52 SWUPDATE_MAKE_ENV
+= HAVE_LIBUBI
=n
55 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
56 SWUPDATE_DEPENDENCIES
+= openssl
57 SWUPDATE_MAKE_ENV
+= HAVE_LIBSSL
=y
58 SWUPDATE_MAKE_ENV
+= HAVE_LIBCRYPTO
=y
60 SWUPDATE_MAKE_ENV
+= HAVE_LIBSSL
=n
61 SWUPDATE_MAKE_ENV
+= HAVE_LIBCRYPTO
=n
64 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
65 SWUPDATE_DEPENDENCIES
+= zlib
66 SWUPDATE_MAKE_ENV
+= HAVE_ZLIB
=y
68 SWUPDATE_MAKE_ENV
+= HAVE_ZLIB
=n
71 SWUPDATE_BUILD_CONFIG
= $(@D
)/.config
73 SWUPDATE_KCONFIG_FILE
= $(call qstrip
,$(BR2_PACKAGE_SWUPDATE_CONFIG
))
74 SWUPDATE_KCONFIG_EDITORS
= menuconfig xconfig gconfig nconfig
76 ifeq ($(BR2_PREFER_STATIC_LIB
),y
)
77 define SWUPDATE_PREFER_STATIC
78 $(call KCONFIG_ENABLE_OPT
,CONFIG_STATIC
,$(SWUPDATE_BUILD_CONFIG
))
82 define SWUPDATE_SET_BUILD_OPTIONS
83 $(call KCONFIG_SET_OPT
,CONFIG_CROSS_COMPILE
,"$(TARGET_CROSS)", \
84 $(SWUPDATE_BUILD_CONFIG
))
85 $(call KCONFIG_SET_OPT
,CONFIG_SYSROOT
,"$(STAGING_DIR)", \
86 $(SWUPDATE_BUILD_CONFIG
))
87 $(call KCONFIG_SET_OPT
,CONFIG_EXTRA_CFLAGS
,"$(TARGET_CFLAGS)", \
88 $(SWUPDATE_BUILD_CONFIG
))
89 $(call KCONFIG_SET_OPT
,CONFIG_EXTRA_LDFLAGS
,"$(TARGET_LDFLAGS)", \
90 $(SWUPDATE_BUILD_CONFIG
))
93 define SWUPDATE_KCONFIG_FIXUP_CMDS
94 $(SWUPDATE_PREFER_STATIC
)
95 $(SWUPDATE_SET_BUILD_OPTIONS
)
98 define SWUPDATE_BUILD_CMDS
99 $(TARGET_MAKE_ENV
) $(SWUPDATE_MAKE_ENV
) $(MAKE
) -C
$(@D
)
102 define SWUPDATE_INSTALL_TARGET_CMDS
103 $(INSTALL
) -D
-m
0755 $(@D
)/swupdate
$(TARGET_DIR
)/usr
/bin
/swupdate
104 $(if
$(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE
), \
105 mkdir
-p
$(TARGET_DIR
)/var
/www
/swupdate
; \
106 cp
-dpf
$(@D
)/www
/* $(TARGET_DIR
)/var
/www
/swupdate
)
109 # Checks to give errors that the user can understand
110 # Must be before we call to kconfig-package
111 ifeq ($(BR2_PACKAGE_SWUPDATE
)$(BR_BUILDING
),yy
)
112 ifeq ($(call qstrip
,$(BR2_PACKAGE_SWUPDATE_CONFIG
)),)
113 $(error No Swupdate configuration file specified
, check your BR2_PACKAGE_SWUPDATE_CONFIG setting
)
117 $(eval
$(kconfig-package
))