contrib/packaging/Makefile
branchstable
changeset 43360 0b65f18edc4f
parent 43357 90dc0d3111d0
child 43361 9892599de2dc
equal deleted inserted replaced
43359:e66a3bfcb19b 43360:0b65f18edc4f
     9   xenial \
     9   xenial \
    10   bionic \
    10   bionic \
    11   cosmic \
    11   cosmic \
    12   disco
    12   disco
    13 
    13 
    14 FEDORA_RELEASES := \
    14 FEDORA_RELEASE := 29
    15   29
       
    16 
    15 
    17 CENTOS_RELEASES := \
    16 CENTOS_RELEASES := \
    18   5 \
    17   5 \
    19   6 \
    18   6 \
    20   7
    19   7
    29 	@echo '   Build an RPM for a specific CentOS version using Docker.'
    28 	@echo '   Build an RPM for a specific CentOS version using Docker.'
    30 	@echo ''
    29 	@echo ''
    31 	@echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}'
    30 	@echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}'
    32 	@echo '   Build Debian packages specific to a Debian distro using Docker.'
    31 	@echo '   Build Debian packages specific to a Debian distro using Docker.'
    33 	@echo ''
    32 	@echo ''
    34 	@echo 'docker-fedora{$(strip $(FEDORA_RELEASES))}'
    33 	@echo 'docker-fedora'
    35 	@echo '   Build an RPM for a specific Fedora version using Docker.'
    34 	@echo '   Build an RPM for a Fedora $(FEDORA_RELEASE) using Docker.'
    36 	@echo ''
    35 	@echo ''
    37 	@echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}'
    36 	@echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}'
    38 	@echo '   Build Debian package specific to an Ubuntu distro using Docker.'
    37 	@echo '   Build Debian package specific to an Ubuntu distro using Docker.'
    39 	@echo ''
    38 	@echo ''
    40 	@echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}-ppa'
    39 	@echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}-ppa'
    54 	@echo '   Build a Debian source package locally targeting the current system'
    53 	@echo '   Build a Debian source package locally targeting the current system'
    55 	@echo ''
    54 	@echo ''
    56 	@echo 'centos{$(strip $(CENTOS_RELEASES))}'
    55 	@echo 'centos{$(strip $(CENTOS_RELEASES))}'
    57 	@echo '   Build an RPM for a specific CentOS version locally'
    56 	@echo '   Build an RPM for a specific CentOS version locally'
    58 	@echo ''
    57 	@echo ''
    59 	@echo 'fedora{$(strip $(FEDORA_RELEASES))}'
    58 	@echo 'fedora'
    60 	@echo '   Build an RPM for a specific Fedora version locally'
    59 	@echo '   Build an RPM for Fedora $(FEDORA_RELEASE) locally'
    61 
    60 
    62 .PHONY: help
    61 .PHONY: help
    63 
    62 
    64 .PHONY: deb
    63 .PHONY: deb
    65 deb:
    64 deb:
    92 endef
    91 endef
    93 
    92 
    94 $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename))))
    93 $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename))))
    95 
    94 
    96 # Fedora targets.
    95 # Fedora targets.
    97 define fedora_targets
    96 .PHONY: fedora
    98 .PHONY: fedora$(1)
    97 fedora:
    99 fedora$(1):
    98 	mkdir -p $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
   100 	mkdir -p $$(HGROOT)/packages/fedora$(1)
       
   101 	./buildrpm
    99 	./buildrpm
   102 	cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/fedora$(1)
   100 	cp $(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
   103 	cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/fedora$(1)
   101 	cp $(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
   104 	rm -rf $(HGROOT)/rpmbuild
   102 	rm -rf $(HGROOT)/rpmbuild
   105 
   103 
   106 .PHONY: docker-fedora$(1)
   104 .PHONY: docker-fedora
   107 docker-fedora$(1):
   105 docker-fedora:
   108 	./dockerrpm fedora$(1)
   106 	./dockerrpm fedora$(FEDORA_RELEASE)
   109 
       
   110 endef
       
   111 
       
   112 $(foreach release,$(FEDORA_RELEASES),$(eval $(call fedora_targets,$(release))))
       
   113 
   107 
   114 # CentOS targets.
   108 # CentOS targets.
   115 define centos_targets
   109 define centos_targets
   116 .PHONY: centos$(1)
   110 .PHONY: centos$(1)
   117 centos$(1):
   111 centos$(1):