-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathMakefile.repo
More file actions
156 lines (126 loc) · 4.63 KB
/
Copy pathMakefile.repo
File metadata and controls
156 lines (126 loc) · 4.63 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#### REPO BUILD ####
repo: check_env repo/debian repo/ubuntu repo/centos repo/oraclelinux repo/rhel repo/alt repo/suse repo_finish
@echo Build repo for all platform: done
# Debian
repo/debian: build/repo_debian_9 build/repo_debian_10 build/repo_debian_11
@echo Build repo for debian platforms: done
build/repo_debian_9:
$(call build_repo_deb,debian,9,stretch)
touch build/repo_debian_9
build/repo_debian_10:
$(call build_repo_deb,debian,10,buster)
touch build/repo_debian_10
build/repo_debian_11:
$(call build_repo_deb,debian,11,bullseye)
touch build/repo_debian_11
# Ubuntu
repo/ubuntu: build/repo_ubuntu_18.04 build/repo_ubuntu_20.04
@echo Build repo for ubuntu platforms: done
build/repo_ubuntu_18.04:
$(call build_repo_deb,ubuntu,18.04,bionic)
touch build/repo_ubuntu_18.04
build/repo_ubuntu_20.04:
$(call build_repo_deb,ubuntu,20.04,focal)
touch build/repo_ubuntu_20.04
# Centos
repo/centos: build/repo_centos_7 build/repo_centos_8
@echo Build repo for centos platforms: done
build/repo_centos_7:
$(call build_repo_rpm,centos,7,,)
touch build/repo_centos_7
build/repo_centos_8:
$(call build_repo_rpm,centos,8,,)
touch build/repo_centos_8
# Oraclelinux
repo/oraclelinux: build/repo_oraclelinux_6 build/repo_oraclelinux_7 build/repo_oraclelinux_8
@echo Build repo for oraclelinux platforms: done
build/repo_oraclelinux_6:
$(call build_repo_rpm,oraclelinux,6,6Server)
touch build/repo_oraclelinux_6
build/repo_oraclelinux_7:
$(call build_repo_rpm,oraclelinux,7,7Server)
touch build/repo_oraclelinux_7
build/repo_oraclelinux_8:
$(call build_repo_rpm,oraclelinux,8,,)
touch build/repo_oraclelinux_8
# RHEL
repo/rhel: build/repo_rhel_7 build/repo_rhel_8
@echo Build repo for rhel platforms: done
build/repo_rhel_7:
$(call build_repo_rpm,rhel,7,7Server)
touch build/repo_rhel_7
build/repo_rhel_8:
$(call build_repo_rpm,rhel,8,,)
touch build/repo_rhel_8
# ALT
repo/alt: build/repo_alt_7 build/repo_alt_8 build/repo_alt_9
@echo Build repo for alt platforms: done
build/repo_alt_7:
$(call build_repo_alt,alt,7,,)
touch build/repo_alt_7
build/repo_alt_8:
$(call build_repo_alt,alt,8,,)
touch build/repo_alt_8
build/repo_alt_9:
$(call build_repo_alt,alt,9,,)
touch build/repo_alt_9
# SUSE
repo/suse: build/repo_suse_15.1 build/repo_suse_15.2
@echo Build repo for suse platforms: done
build/repo_suse_15.1:
$(call build_repo_suse,suse,15.1,,)
touch build/repo_suse_15.1
build/repo_suse_15.2:
$(call build_repo_suse,suse,15.2,,)
touch build/repo_suse_15.2
repo_finish:
# cd build/data/www/$(PBK_PKG_REPO)/
cd $(BUILDDIR)/data/www/$(PBK_PKG_REPO)/rpm && sudo ln -nsf $(PBK_VERSION) latest
# following line only for vanilla
cd $(BUILDDIR)/data/www/$(PBK_PKG_REPO)/srpm && sudo ln -nsf $(PBK_VERSION) latest
# sudo ln -rfs build/data/www/$(PBK_PKG_REPO)/rpm/${PBK_VERSION} build/data/www/$(PBK_PKG_REPO)/rpm/latest
# sudo ln -rfs build/data/www/$(PBK_PKG_REPO)/srpm/${PBK_VERSION} build/data/www/$(PBK_PKG_REPO)/srpm/latest
define build_repo_deb
docker rm -f $1_$2_pbk_repo >> /dev/null 2>&1 ; \
docker run \
-v $(WORKDIR)/packaging/repo:/app/repo \
-v $(WORKDIR)/build/data/www:/app/www \
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2:/app/in \
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" \
-e "PBK_PKG_REPO=$(PBK_PKG_REPO)" -e "PBK_EDITION=$(PBK_EDITION)" \
--name $1_$2_pbk_repo \
--rm pgpro/repo /app/repo/scripts/deb.sh
endef
define build_repo_rpm
docker rm -f $1_$2_pbk_repo >> /dev/null 2>&1 ; \
docker run \
-v $(WORKDIR)/packaging/repo:/app/repo \
-v $(WORKDIR)/build/data/www:/app/www \
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2:/app/in \
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" \
-e "PBK_PKG_REPO=$(PBK_PKG_REPO)" -e "PBK_EDITION=$(PBK_EDITION)" \
--name $1_$2_pbk_repo \
--rm pgpro/repo /app/repo/scripts/rpm.sh
endef
define build_repo_alt
docker rm -f $1_$2_pbk_repo >> /dev/null 2>&1 ; \
docker run \
-v $(WORKDIR)/packaging/repo:/app/repo \
-v $(WORKDIR)/build/data/www:/app/www \
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2:/app/in \
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" \
-e "PBK_PKG_REPO=$(PBK_PKG_REPO)" -e "PBK_EDITION=$(PBK_EDITION)" \
--name $1_$2_pbk_repo \
--rm pgpro/$1:$2 /app/repo/scripts/alt.sh
endef
define build_repo_suse
docker rm -f $1_$2_pbk_repo >> /dev/null 2>&1 ; \
docker run \
-v $(WORKDIR)/packaging/repo:/app/repo \
-v $(WORKDIR)/build/data/www:/app/www \
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2:/app/in \
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" \
-e "PBK_PKG_REPO=$(PBK_PKG_REPO)" -e "PBK_EDITION=$(PBK_EDITION)" \
--name $1_$2_pbk_repo \
--rm pgpro/$1:$2 /app/repo/scripts/suse.sh
endef