1
- .PHONY : alpine amazonlinux debian ubuntu fedora ubuntu-current-jedi final
1
+ .PHONY : alpine debian ubuntu fedora ubuntu-current-jedi final
2
2
3
3
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST ) ) ) )
4
4
cores := $(shell nproc)
5
5
arch := $(shell uname -m)
6
6
DEFAULT =gerbilxx
7
7
8
8
ifeq ($(BRANCH ) ,)
9
- BRANCH := master
9
+ BRANCH := $( shell git branch --show-current)
10
10
endif
11
11
12
+ TAG := $(shell git describe --tags)
13
+
12
14
ifeq ($(REPO ) ,)
13
- REPO := mighty-gerbils/gerbil
15
+ REPO := $( shell git remote get-url $( shell git rev-parse --abbrev-ref --symbolic-full-name @{u}|cut -f1 -d/) |cut -f2 -d:)
14
16
endif
15
17
16
18
cores := $(shell nproc)
19
+
17
20
$(info the branch is $(BRANCH ) and the repo is $(REPO ) cores are : $(cores ) )
18
21
19
22
alpine_packages := autoconf \
@@ -119,6 +122,10 @@ debian_packages := autoconf \
119
122
texinfo \
120
123
zlib1g-dev
121
124
125
+ debug :
126
+ $(info the branch is $(BRANCH ) and the repo is $(REPO ) cores are: $(cores ) )
127
+
128
+
122
129
gerbilxx :
123
130
docker build --target final \
124
131
--rm=true --no-cache \
@@ -146,20 +153,6 @@ gerbil:
146
153
-t final $(ROOT_DIR )
147
154
docker tag final gerbil/gerbil:$(arch ) -$(BRANCH )
148
155
149
- amazonlinux :
150
- docker build --target final \
151
- --rm=true --no-cache \
152
- --build-arg branch=" $( BRANCH) " \
153
- --build-arg configure_args=" --enable-march=" \
154
- --build-arg cores=$(cores ) \
155
- --build-arg distro=" amazonlinux" \
156
- --build-arg packages=" $( amazon_packages) " \
157
- --build-arg repo=" $( REPO) " \
158
- --build-arg shared=" no" \
159
- --build-arg with_db=" YES" \
160
- -t final $(ROOT_DIR )
161
- docker tag final gerbil/amazonlinux:$(arch ) -$(BRANCH )
162
-
163
156
centos :
164
157
docker build --target final \
165
158
--rm=true --no-cache \
@@ -222,7 +215,7 @@ ubuntu-current-jedi:
222
215
package-ubuntu :
223
216
docker run -v $(ROOT_DIR ) :/src:z -t gerbil/ubuntu:$(arch ) -$(BRANCH ) \
224
217
bash -c " gem install fpm && \
225
- fpm -f -s dir -p /src/ -t deb -n gerbil-$( BRANCH ) .ubuntu \
218
+ fpm -f -s dir -p /src/ -t deb -n gerbil-scheme.ubuntu -v $( TAG ) \
226
219
-d libsqlite3-dev -d libssl-dev \
227
220
--description ' Gerbil Scheme Package' /opt/gerbil"
228
221
@@ -235,30 +228,20 @@ package-fedora:
235
228
bash -c " yum install -y rubygems ruby-devel rpm-build && \
236
229
gem install fpm && \
237
230
fpm -f -s dir -p /src/ -t rpm \
238
- -n gerbil-$(BRANCH ) .fedora \
239
- -d zlib-devel -d zlib-static -d openssl-devel -d sqlite-devel \
231
+ -n gerbil-$(BRANCH ) .fedora -v $( TAG ) \
232
+ -d zlib-devel -d zlib-static -d openssl-devel -d sqlite-devel \
240
233
--description 'Gerbil Scheme Package' /opt/gerbil"
241
234
242
- package-amazonlinux :
243
- docker run -v $(ROOT_DIR ) :/src:z -t gerbil/amazonlinux:$(arch ) -$(BRANCH ) \
244
- bash -c " amazon-linux-extras install -y ruby2.6 && \
245
- yum install -y ruby-devel rubygems rpm-build && \
246
- gem install fpm && \
247
- fpm -s dir -p /src/ -t rpm \
248
- -n gerbil-$(BRANCH ) .amazonlinux \
249
- --description ' Gerbil Package' /opt/gerbil"
250
-
251
235
packages : package-ubuntu package-fedora
252
236
253
237
push-all :
254
238
docker push gerbil/alpine
255
239
docker push gerbil/ubuntu
256
240
docker push gerbil/fedora
257
- docker push gerbil/amazonlinux
258
241
259
242
manifest :
260
243
docker manifest create gerbil/alpine:latest --amend gerbil/alpine:aarch64 --amend gerbil/alpine:x86_64
261
244
262
- all : alpine amazonlinux fedora ubuntu
245
+ all : alpine fedora ubuntu
263
246
264
247
docker : ubuntu
0 commit comments