| 1 |
## Process this file with automake to produce Makefile.in |
| 2 |
|
| 3 |
## Copyright (c) 2016-2024 Davide Madrisan <[email protected]> |
| 4 |
## |
| 5 |
## This program is free software: you can redistribute it and/or modify |
| 6 |
## it under the terms of the GNU General Public License as published by |
| 7 |
## the Free Software Foundation, either version 3 of the License, or |
| 8 |
## (at your option) any later version. |
| 9 |
## |
| 10 |
## This program is distributed in the hope that it will be useful, |
| 11 |
## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
## GNU General Public License for more details. |
| 14 |
## |
| 15 |
## You should have received a copy of the GNU General Public License |
| 16 |
## along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
|
| 18 |
multibuilddir = $(shell pwd) |
| 19 |
|
| 20 |
DOCKER = /usr/bin/docker |
| 21 |
SPECFILE = $(PACKAGE).spec |
| 22 |
|
| 23 |
# GID and UID of the user 'developer' |
| 24 |
GID ?= "$(shell id -g)" |
| 25 |
UID ?= "$(shell id -u)" |
| 26 |
|
| 27 |
MULTIBUILD_SCRIPT = $(multibuilddir)/multibuild.sh |
| 28 |
|
| 29 |
MULTIBUILD_OPTS = \ |
| 30 |
--shared $(top_srcdir):/shared:rw \ |
| 31 |
--gid $(GID) \ |
| 32 |
--uid $(UID) \ |
| 33 |
--pckver $(PACKAGE_VERSION) |
| 34 |
|
| 35 |
TARGETS_ALPINE = \ |
| 36 |
alpine-3.18 \ |
| 37 |
alpine-3.19 \ |
| 38 |
alpine-3.20 |
| 39 |
alpine-latest: alpine-3.20 |
| 40 |
|
| 41 |
TARGETS_CENTOS_STREAM = \ |
| 42 |
centos-stream-8 centos-stream-9 |
| 43 |
centos-stream-latest: centos-stream-9 |
| 44 |
|
| 45 |
TARGETS_DEBIAN = \ |
| 46 |
debian-buster debian-bullseye debian-bookworm |
| 47 |
debian-10: debian-buster |
| 48 |
debian-11: debian-bullseye |
| 49 |
debian-12: debian-bookworm |
| 50 |
debian-latest: debian-bookworm |
| 51 |
|
| 52 |
TARGETS_FEDORA = \ |
| 53 |
fedora-38 fedora-39 fedora-40 \ |
| 54 |
fedora-rawhide |
| 55 |
fedora-latest: fedora-40 |
| 56 |
|
| 57 |
TARGETS_ROCKY = \ |
| 58 |
rockylinux-8 \ |
| 59 |
rockylinux-9 |
| 60 |
rockylinux-latest: rockylinux-9 |
| 61 |
|
| 62 |
.PHONY: specfile |
| 63 |
specfile: |
| 64 |
@cd $(builddir)/specs && $(MAKE) $(AM_MAKEFLAGS) all |
| 65 |
|
| 66 |
.PHONY: source-archive |
| 67 |
source-archive: |
| 68 |
@cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) dist |
| 69 |
|
| 70 |
$(TARGETS_ALPINE): specfile source-archive $(DOCKER) $(MULTIBUILD_SCRIPT) |
| 71 |
@distr=`echo $@ | sed s/-/:/`; \ |
| 72 |
$(SHELL) $(MULTIBUILD_SCRIPT) $(MULTIBUILD_OPTS) \ |
| 73 |
--spec $(multibuilddir)/specs/APKBUILD \ |
| 74 |
--os $$distr --target pcks/$@ |
| 75 |
|
| 76 |
$(TARGETS_CENTOS_STREAM): specfile source-archive $(DOCKER) $(MULTIBUILD_SCRIPT) |
| 77 |
@distr=`echo $@ | sed s/centos-stream-//\;s~^~docker.io/tgagor/centos:stream~`; \ |
| 78 |
$(SHELL) $(MULTIBUILD_SCRIPT) $(MULTIBUILD_OPTS) \ |
| 79 |
--spec $(multibuilddir)/specs/$(SPECFILE) \ |
| 80 |
--os $$distr --target pcks/$@ |
| 81 |
|
| 82 |
$(TARGETS_DEBIAN): source-archive $(DOCKER) $(MULTIBUILD_SCRIPT) |
| 83 |
@distr=`echo $@ | sed s/-/:/`-slim; \ |
| 84 |
$(SHELL) $(MULTIBUILD_SCRIPT) $(MULTIBUILD_OPTS) \ |
| 85 |
--os $$distr --target pcks/$@ |
| 86 |
|
| 87 |
$(TARGETS_FEDORA): specfile source-archive $(DOCKER) $(MULTIBUILD_SCRIPT) |
| 88 |
@distr=`echo $@ | sed s/-/:/`; \ |
| 89 |
$(SHELL) $(MULTIBUILD_SCRIPT) $(MULTIBUILD_OPTS) \ |
| 90 |
--spec $(multibuilddir)/specs/$(SPECFILE) \ |
| 91 |
--os $$distr --target pcks/$@ |
| 92 |
|
| 93 |
$(TARGETS_ROCKY): specfile source-archive $(DOCKER) $(MULTIBUILD_SCRIPT) |
| 94 |
@distr=`echo $@ | sed s/-/:/`; \ |
| 95 |
$(SHELL) $(MULTIBUILD_SCRIPT) $(MULTIBUILD_OPTS) \ |
| 96 |
--spec $(multibuilddir)/specs/$(SPECFILE) \ |
| 97 |
--os $$distr --target pcks/$@ |
| 98 |
|
| 99 |
EXTRA_DIST = docker-shell-helpers multibuild.sh |
| 100 |
SUBDIRS = specs |