author  Mike Sullivan <Mike.Sullivan@Oracle.COM> 
Thu, 16 Jun 2016 23:00:26 0700  
changeset 6236  9ecffda25374 
parent 6132  7fb35b7d3c4d 
child 6911  7b878dfe6f0d 
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 
# 
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn WalkerSalas <shawn.walker@oracle.com>
parents:
5331
diff
changeset

21 

94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn WalkerSalas <shawn.walker@oracle.com>
parents:
5331
diff
changeset

22 
# 
6132
7fb35b7d3c4d
20258565 gmake clobber doesn't remove PGP signatures
Danek Duvall <danek.duvall@oracle.com>
parents:
5682
diff
changeset

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

24 
# 
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 
FETCH = $(WS_TOOLS)/userlandfetch 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

27 

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

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

29 
# Anything that we download must have a COMPONENT_ARCHIVE_URL{_[09]+} macro 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

30 
# that tells us where the canonical source for the archive can be found. The 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

31 
# macro for the first archive is typically unsuffixed. By convention, 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

32 
# subsequent archives will include a _[09]+ in the macro name. This allows 
5331
9c955076ffe3
PSARC/2015/203 Google Go version 1.5
Shawn WalkerSalas <shawn.walker@oracle.com>
parents:
4428
diff
changeset

33 
# an arbitrary number of archives to be downloaded for a particular component 
4196
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

34 
# Makefile. It is also important to note that there is a corresponding 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

35 
# COMPONENT_ARCHIVE macro defining a local file name for the archive, and 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

36 
# optional COMPONENT_ARCHIVE_HASH and COMPONENT_SIG_URL containing a hash of 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

37 
# the file and signature for verification of its contents. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

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

39 

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

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

41 
$(filter COMPONENT_ARCHIVE_URL_%, $(.VARIABLES))) 
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 
# Template for download rules. 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

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

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

46 

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

47 
ARCHIVES += $$(COMPONENT_ARCHIVE$(1)) 
6132
7fb35b7d3c4d
20258565 gmake clobber doesn't remove PGP signatures
Danek Duvall <danek.duvall@oracle.com>
parents:
5682
diff
changeset

48 
CLOBBER_PATHS += $$(COMPONENT_ARCHIVE$(1)) $$(notdir $$(COMPONENT_SIG_URL$(1))) 
4196
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

49 

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

50 
download:: $$(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

51 

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

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

53 
$$(FETCH) file $$@ \ 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

54 
$$(COMPONENT_ARCHIVE_URL$(1):%=url %) \ 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

55 
$$(COMPONENT_ARCHIVE_HASH$(1):%=hash %) \ 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

56 
$$(COMPONENT_SIG_URL$(1):%=sigurl %) 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

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

58 

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

59 
REQUIRED_PACKAGES += runtime/python27 
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 
endef 
d697072a92f5
19782029 userland should be able to build from SCM repositories
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff
changeset

63 

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 
# 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

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

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

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

69 
$(foreach suffix, $(URL_SUFFIXES), $(eval $(call downloadrules,_$(suffix)))) 
4428
21fcfd647301
21131456 gpg2 missing from userland developer package
Danek Duvall <danek.duvall@oracle.com>
parents:
4251
diff
changeset

70 

21fcfd647301
21131456 gpg2 missing from userland developer package
Danek Duvall <danek.duvall@oracle.com>
parents:
4251
diff
changeset

71 
# Needed for signature validation of downloads 
21fcfd647301
21131456 gpg2 missing from userland developer package
Danek Duvall <danek.duvall@oracle.com>
parents:
4251
diff
changeset

72 
REQUIRED_PACKAGES += crypto/gnupg 