]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/go
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / lfs / go
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
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
27 VER = 1.20.4
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)
34 SUP_ARCH = aarch64 x86_64
35
36 ###############################################################################
37 # Top-level Rules
38 ###############################################################################
39
40 objects = $(DL_FILE)
41
42 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
43
44 go$(VER).$(GOOS)-arm64.tar.gz_BLAKE2 = 330336e36ebc7cb8666159256ff6dce965465195db84e29467fe0ffa79b1fa1b698d8751df73bec1cd7d04b528d9d6a9cad259f6ad5036eb89212ebc3e91b686
45 go$(VER).$(GOOS)-amd64.tar.gz_BLAKE2 = 38cca2ef6d5b9f2ef8c3cef6726930be790bde5ee8693a22f15cad2d96212967c52de9361c996f0a7a91f3b28de83e40a9eca3618167bb1340978daf5e104cdf
46
47 install : $(TARGET)
48
49 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
50
51 download :$(patsubst %,$(DIR_DL)/%,$(objects))
52
53 b2 : $(subst %,%_BLAKE2,$(objects))
54
55 ###############################################################################
56 # Downloading, checking, b2sum
57 ###############################################################################
58
59 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
60 @$(CHECK)
61
62 $(patsubst %,$(DIR_DL)/%,$(objects)) :
63 @$(LOAD)
64
65 $(subst %,%_BLAKE2,$(objects)) :
66 @$(B2SUM)
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)