This repository has been archived on 2020-03-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
hack-rpm/.copr/Makefile
2019-10-17 08:35:06 -04:00

24 lines
670 B
Makefile

pkgname := hack-rpm
spec := $(pkgname).spec
pwd := $(shell pwd)
NAME := $(shell rpmspec -q --qf "%{name}" $(spec))
VERSION := $(shell rpmspec -q --qf "%{version}" $(spec))
RELEASE := $(shell rpmspec -q --qf "%{release}" $(spec))
NVR := $(NAME)-$(VERSION)-$(RELEASE)
outdir ?= $(pwd)
default: srpm
.PHONY:srpm
srpm: $(NVR).src.rpm
$(NVR).src.rpm: $(spec)
rpmbuild \
--define '_sourcedir $(pwd)' \
--define '_specdir $(pwd)' \
--define '_builddir $(pwd)' \
--define '_srcrpmdir $(outdir)' \
--define '_rpmdir $(outdir)' \
--nodeps \
-bs ./$(spec)