Skip to content

Commit c6d23e8

Browse files
committed
[wpewebkit] add possibility to generate IPKG target
1 parent ba1ed68 commit c6d23e8

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

package/wpe/wpewebkit/wpewebkit.mk

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ WPEWEBKIT_USE_PORT=JSCOnly
2727
endif
2828
endif
2929

30+
# wpewebkit binary package config
31+
WPEWEBKIT_OPKG_NAME = "wpewebkit"
32+
WPEWEBKIT_OPKG_VERSION = "0.0.20170728"
33+
WPEWEBKIT_OPKG_ARCHITECTURE = "${BR2_ARCH}"
34+
WPEWEBKIT_OPKG_DEPENDS = ""
35+
WPEWEBKIT_OPKG_MAINTAINER = "Metrological"
36+
WPEWEBKIT_OPKG_PRIORITY = "optional"
37+
WPEWEBKIT_OPKG_SECTION = "graphics"
38+
WPEWEBKIT_OPKG_SOURCE = "${WPEWEBKIT_SITE}"
39+
WPEWEBKIT_OPKG_DESCRIPTION = "This is a description for WPEWebKit package"
40+
3041
WPEWEBKIT_DEPENDENCIES = host-bison host-cmake host-flex host-gperf host-ruby icu pcre
3142

3243
ifeq ($(WPEWEBKIT_BUILD_WEBKIT),y)
@@ -270,6 +281,7 @@ endef
270281

271282
ifeq ($(WPEWEBKIT_BUILD_JSC),y)
272283
define WPEWEBKIT_INSTALL_TARGET_CMDS_JSC
284+
$(INSTALL) -d $(TARGET_DIR)/usr/bin/ && \
273285
cp $(WPEWEBKIT_BUILDDIR)/bin/jsc $(TARGET_DIR)/usr/bin/ && \
274286
$(STRIPCMD) $(TARGET_DIR)/usr/bin/jsc
275287
endef
@@ -279,20 +291,47 @@ endif
279291

280292
ifeq ($(WPEWEBKIT_BUILD_WEBKIT),y)
281293
define WPEWEBKIT_INSTALL_TARGET_CMDS_WEBKIT
294+
$(INSTALL) -d $(TARGET_DIR)/usr/bin/ && \
282295
cp $(WPEWEBKIT_BUILDDIR)/bin/WPE{Network,Storage,Web}Process $(TARGET_DIR)/usr/bin/ && \
283296
cp $(WPEWEBKIT_BUILDDIR)/bin/WPEWebDriver $(TARGET_DIR)/usr/bin/ && \
297+
$(INSTALL) -d $(TARGET_DIR)/usr/lib/ && \
284298
cp -d $(WPEWEBKIT_BUILDDIR)/lib/libWPE* $(TARGET_DIR)/usr/lib/ && \
285299
$(STRIPCMD) $(TARGET_DIR)/usr/lib/libWPEWebKit*.so.*
286300
endef
287301
else
288302
WPEWEBKIT_INSTALL_TARGET_CMDS_WEBKIT = true
289303
endif
290304

305+
ifeq ($(BR2_PACKAGE_WPEFRAMEWORK_CREATE_IPKG_TARGETS),y)
306+
307+
WPEWEBKIT_DEPENDENCIES += ${SIMPLE_OPKG_TOOLS_DEPENDENCIES}
308+
291309
define WPEWEBKIT_INSTALL_TARGET_CMDS
310+
@# prepare package metadata
311+
$(call SIMPLE_OPKG_TOOLS_INIT,WPEWEBKIT,${@D})
312+
313+
@# set install target
314+
$(call SIMPLE_OPKG_TOOLS_SET_TARGET,WPEWEBKIT,${@D})
315+
316+
@# install target files
292317
($(WPEWEBKIT_INSTALL_TARGET_CMDS_JSC) && \
293318
$(WPEWEBKIT_INSTALL_TARGET_CMDS_WEBKIT))
294-
endef
295319

320+
@# build package
321+
$(call SIMPLE_OPKG_TOOLS_BUILD_PACKAGE,${@D})
322+
323+
@# install package
324+
$(call SIMPLE_OPKG_TOOLS_INSTALL_PACKAGE,${@D}/${WPEWEBKIT_OPKG_NAME}_${WPEWEBKIT_OPKG_VERSION}_${WPEWEBKIT_OPKG_ARCHITECTURE}.ipk)
325+
326+
@# set previous TARGET_DIR
327+
$(call SIMPLE_OPKG_TOOLS_UNSET_TARGET,WPEWEBKIT)
328+
endef
329+
else # ($(BR2_PACKAGE_WPEFRAMEWORK_CREATE_IPKG_TARGETS),y)
330+
define WPEWEBKIT_INSTALL_TARGET_CMDS
331+
($(WPEWEBKIT_INSTALL_TARGET_CMDS_JSC) && \
332+
$(WPEWEBKIT_INSTALL_TARGET_CMDS_WEBKIT))
333+
endef
334+
endif # ($(BR2_PACKAGE_WPEFRAMEWORK_CREATE_IPKG_TARGETS),y)
296335
endif
297336

298337
RSYNC_VCS_EXCLUSIONS += --exclude LayoutTests --exclude WebKitBuild

0 commit comments

Comments
 (0)