Project import
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8f007a8 --- /dev/null +++ b/Makefile
@@ -0,0 +1,88 @@ +# +# Copyright (c) 2010-2011 Nest, Inc. +# All rights reserved. +# +# This document is the property of Nest. It is considered +# confidential and proprietary information. +# +# This document may not be reproduced or transmitted in any form, +# in whole or in part, without the express written permission of +# Nest. +# +# Description: +# This file is the make file tzcode and tzdata, executables and +# data required for the implementation of standard local time +# for many representative locations around the globe. +# + +BuildConfigSpecialized := No +BuildProductSpecialized := No + +include pre.mak + +SubMakefiles := tzcode.mak \ + tzdata.mak + +# Override the build directory so that the three make files that make +# up this collective package all build in the same directory. + +BuildDirectory := $(call GenerateConditionalBuildQualifiedDirectory,$(BuildBaseDirectory)) + +all: $(PackageDefaultGoal) + +# Prepare the sources. While there's nothing to do here, we need to +# recurse through the sub-make files. + +.PHONY: source +source: recursive + +# Patch the sources, if necessary (nothing to do, this is handled by +# the sub-make files). + +.PHONY: patch +patch: source + +# Configure the source for building (nothing to do, this is handled by +# the sub-make files). + +.PHONY: configure +configure: source + +# Build the source. +# +# We have to unset MAKEFLAGS since they confuse the package build otherwise. + +.PHONY: build +build: configure | $(ResultDirectory) + $(Verbose)unset MAKEFLAGS && \ + $(MAKE) -C $(BuildDirectory) \ + TOPDIR=$(ResultDirectory) \ + all + +# Stage the build to a temporary installation area. + +.PHONY: stage +stage: stage-default stage-header + +# We have to unset MAKEFLAGS since they confuse the package build otherwise. + +.PHONY: stage-default +stage-default: build | $(ResultDirectory) + $(Verbose)unset MAKEFLAGS && \ + $(MAKE) -C $(BuildDirectory) \ + TOPDIR=$(ResultDirectory) \ + install + +# Other packages depend on the header, tzfile.h. Manually and +# explicitly stage this in the results directory so they can find it. + +.PHONY: stage-header +stage-header: build | $(ResultDirectory) + $(Verbose)install -d $(call GenerateResultPaths,,usr/include) + $(Verbose)install $(BuildDirectory)/tzfile.h $(call GenerateResultPaths,,usr/include/tzfile.h) + +clean: + $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)/* $(BuildDirectory)/..?* $(BuildDirectory)/.[!.]* + $(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)/* $(ResultDirectory)/..?* $(ResultDirectory)/.[!.]* + +include post.mak
diff --git a/tzcode.mak b/tzcode.mak new file mode 100644 index 0000000..bfbae9c --- /dev/null +++ b/tzcode.mak
@@ -0,0 +1,100 @@ +# +# Copyright (c) 2010-2012 Nest Labs, Inc. +# All rights reserved. +# +# This document is the property of Nest. It is considered +# confidential and proprietary information. +# +# This document may not be reproduced or transmitted in any form, +# in whole or in part, without the express written permission of +# Nest. +# +# Description: +# This file is the make file tzcode, executables required for +# the implementation of standard local time for many +# representative locations around the globe. +# + +BuildConfigSpecialized := No +BuildProductSpecialized := No + +include pre.mak + +# Override the build directory so that the three make files that make +# up this collective package all build in the same directory. + +BuildDirectory := $(call GenerateConditionalBuildQualifiedDirectory,$(BuildBaseDirectory)) + +PackageName := tzcode + +PackageExtension := tar.gz +PackageSeparator := + +PackagePatchArgs := -p1 + +PackageArchive := $(PackageName).$(PackageExtension) +PackageSourceDir := $(call GenerateBuildPaths,$(PackageName)$(PackageSeparator)$(PackageVersion)) + +PackageBuildMakefile := $(call GenerateBuildPaths,Makefile) + +PackageLicenseInputs := $(PackageSourceDir)/tzfile.h + +CleanPaths += $(PackageLicenseFile) + +all: $(PackageDefaultGoal) + +# Generate the package license contents. + +$(PackageLicenseInputs): source + +$(PackageLicenseFile): $(PackageLicenseInputs) + $(Verbose)$(SED) -n -e '/^\/\*/,/\*\/$$/{;p;/\*\/$$/q;}' < $< > $@ + +# Extract the source from the archive and apply patches, if any. +# +# Unlike most third-party software packages, the tzcode archive does not +# contain a directory that encloses its sources. So, we have to create one +# manually to avoid cluttering up our "glue" directory with its sources. + +$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths) | $(BuildDirectory) + $(create-directory) + $(call expand-archive,$(PackageArchive),$(@)) + $(Verbose)touch $(@) + $(call patch-directory,$(@),$(PackagePatchArgs),$(PackagePatchPaths)) + +# Prepare the sources. + +.PHONY: source +source: | $(PackageSourceDir) + +# Patch the sources, if necessary. + +.PHONY: patch +patch: source + +# Generate the package build makefile. + +$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory) + $(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory)) + +# Configure the source for building. + +.PHONY: configure +configure: source $(PackageBuildMakefile) + +# Build the source (there's nothing to do here). + +.PHONY: build +build: configure + +# Stage the build to a temporary installation area (there's nothing to +# do here). + +.PHONY: stage +stage: build + +clean: + $(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir) + $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)/* $(BuildDirectory)/..?* $(BuildDirectory)/.[!.]* + +include post.mak
diff --git a/tzcode.tar.gz b/tzcode.tar.gz new file mode 100644 index 0000000..7c77f2d --- /dev/null +++ b/tzcode.tar.gz Binary files differ
diff --git a/tzcode.url b/tzcode.url new file mode 100644 index 0000000..38fe6f3 --- /dev/null +++ b/tzcode.url
@@ -0,0 +1 @@ +http://www.iana.org/time-zones/repository/releases/tzcode2012b.tar.gz
diff --git a/tzcode.version b/tzcode.version new file mode 100644 index 0000000..10d350a --- /dev/null +++ b/tzcode.version
@@ -0,0 +1 @@ +2012b
diff --git a/tzdata.mak b/tzdata.mak new file mode 100644 index 0000000..dbe8db5 --- /dev/null +++ b/tzdata.mak
@@ -0,0 +1,89 @@ +# +# Copyright (c) 2010-2012 Nest Labs, Inc. +# All rights reserved. +# +# This document is the property of Nest. It is considered +# confidential and proprietary information. +# +# This document may not be reproduced or transmitted in any form, +# in whole or in part, without the express written permission of +# Nest. +# +# Description: +# This file is the make file tzdata, data required for +# the implementation of standard local time for many +# representative locations around the globe. +# + +BuildConfigSpecialized := No +BuildProductSpecialized := No + +include pre.mak + +# Override the build directory so that the three make files that make +# up this collective package all build in the same directory. + +BuildDirectory := $(call GenerateConditionalBuildQualifiedDirectory,$(BuildBaseDirectory)) + +PackageName := tzdata + +PackageExtension := tar.gz +PackageSeparator := + +PackagePatchArgs := -p1 + +PackageArchive := $(PackageName).$(PackageExtension) +PackageSourceDir := $(call GenerateBuildPaths,$(PackageName)$(PackageSeparator)$(PackageVersion)) + +PackageBuildScript := $(call GenerateBuildPaths,yearistype.sh) + +all: $(PackageDefaultGoal) + +# Extract the source from the archive and apply patches, if any. +# +# Unlike most third-party software packages, the tzdata archive does not +# contain a directory that encloses its sources. So, we have to create one +# manually to avoid cluttering up our "glue" directory with its sources. + +$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths) | $(BuildDirectory) + $(create-directory) + $(call expand-archive,$(PackageArchive),$(@)) + $(Verbose)touch $(@) + $(call patch-directory,$(@),$(PackagePatchArgs),$(PackagePatchPaths)) + +# Prepare the sources. + +.PHONY: source +source: | $(PackageSourceDir) + +# Patch the sources, if necessary. + +.PHONY: patch +patch: source + +# Generate the package build makefile. + +$(PackageBuildScript): | $(PackageSourceDir) $(BuildDirectory) + $(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory)) + +# Configure the source for building. + +.PHONY: configure +configure: source $(PackageBuildScript) + +# Build the source (there's nothing to do here). + +.PHONY: build +build: configure + +# Stage the build to a temporary installation area (there's nothing to +# do here). + +.PHONY: stage +stage: build + +clean: + $(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir) + $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)/* $(BuildDirectory)/..?* $(BuildDirectory)/.[!.]* + +include post.mak
diff --git a/tzdata.tar.gz b/tzdata.tar.gz new file mode 100644 index 0000000..eb78765 --- /dev/null +++ b/tzdata.tar.gz Binary files differ
diff --git a/tzdata.url b/tzdata.url new file mode 100644 index 0000000..833bf27 --- /dev/null +++ b/tzdata.url
@@ -0,0 +1 @@ +http://www.iana.org/time-zones/repository/releases/tzdata2012c.tar.gz
diff --git a/tzdata.version b/tzdata.version new file mode 100644 index 0000000..9412b94 --- /dev/null +++ b/tzdata.version
@@ -0,0 +1 @@ +2012c