mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-24 09:23:46 +00:00
- Support .copr/Makefile for 'SCM / make srpm' COPR package - Use genrpm.sh to generate srpm and optionally build it - Use generic substitution syntax in specfile
20 lines
341 B
Makefile
20 lines
341 B
Makefile
.PHONY: deps srpm
|
|
.DEFAULT_GOAL := srpm
|
|
|
|
DOT_COPR := $(dir $(firstword $(MAKEFILE_LIST)))
|
|
TOP_DIR := $(realpath $(DOT_COPR)/../)
|
|
|
|
RPM_DIR := $(TOP_DIR)/rpm
|
|
outdir ?= $(RPM_DIR)/SRPMS
|
|
|
|
HAS_GIT := $(shell command -v git 2> /dev/null)
|
|
ifndef HAS_GIT
|
|
deps:
|
|
dnf -y install git
|
|
else
|
|
deps:
|
|
endif
|
|
|
|
srpm: deps
|
|
$(TOP_DIR)/rpm/genrpm.sh -o $(outdir)
|