Add livereload 2.4.1
[unleashed-userland.git] / make-rules / prep-unpack.mk
blobfbabe28d69daff8ef3f41589562267fb8d89a100
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
21 # Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
24 UNPACK = $(WS_TOOLS)/userland-unpack
27 # Anything that we downloaded and want to unpack must have a
28 # COMPONENT_ARCHIVE{_[0-9]+} macro.
30 PCK_SUFFIXES = $(subst COMPONENT_ARCHIVE_,, \
31 $(filter COMPONENT_ARCHIVE_%, $(.VARIABLES)))
33 # Template for unpacking rules.
34 define unpack-rules
35 ifdef COMPONENT_ARCHIVE$(1)
36 ifdef COMPONENT_SRC$(1)
38 CLEAN_PATHS += $$(COMPONENT_SRC$(1))
39 SOURCE_DIR$(1) = $$(COMPONENT_DIR)/$(COMPONENT_SRC$(1))
41 UNPACK_STAMP$(1) = $$(SOURCE_DIR$(1))/.unpacked
43 $$(UNPACK_STAMP$(1)): $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1)) download
44 $$(RM) -r $$(SOURCE_DIR$(1))
45 $$(UNPACK) $$(UNPACK_ARGS$(1)) $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1))
46 $$(COMPONENT_POST_UNPACK_ACTION$(1))
47 $$(TOUCH) $$@
49 unpack:: $$(UNPACK_STAMP$(1))
51 REQUIRED_PACKAGES += archiver/gnu-tar
52 REQUIRED_PACKAGES += compress/bzip2
53 REQUIRED_PACKAGES += compress/gzip
54 REQUIRED_PACKAGES += compress/p7zip
55 REQUIRED_PACKAGES += compress/unzip
56 REQUIRED_PACKAGES += compress/xz
57 REQUIRED_PACKAGES += compress/zip
58 REQUIRED_PACKAGES += developer/java/jdk
59 REQUIRED_PACKAGES += runtime/ruby
61 endif
62 endif
63 endef
66 # Define the rules required to download any source archives and augment any
67 # cleanup macros.
69 $(eval $(call unpack-rules,))
70 $(foreach suffix, $(PCK_SUFFIXES), $(eval $(call unpack-rules,_$(suffix))))