components/hwdata/Makefile
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 12 Aug 2013 16:47:25 -0700
changeset 1428 94d2b78b3e05
parent 1205 6c6c27bcf9ac
child 1434 c782e620dd26
child 3661 47545fb8aed4
child 4160 79f95089d021
permissions -rw-r--r--
17205829 Update device ids data files to current versions as of 2013.07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     1
#
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     3
#
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
#
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
#
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    18
#
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
#
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    21
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
#
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
COMPONENT_NAME=         hwdata
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
COMPONENT_VERSION=      0.5.11
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    27
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
include ../../make-rules/ips.mk
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
# Since upstream only offers the latest snapshot for download, without
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
# any way to retrieve a specific version, we just keep the currently
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
# shipped versions of these two text files directly in the gate and 
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
# simply check in new versions to update them.
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
#
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
# When it's time to update, you can use these rules to download with
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
# 'gmake -B pci.ids usb.ids'   After updating the data files, ensure
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
# that the header with version/date and license info is still being 
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
# correctly extracted and copied into the generated license files.
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
304
cfebb7b36966 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation (fix downloads)
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 302
diff changeset
    40
download::
cfebb7b36966 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation (fix downloads)
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 302
diff changeset
    41
	@echo 'No downloads for this component'
cfebb7b36966 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation (fix downloads)
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 302
diff changeset
    42
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
ID_FILES = pci.ids usb.ids
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    44
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
COMPONENT_ARCHIVE_URL_pci.ids =	http://pciids.sourceforge.net/v2.2/pci.ids
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
COMPONENT_ARCHIVE_URL_usb.ids =	http://www.linux-usb.org/usb.ids
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    47
COMPONENT_ARCHIVE_URLS = $(foreach i,$(ID_FILES),$(COMPONENT_ARCHIVE_URL_$(i)))
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 906
diff changeset
    49
COMPONENT_BUGDB=	utility/hwdata
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 906
diff changeset
    50
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    51
# Retrieve version from ids file
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    52
ID_VERSION_EXTRACT_COMMAND=$(GSED) -n -e '/Version:/ { s/^.*: //p' -e ' q }'
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    53
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
PKG_OPTIONS += -D COMPONENT_ARCHIVE_URLS='$(COMPONENT_ARCHIVE_URLS:%=value="%")'
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    55
PKG_MACROS += $(foreach i,$(ID_FILES),\
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    56
    COMPONENT_VERSION_$(i)='$(shell $(ID_VERSION_EXTRACT_COMMAND) $(i))')
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    57
1428
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1205
diff changeset
    58
# This package delivers only data files and has no dependencies.
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1205
diff changeset
    59
EXTDEPFILES = $(NULLDEPFILE)
94d2b78b3e05 17205829 Update device ids data files to current versions as of 2013.07
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1205
diff changeset
    60
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    61
# Since we have two separately licensed components we don't use the default
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    62
# license transform rules, but handle the license info metadata directly
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    63
LICENSE_TRANSFORMS =
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    64
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    65
$(ID_FILES):
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    66
	curl -s -o $@ $(COMPONENT_ARCHIVE_URL_$(@F))
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    67
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    68
# License files for packaging are generated during the build
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    69
LICENSES = $(ID_FILES:%=%.license)
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    70
BUILT_LICENSES = $(LICENSES:%=$(BUILD_DIR)/%)
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    71
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    72
# Extract the header up to the first blank line
906
64a7c8b456a0 7180963 Update device ids data files to current versions as of 2012.06
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 338
diff changeset
    73
$(BUILD_DIR)/%.header: %
64a7c8b456a0 7180963 Update device ids data files to current versions as of 2012.06
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 338
diff changeset
    74
	$(MKDIR) $(@D)
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    75
	$(GSED) -e '/^$$/ q' $< > $@
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    76
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    77
# Generate license files for each document by substituting in templates:
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    78
# __HEADER__ - read in contents of generated header file, then delete the 
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    79
#		__HEADER__ line
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    80
$(BUILD_DIR)/%.license: $(BUILD_DIR)/%.header
1205
6c6c27bcf9ac 16431724 Adjust how license text and Oracle internal tracking numbers are propagated
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    81
	$(GSED) -e '/__HEADER__/ r $<' -e '/__HEADER__/ d' ids.license.tmpl > $@
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    82
906
64a7c8b456a0 7180963 Update device ids data files to current versions as of 2012.06
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 338
diff changeset
    83
install build: $(BUILT_LICENSES)
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    84
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    85
test:	$(NO_TESTS)
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    86
338
e22e8717ebfa 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation (add clobber target)
ulhg@userland.us.oracle.com
parents: 337
diff changeset
    87
clobber clean::
302
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    88
	$(RM) -r $(BUILD_DIR)
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    89
0b738df97c00 7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    90
include ../../make-rules/depend.mk