author  John Beck <John.Beck@Oracle.COM> 
Thu, 24 Sep 2015 12:51:11 0700  
changeset 4953  0c9477f5bdd7 
parent 4251  2bf7e2c1ca74 
child 5477  5eabbdf042bc 
permissions  rwrr 
4196
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

1 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

2 
# CDDL HEADER START 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

3 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

4 
# The contents of this file are subject to the terms of the 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

5 
# Common Development and Distribution License (the "License"). 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

6 
# You may not use this file except in compliance with the License. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

7 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

8 
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

9 
# or http://www.opensolaris.org/os/licensing. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

10 
# See the License for the specific language governing permissions 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

11 
# and limitations under the License. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

12 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

13 
# When distributing Covered Code, include this CDDL HEADER in each 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

14 
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

15 
# If applicable, add the following below this CDDL HEADER, with the 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

16 
# fields enclosed by brackets "[]" replaced with your own identifying 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

17 
# information: Portions Copyright [yyyy] [name of copyright owner] 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

18 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

19 
# CDDL HEADER END 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

20 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

21 
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

22 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

23 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

24 
UNPACK = $(WS_TOOLS)/userlandunpack 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

25 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

26 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

27 
# Anything that we downloaded and want to unpack must have a 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

28 
# COMPONENT_ARCHIVE{_[09]+} macro. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

29 
# 
4251
2bf7e2c1ca74
21029374 probably shouldn't overload TMP_SUFFIXES in userland fragments
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
4196
diff
changeset

30 
PCK_SUFFIXES = $(subst COMPONENT_ARCHIVE_,, \ 
4196
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

31 
$(filter COMPONENT_ARCHIVE_%, $(.VARIABLES))) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

32 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

33 
# Template for unpacking rules. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

34 
define unpackrules 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

35 
ifdef COMPONENT_ARCHIVE$(1) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

36 
ifdef COMPONENT_SRC$(1) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

37 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

38 
CLEAN_PATHS += $$(COMPONENT_SRC$(1)) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

39 
SOURCE_DIR$(1) = $$(COMPONENT_DIR)/$(COMPONENT_SRC$(1)) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

40 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

41 
UNPACK_STAMP$(1) = $$(SOURCE_DIR$(1))/.unpacked 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

42 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

43 
$$(UNPACK_STAMP$(1)): $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1)) download 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

44 
$$(RM) r $$(SOURCE_DIR$(1)) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

45 
$$(UNPACK) $$(UNPACK_ARGS$(1)) $$(USERLAND_ARCHIVES)$$(COMPONENT_ARCHIVE$(1)) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

46 
$$(COMPONENT_POST_UNPACK_ACTION$(1)) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

47 
$$(TOUCH) [email protected] 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

48 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

49 
unpack:: $$(UNPACK_STAMP$(1)) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

50 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

51 
REQUIRED_PACKAGES += archiver/gnutar 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

52 
REQUIRED_PACKAGES += compress/bzip2 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

53 
REQUIRED_PACKAGES += compress/gzip 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

54 
REQUIRED_PACKAGES += compress/p7zip 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

55 
REQUIRED_PACKAGES += compress/unzip 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

56 
REQUIRED_PACKAGES += compress/xz 
4953
0c9477f5bdd7
21954633 rabbitmq needs zip to build
John Beck <John.Beck@Oracle.COM>
parents:
4251
diff
changeset

57 
REQUIRED_PACKAGES += compress/zip 
4196
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

58 
REQUIRED_PACKAGES += developer/java/jdk 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

59 
REQUIRED_PACKAGES += runtime/ruby 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

60 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

61 
endif 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

62 
endif 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

63 
endef 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

64 

d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

65 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

66 
# Define the rules required to download any source archives and augment any 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

67 
# cleanup macros. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

68 
# 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

69 
$(eval $(call unpackrules,)) 
4251
2bf7e2c1ca74
21029374 probably shouldn't overload TMP_SUFFIXES in userland fragments
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
4196
diff
changeset

70 
$(foreach suffix, $(PCK_SUFFIXES), $(eval $(call unpackrules,_$(suffix)))) 