]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/go
Core Update 176: Ship extrahd.cgi
[ipfire-2.x.git] / lfs / go
CommitLineData
d2315d00
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007-2018 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
25include Config
26
64d6b06a 27VER = 1.15.4
d2315d00
MT
28
29THISAPP = go-$(VER)
30DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz
31DL_FROM = $(URL_IPFIRE)
32DIR_APP = $(DIR_SRC)/go
33TARGET = $(DIR_INFO)/$(THISAPP)
8f43a91a 34SUP_ARCH = aarch64 x86_64
d2315d00
MT
35
36###############################################################################
37# Top-level Rules
38###############################################################################
39
40objects = $(DL_FILE)
41
42$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
43
8f43a91a 44go$(VER).$(GOOS)-arm64.tar.gz_BLAKE2 = ef1708965bcd415fdad498e27729d0259f83e16a542f37dae1fb70f71127dfa0cb8570e4896474e6a94bb461e16ff8000e8072bc731c637fce5f384227359e14
f241a8c8 45go$(VER).$(GOOS)-amd64.tar.gz_BLAKE2 = d200046147e31fac1a754fc34ac4a5043414a1d6e90aa3387c933c395acede0b8d5b797affaa85c2188af4d15566b4fcd08108350fe73ed90b1c305600c655c9
d2315d00
MT
46
47install : $(TARGET)
48
49check : $(patsubst %,$(DIR_CHK)/%,$(objects))
50
51download :$(patsubst %,$(DIR_DL)/%,$(objects))
52
9a7e4d85 53b2 : $(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)