Makefile revision 1258
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# CDDL HEADER START
2312a9d8e5342846988edcd629e1ac56a8b5d4a9Brendan Mmiller# The contents of this file are subject to the terms of the
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# Common Development and Distribution License (the "License").
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# You may not use this file except in compliance with the License.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# See the License for the specific language governing permissions
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# and limitations under the License.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# When distributing Covered Code, include this CDDL HEADER in each
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# If applicable, add the following below this CDDL HEADER, with the
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# fields enclosed by brackets "[]" replaced with your own identifying
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# information: Portions Copyright [yyyy] [name of copyright owner]
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# CDDL HEADER END
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
bf6542c5aa722eb97a0df17e6db46cc884f203bfJason Vincent# Since upstream only offers the latest snapshot for download, without
331c327f500d45223e8ad933fd4472740a75aeeachad.kienle# any way to retrieve a specific version, we just keep the currently
33c021457bc11072601be0484041e2f46c2616a5Brendan Miller# shipped versions of these two text files directly in the gate and
331c327f500d45223e8ad933fd4472740a75aeeachad.kienle# simply check in new versions to update them.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# When it's time to update, you can use these rules to download with
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# 'gmake -B pci.ids usb.ids' After updating the data files, ensure
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# that the header with version/date and license info is still being
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# correctly extracted and copied into the generated license files.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle @echo 'No downloads for this component'
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCOMPONENT_ARCHIVE_URL_pci.ids = http://pciids.sourceforge.net/v2.2/pci.ids
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCOMPONENT_ARCHIVE_URL_usb.ids = http://www.linux-usb.org/usb.ids
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienleCOMPONENT_ARCHIVE_URLS = $(foreach i,$(ID_FILES),$(COMPONENT_ARCHIVE_URL_$(i)))
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad KienlePKG_OPTIONS += -D COMPONENT_ARCHIVE_URLS='$(COMPONENT_ARCHIVE_URLS:%=value="%")'
331c327f500d45223e8ad933fd4472740a75aeeachad.kienle# License files for packaging are generated during the build
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# Extract the header up to the first blank line
bf6542c5aa722eb97a0df17e6db46cc884f203bfJason Vincent# Generate license files for each document by substituting in templates:
331c327f500d45223e8ad933fd4472740a75aeeachad.kienle# __FILE_NAME_VERS__ replace with name & version of ids file
331c327f500d45223e8ad933fd4472740a75aeeachad.kienle# __TPNO__ - Oracle tracking number
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# __HEADER__ - read in contents of generated header file, then delete the
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle# __HEADER__ line
bf6542c5aa722eb97a0df17e6db46cc884f203bfJason Vincent VERSION="$$(awk -F: '/Version:/ { print $$2 ; exit }' $<)" ; \
49ca89f51e0242b83f998f16a269dc1982460f02Chad Kienle $(GSED) -e "s/__FILE_NAME_VERS__/$${FILE_NAME_VERS}/" \
49ca89f51e0242b83f998f16a269dc1982460f02Chad Kienle -e 's/__TPNO__/$(TPNO_$(@F))/' \
49ca89f51e0242b83f998f16a269dc1982460f02Chad Kienle -e '/__HEADER__/ r $<' -e '/__HEADER__/ d' ids.license.tmpl > $@