forked from ogero/traefik4srm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (34 loc) · 1.31 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SHELL := /bin/bash
SPACE := $(subst ,, )
PACKAGE_NAME = Traefik4SRM
PACKAGE_REV = 0004
TRAEFIK_VERSION = 2.11.0
TRAEFIK_OS = linux
TRAEFIK = traefik_v$(TRAEFIK_VERSION)_$(TRAEFIK_OS)_$(TRAEFIK_ARCH)
src/INFO:
rm -f $@
echo "package=\"$(PACKAGE_NAME)\"">$@
echo "version=\"$(TRAEFIK_VERSION)-$(PACKAGE_REV)\"">>$@
echo "maintainer=\"Debben80\"">>$@
echo "maintainer_url=\"https://github.com/debben80/traefik4srm\"">>$@
echo "arch=\"$(PACKAGE_ARCH)\"">>$@
echo "description=\"Traefik $(TRAEFIK_VERSION) for SRM\"">>$@
echo "displayname=\"Traefik for SRM\"">>$@
traefik/$(TRAEFIK).tar.gz:
mkdir -p traefik
wget -O traefik/$(TRAEFIK).tar.gz https://github.com/traefik/traefik/releases/download/v$(TRAEFIK_VERSION)/$(TRAEFIK).tar.gz
cd traefik && tar -xf $(TRAEFIK).tar.gz traefik
traefik/usr/bin/traefik: traefik/$(TRAEFIK).tar.gz
rm -rf traefik/usr/
mkdir -p traefik/usr/bin
cp traefik/traefik $@
src/package.tgz: traefik/usr/bin/traefik
cd traefik && tar -czf ../$@ usr/
build_spk: clean src/INFO src/package.tgz
rm -f "$(PACKAGE_NAME)-$(TRAEFIK_VERSION)-$(PACKAGE_REV)-$(subst $(SPACE),_,$(PACKAGE_ARCH)).spk"
cd src && tar -cf "../$(PACKAGE_NAME)-$(TRAEFIK_VERSION)-$(PACKAGE_REV)-$(subst $(SPACE),_,$(PACKAGE_ARCH)).spk" *
clean:
rm -f src/INFO src/package.tgz
rm -rf traefik/
clean_spk:
rm -f $(PACKAGE_NAME)-*.spk