You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
575 B

2 years ago
2 years ago
  1. .PHONY: deps srpm
  2. .DEFAULT_GOAL := srpm
  3. DOT_COPR := $(dir $(firstword $(MAKEFILE_LIST)))
  4. TOP_DIR := $(realpath $(DOT_COPR)/../)
  5. RPM_DIR := $(TOP_DIR)/rpm
  6. outdir ?= $(RPM_DIR)/SRPMS
  7. HAS_GIT := $(shell command -v git 2> /dev/null)
  8. ifndef HAS_GIT
  9. deps:
  10. dnf -y install git
  11. else
  12. deps:
  13. endif
  14. srpm: deps
  15. git config --global --add safe.directory $(TOP_DIR)
  16. git config --global --add safe.directory $(TOP_DIR)/libbloom
  17. git config --global --add safe.directory $(TOP_DIR)/libcork
  18. git config --global --add safe.directory $(TOP_DIR)/libipset
  19. $(RPM_DIR)/genrpm.sh -o $(outdir)