1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
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. #
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. #
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/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
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)
34 SUP_ARCH = aarch64 x86_64
36 ###############################################################################
38 ###############################################################################
42 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
44 go$(VER).$(GOOS)-arm64.tar.gz_BLAKE2 = 330336e36ebc7cb8666159256ff6dce965465195db84e29467fe0ffa79b1fa1b698d8751df73bec1cd7d04b528d9d6a9cad259f6ad5036eb89212ebc3e91b686
45 go$(VER).$(GOOS)-amd64.tar.gz_BLAKE2 = 38cca2ef6d5b9f2ef8c3cef6726930be790bde5ee8693a22f15cad2d96212967c52de9361c996f0a7a91f3b28de83e40a9eca3618167bb1340978daf5e104cdf
49 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
51 download :$(patsubst %,$(DIR_DL)/%,$(objects))
53 b2 : $(subst %,%_BLAKE2,$(objects))
55 ###############################################################################
56 # Downloading, checking, b2sum
57 ###############################################################################
59 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
62 $(patsubst %,$(DIR_DL)/%,$(objects)) :
65 $(subst %,%_BLAKE2,$(objects)) :
68 ###############################################################################
69 # Installation Details
70 ###############################################################################
72 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
74 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
76 -mkdir -pv /usr/lib/go
77 cd $(DIR_APP) && cp -av bin pkg src lib misc api test /usr/lib/go
79 ln -svf /usr/lib/go/bin/go /usr/bin/go
80 ln -svf /usr/lib/go/bin/gofmt /usr/bin/gofmt
82 cd $(DIR_APP) && install -v -m 644 VERSION /usr/lib/go/VERSION
84 # Remove some stuff not needed for production
86 /usr/lib/go/pkg/bootstrap \
87 /usr/lib/go/pkg/tool/*/api \
88 /usr/lib/go/pkg/obj/go-build/*