diff options
author | Jan Pazdziora <jpazdziora@redhat.com> | 2018-08-01 12:05:06 +0200 |
---|---|---|
committer | Jan Pazdziora <jpazdziora@redhat.com> | 2018-08-01 12:11:49 +0200 |
commit | 67174cff766e927017ed8edb8a73abe35a6d89af (patch) | |
tree | 68239463bcdfac44fa35d852ea5600a9a1781ffa | |
parent | 708a652a62980fa7e2fba37273d91f1182215bd5 (diff) | |
download | mod_authnz_pam-67174cff766e927017ed8edb8a73abe35a6d89af.tar.gz mod_authnz_pam-67174cff766e927017ed8edb8a73abe35a6d89af.tar.xz mod_authnz_pam-67174cff766e927017ed8edb8a73abe35a6d89af.zip |
Support building in copr using make srpm.
-rw-r--r-- | .copr/Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 0000000..8cc9ab8 --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,22 @@ + +PACKAGE := mod_authnz_pam + +outdir := $(CURDIR) +spec := $(PACKAGE).spec + +spec_dir := . +ifeq ($(shell test -d $(spec) && echo true),true) + spec_dir = $(spec) + spec_file = $(spec)/$(PACKAGE).spec +else + spec_dir = $(dir $(spec)) + spec_file = $(spec) +endif + +VERSION := $(shell rpm -q --qf '%{name}-%{version}\n' --specfile mod_authnz_pam.spec 2> /dev/null | head -1) + +srpm: + cd $(spec_dir) && mkdir -p .source/$(VERSION) && cp -rp * .source/$(VERSION) && cd .source && tar cvzf $(VERSION).tar.gz $(VERSION) + cd $(spec_dir) && rpmbuild -D '_srcrpmdir $(outdir)' -D '_sourcedir .source' -bs $(spec_file) + cd $(spec_dir) && rm -rf .source + |