author | Alan Coopersmith <Alan.Coopersmith@Oracle.COM> |
Tue, 14 Jun 2011 15:32:39 -0700 | |
changeset 304 | cfebb7b36966 |
parent 302 | 0b738df97c00 |
child 337 | dd36f6bd0e18 |
permissions | -rw-r--r-- |
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 |
# |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
21 |
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
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 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
49 |
PKG_OPTIONS += -D COMPONENT_ARCHIVE_URLS='$(COMPONENT_ARCHIVE_URLS:%=value="%")' |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
50 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
51 |
$(ID_FILES): |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
52 |
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
|
53 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
54 |
# 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
|
55 |
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
|
56 |
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
|
57 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
58 |
# Extract the header up to the first blank line |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
59 |
$(BUILD_DIR)/%.header: % $(BUILD_DIR) |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
60 |
$(GSED) -e '/^$$/ q' $< > $@ |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
61 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
62 |
# 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
|
63 |
# __FILENAME__ replace with name of ids file (uses basename to strip |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
64 |
# .license suffix, @F to strip the directories from file path) |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
65 |
# __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
|
66 |
# __HEADER__ line |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
67 |
$(BUILD_DIR)/%.license: $(BUILD_DIR)/%.header |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
68 |
$(GSED) -e 's/__FILENAME__/$(basename $(@F))/' \ |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
69 |
-e '/__HEADER__/ r $<' -e '/__HEADER__/ d' ids.license.tmpl > $@ |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
70 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
71 |
$(BUILD_DIR): |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
72 |
$(MKDIR) $@ |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
73 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
74 |
build: $(BUILD_DIR) $(BUILT_LICENSES) |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
75 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
76 |
test: $(NO_TESTS) |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
77 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
78 |
clean:: |
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
79 |
$(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
|
80 |
|
0b738df97c00
7016849 pkg:/system/data/hardware-registry should move to Userland consolidation
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff
changeset
|
81 |
include ../../make-rules/depend.mk |