2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2017 Adam Stevko
13 # Copyright 2018 Michal Nowak
14 # Copyright 2022 Niklas Poslovski
15 # Copyright 2022 Daniel Bell
18 include ..
/..
/..
/make-rules
/shared-macros.mk
20 COMPONENT_NAME
= geoip-database
21 COMPONENT_VERSION
= 20240128
22 COMPONENT_SUMMARY
= GeoLite geolocation databases compiled by MaxMind
23 COMPONENT_PROJECT_URL
= https
://mailfud.org
/geoip-legacy
24 COMPONENT_FMRI
= database
/$(COMPONENT_NAME
)
25 COMPONENT_CLASSIFICATION
= System
/Libraries
26 COMPONENT_DOWNLOAD_BASE
=https
://github.com
/dbh201
/geoip-database
/raw
/$(COMPONENT_VERSION
)/
27 COMPONENT_LICENSE
= CC-BY-SA-4.0
29 # Note for updates: Make sure to not only update the component version but also update the hashes in hashes/sha256sums.txt
30 # Plus, remove all former downloaded files.
32 HASH_DIR
=$(COMPONENT_DIR
)/hashes
36 COMPONENT_SRC
= GeoIP.dat
37 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).gz
38 COMPONENT_ARCHIVE_URL
= $(COMPONENT_DOWNLOAD_BASE
)/GeoIP.dat.gz
40 COMPONENT_SRC_1
=GeoIPv6.dat
41 COMPONENT_ARCHIVE_1
=$(COMPONENT_SRC_1
).gz
42 COMPONENT_ARCHIVE_URL_1
=$(COMPONENT_DOWNLOAD_BASE
)/GeoIPv6.dat.gz
44 COMPONENT_SRC_2
=GeoIPCity.dat
45 COMPONENT_ARCHIVE_2
=$(COMPONENT_SRC_2
).gz
46 COMPONENT_ARCHIVE_URL_2
=$(COMPONENT_DOWNLOAD_BASE
)/GeoIPCity.dat.gz
48 COMPONENT_SRC_3
=GeoIPCityv6.dat
49 COMPONENT_ARCHIVE_3
=$(COMPONENT_SRC_3
).gz
50 COMPONENT_ARCHIVE_URL_3
=$(COMPONENT_DOWNLOAD_BASE
)/GeoIPCityv6.dat.gz
52 COMPONENT_SRC_4
=GeoIPASNum.dat
53 COMPONENT_ARCHIVE_4
=$(COMPONENT_SRC_4
).gz
54 COMPONENT_ARCHIVE_URL_4
=$(COMPONENT_DOWNLOAD_BASE
)/GeoIPASNum.dat.gz
56 COMPONENT_SRC_5
=GeoIPASNumv6.dat
57 COMPONENT_ARCHIVE_5
=$(COMPONENT_SRC_5
).gz
58 COMPONENT_ARCHIVE_URL_5
=$(COMPONENT_DOWNLOAD_BASE
)/GeoIPASNumv6.dat.gz
60 define switch-source-dir
61 SOURCE_DIR
$(1)= $$(COMPONENT_SRC
$(1))-$$(COMPONENT_VERSION
)
62 UNPACK_ARGS
$(1)= -r
$$(SOURCE_DIR
$(1))
65 $(eval
$(call switch-source-dir
,))
66 $(foreach suffix,1 2 3 4 5,$(eval
$(call switch-source-dir
,_
$(suffix))) )
68 include $(WS_MAKE_RULES
)/prep.mk
69 include $(WS_MAKE_RULES
)/ips.mk
71 CLEAN_PATHS
+= $(BUILD_DIR
)
73 $(BUILD_DIR_64
)/.built
:
74 $(MKDIR
) $(BUILD_DIR_64
)
78 $(MKDIR
) $(PROTOUSRSHAREDIR
)/GeoIP
80 $(INSTALL
) -m
0644 $(SOURCE_DIR
)/GeoIP.dat
$(PROTOUSRSHAREDIR
)/GeoIP
/GeoIP.dat
81 $(INSTALL
) -m
0644 $(SOURCE_DIR_1
)/GeoIPv6.dat
$(PROTOUSRSHAREDIR
)/GeoIP
/GeoIPv6.dat
82 $(INSTALL
) -m
0644 $(SOURCE_DIR_2
)/GeoIPCity.dat
$(PROTOUSRSHAREDIR
)/GeoIP
/GeoIPCity.dat
83 $(INSTALL
) -m
0644 $(SOURCE_DIR_3
)/GeoIPCityv6.dat
$(PROTOUSRSHAREDIR
)/GeoIP
/GeoIPCityv6.dat
84 $(INSTALL
) -m
0644 $(SOURCE_DIR_4
)/GeoIPASNum.dat
$(PROTOUSRSHAREDIR
)/GeoIP
/GeoIPASNum.dat
85 $(INSTALL
) -m
0644 $(SOURCE_DIR_5
)/GeoIPASNumv6.dat
$(PROTOUSRSHAREDIR
)/GeoIP
/GeoIPASNumv6.dat
89 build
: $(BUILD_64
) prep
91 install: $(INSTALL_64
) build
93 # Auto-generated dependencies