initial commit
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
commit
1748fdcf26
8 changed files with 188 additions and 0 deletions
46
Makefile
Normal file
46
Makefile
Normal file
|
@ -0,0 +1,46 @@
|
|||
pkgname := host-ctr-scripts
|
||||
specname ?= $(pkgname).spec
|
||||
pwd := $(shell pwd)
|
||||
NAME ?= $(shell rpmspec -q --qf "%{name}" $(specname))
|
||||
VERSION ?= $(shell rpmspec -q --qf "%{version}" $(specname))
|
||||
RELEASE ?= $(shell rpmspec -q --qf "%{release}" $(specname))
|
||||
NVR := $(NAME)-$(VERSION)-$(RELEASE)
|
||||
outdir ?= $(pwd)
|
||||
|
||||
default: srpm
|
||||
|
||||
all: rpm srpm
|
||||
|
||||
name:
|
||||
@echo $(NVR)
|
||||
|
||||
rpm:
|
||||
rpmbuild \
|
||||
--define '_sourcedir $(pwd)' \
|
||||
--define '_specdir $(pwd)' \
|
||||
--define '_builddir $(pwd)' \
|
||||
--define '_srcrpmdir $(outdir)' \
|
||||
--define '_rpmdir $(outdir)' \
|
||||
-bb ./$(specname)
|
||||
|
||||
srpm: $(NVR).src.rpm
|
||||
|
||||
$(NVR).src.rpm: $(specname) $(wildcard *.diff)
|
||||
rpmbuild \
|
||||
--define '_sourcedir $(pwd)' \
|
||||
--define '_specdir $(pwd)' \
|
||||
--define '_builddir $(pwd)' \
|
||||
--define '_srcrpmdir $(outdir)' \
|
||||
--define '_rpmdir $(outdir)' \
|
||||
--nodeps \
|
||||
-bs ./$(specname)
|
||||
|
||||
builddep: $(NVR).src.rpm
|
||||
dnf builddep -y $<
|
||||
|
||||
rebuild: builddep
|
||||
rpmbuild --rebuild $(NVR).src.rpm
|
||||
|
||||
clean:
|
||||
rm -rf *~ *.rpm noarch
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue