]>
Commit | Line | Data |
---|---|---|
d2315d00 MT |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
51e29a79 | 4 | # Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> # |
d2315d00 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
51e29a79 | 27 | VER = 1.20.4 |
d2315d00 MT |
28 | |
29 | THISAPP = go-$(VER) | |
30 | DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz | |
31 | DL_FROM = $(URL_IPFIRE) | |
32 | DIR_APP = $(DIR_SRC)/go | |
33 | TARGET = $(DIR_INFO)/$(THISAPP) | |
8f43a91a | 34 | SUP_ARCH = aarch64 x86_64 |
d2315d00 MT |
35 | |
36 | ############################################################################### | |
37 | # Top-level Rules | |
38 | ############################################################################### | |
39 | ||
40 | objects = $(DL_FILE) | |
41 | ||
42 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
43 | ||
51e29a79 AB |
44 | go$(VER).$(GOOS)-arm64.tar.gz_BLAKE2 = 330336e36ebc7cb8666159256ff6dce965465195db84e29467fe0ffa79b1fa1b698d8751df73bec1cd7d04b528d9d6a9cad259f6ad5036eb89212ebc3e91b686 |
45 | go$(VER).$(GOOS)-amd64.tar.gz_BLAKE2 = 38cca2ef6d5b9f2ef8c3cef6726930be790bde5ee8693a22f15cad2d96212967c52de9361c996f0a7a91f3b28de83e40a9eca3618167bb1340978daf5e104cdf | |
d2315d00 MT |
46 | |
47 | install : $(TARGET) | |
48 | ||
49 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
50 | ||
51 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
52 | ||
9a7e4d85 | 53 | b2 : $(subst %,%_BLAKE2,$(objects)) |
d2315d00 MT |
54 | |
55 | ############################################################################### | |
9a7e4d85 | 56 | # Downloading, checking, b2sum |
d2315d00 MT |
57 | ############################################################################### |
58 | ||
59 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
60 | @$(CHECK) | |
61 | ||
62 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
63 | @$(LOAD) | |
64 | ||
9a7e4d85 PM |
65 | $(subst %,%_BLAKE2,$(objects)) : |
66 | @$(B2SUM) | |
d2315d00 MT |
67 | |
68 | ############################################################################### | |
69 | # Installation Details | |
70 | ############################################################################### | |
71 | ||
72 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
73 | @$(PREBUILD) | |
74 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) | |
75 | ||
76 | -mkdir -pv /usr/lib/go | |
77 | cd $(DIR_APP) && cp -av bin pkg src lib misc api test /usr/lib/go | |
78 | ||
79 | ln -svf /usr/lib/go/bin/go /usr/bin/go | |
80 | ln -svf /usr/lib/go/bin/gofmt /usr/bin/gofmt | |
81 | ||
82 | cd $(DIR_APP) && install -v -m 644 VERSION /usr/lib/go/VERSION | |
83 | ||
84 | # Remove some stuff not needed for production | |
85 | rm -rvf \ | |
86 | /usr/lib/go/pkg/bootstrap \ | |
87 | /usr/lib/go/pkg/tool/*/api \ | |
88 | /usr/lib/go/pkg/obj/go-build/* | |
89 | ||
90 | @rm -rf $(DIR_APP) | |
91 | @$(POSTBUILD) |