mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-03-14 06:06:16 +01:00
Signed-off-by: SayfEddine <sayf-eddine.hammemi@scality.com> Signed-off-by: SayfEddine <sayf-eddine.hammemi@scality.com>
31 lines
792 B
Makefile
31 lines
792 B
Makefile
# Makefile for building packages for CoreDNS.
|
|
|
|
# ARCH can be and default to amd64 is not set.
|
|
ARCH := amd64 armhf arm64
|
|
redhat-packages-dist := $(patsubst %.centos,%,$(shell rpm --eval "%{dist}"))
|
|
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
mkfile_dir := $(dir $(mkfile_path))
|
|
|
|
ifeq ($(ARCH),)
|
|
ARCH:=amd64
|
|
endif
|
|
|
|
.PHONY: debian
|
|
debian:
|
|
for a in $(ARCH); do \
|
|
dpkg-buildpackage -us -uc -b --target-arch $$a ;\
|
|
done
|
|
|
|
debian-clean:
|
|
rm *.tgz
|
|
|
|
.PHONY: redhat
|
|
redhat:
|
|
rpmbuild --undefine=_disable_source_fetch -ba \
|
|
--verbose $(mkfile_dir)/redhat/SPECS/coredns.spec \
|
|
--define "_topdir $(mkfile_dir)/redhat" --define "dist $(redhat-packages-dist)"
|
|
|
|
redhat-clean:
|
|
rm -r $(mkfile_dir)/redhat/RPMS/*
|
|
rm -r $(mkfile_dir)/redhat/SRPMS/*
|
|
rm -r $(mkfile_dir)/redhat/BUILD/*
|