diff options
author | Brent Baude <bbaude@redhat.com> | 2018-02-08 13:53:45 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-08 13:53:45 -0600 |
commit | 250ec9adc278fb590cc2c288900b81514dfe0bfe (patch) | |
tree | 81dd0d46e357d2aa1edc4cfa55db49abb4ed73a9 | |
parent | 7ef886fe341e1cbab3b6d768f7527fce16ea9755 (diff) | |
parent | 401953ed829f00607ae5bd163a4997bd8f5d1553 (diff) | |
download | podman-250ec9adc278fb590cc2c288900b81514dfe0bfe.tar.gz podman-250ec9adc278fb590cc2c288900b81514dfe0bfe.tar.bz2 podman-250ec9adc278fb590cc2c288900b81514dfe0bfe.zip |
Merge pull request #316 from baude/copr3
Spec file changes for COPR
-rw-r--r-- | .copr/Makefile | 28 | ||||
-rw-r--r-- | contrib/spec/podman.spec | 2 |
2 files changed, 29 insertions, 1 deletions
diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 000000000..49a4450a0 --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,28 @@ +#!/usr/bin/make -f + +spec := contrib/spec/podman.spec +outdir := $(CURDIR) +tmpdir := build +gitdir := $(PWD)/.git + +rev := $(shell sed 's/\(.......\).*/\1/' $(gitdir)/$$(sed -n '/^ref:/{s/.* //;p}' $(gitdir)/HEAD)) +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 diff --git a/contrib/spec/podman.spec b/contrib/spec/podman.spec index 21cc75adb..977a62590 100644 --- a/contrib/spec/podman.spec +++ b/contrib/spec/podman.spec @@ -345,7 +345,7 @@ providing packages with %{import_path} prefix. %endif %prep -%autosetup -Sgit -n %{repo}-%{commit} +%autosetup -Sgit sed -i '/\/bin\/bash/d' completions/bash/%{name} %build |