37 lines
1.4 KiB
Makefile
37 lines
1.4 KiB
Makefile
# Make mock usable. The only standard target is mockbuild which
|
|
# doesn't do what you typically want.
|
|
|
|
SRPM := $(PWD)/$(shell fedpkg verrel).src.rpm
|
|
RESULTDIR := $(PWD)/$(shell fedpkg verrel)
|
|
MOCKCFG = fedora-devel-i386
|
|
|
|
help:
|
|
@echo "Mock targets"
|
|
@echo " mock-local mock-build: Build from scratch using mock; keep the results"
|
|
@echo " mock-shell: Start a chrooted shell in the build-chroot"
|
|
@echo " mock-init: Initialize a new clean build-chroot"
|
|
@echo " mock-clean: Purge the build-chroot"
|
|
@echo " mock-update: Run yum update in the build-chroot"
|
|
@echo " mock-orphanskill: Kill any stray processes from the build"
|
|
@echo " mock-install PACKAGE=rpm: Install PACKAGE"
|
|
@echo " mock-installdeps PACKAGE=rpm: Install dependencies for PACKAGE"
|
|
@echo "Use MOCKARGS= for extra arguments"
|
|
.PHONY:: help
|
|
|
|
# -prep -compile -install -compile-short -install-short
|
|
local build: srpm
|
|
mock --no-clean --no-cleanup-after $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(RESULTDIR) --rebuild $(SRPM)
|
|
.PHONY:: local build
|
|
|
|
init clean shell update orphanskill:
|
|
mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(RESULTDIR) --$@
|
|
.PHONY:: init clean shell update orphanskill
|
|
|
|
install installdeps:
|
|
if test x"$(PACKAGE)" = x ; then echo Supply PACKAGE ; exit 1 ; fi
|
|
mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(RESULTDIR) --$@ $(PACKAGE)
|
|
.PHONY:: install installdeps
|
|
|
|
srpm:
|
|
fedpkg srpm
|
|
.PHONY:: srpm
|