summaryrefslogtreecommitdiff
path: root/.copr/Makefile
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-28 13:07:58 -0600
committerbaude <bbaude@redhat.com>2018-02-28 13:08:35 -0600
commit45478b78434224f7686172959ce3d82858746758 (patch)
treec3a1aeb19f527aebdc67a4460bdaf2a10fdd191f /.copr/Makefile
parent2a59653bf3d5230a8be1a20ed9fcf53a185afba3 (diff)
downloadpodman-45478b78434224f7686172959ce3d82858746758.tar.gz
podman-45478b78434224f7686172959ce3d82858746758.tar.bz2
podman-45478b78434224f7686172959ce3d82858746758.zip
Re-enable copr builds
New structure for copr builds which hopefully is more stable Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to '.copr/Makefile')
-rw-r--r--.copr/Makefile31
1 files changed, 5 insertions, 26 deletions
diff --git a/.copr/Makefile b/.copr/Makefile
index 0b2e1c8f2..3ba480376 100644
--- a/.copr/Makefile
+++ b/.copr/Makefile
@@ -1,28 +1,7 @@
#!/usr/bin/make -f
+mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
+current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
-spec := contrib/spec/podman.spec
-outdir := $(CURDIR)
-tmpdir := build
-gitdir := $(PWD)/.git
-
-rev := $(shell git rev-list HEAD | head -n1 | cut -c -7)
-date := $(shell date +%Y%m%d.%H%M)
-
-version := $(shell sed -n '/Version:/{s/.* //;p}' $(spec))
-release := $(date).git.$(rev)
-
-srpm: $(outdir)/podman-$(version)-$(release).src.rpm
-
-$(tmpdir)/podman.spec: $(spec)
- @mkdir -p $(tmpdir)
- sed '/^Release:/s/\(: *\).*/\1$(release)%{?dist}/' $< >$@
-
-$(tmpdir)/$(version).tar.gz: $(gitdir)/..
- @mkdir -p $(tmpdir)
- tar c --exclude-vcs --exclude-vcs-ignores -C $< --transform 's|^\.|podman-$(version)|' . | gzip -9 >$@
-
-$(outdir)/podman-$(version)-$(release).src.rpm: $(tmpdir)/podman.spec $(tmpdir)/$(version).tar.gz
- @mkdir -p $(outdir)
- rpmbuild -D'_srcrpmdir $(outdir)' -D'_sourcedir $(tmpdir)' -bs $(tmpdir)/podman.spec
-
-.PHONY: srpm
+srpm:
+ sh $(current_dir)/prepare.sh
+ rpmbuild -bs -D "dist %{nil}" -D "_sourcedir build/" -D "_srcrpmdir ./" --nodeps contrib/spec/podman.spec