Skip to content

Commit 34d81c9

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
copr: add .copr/Makefile for building in COPR system
This is considered the flexible way to build in COPR and it meets our needs to match the setuptools_scm versionoing scheme we've already been using for a while. Hackily reuse the container build.sh script for generating the srpm. Signed-off-by: John Mulligan <[email protected]>
1 parent 2d8cf0a commit 34d81c9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.copr/Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
3+
SELF=$(lastword $(MAKEFILE_LIST))
4+
ROOT_DIR=$(abspath $(dir $(SELF))/..)
5+
SKIP_DEPS=
6+
7+
outdir:=/var/tmp/copr-tmp-outdir
8+
spec:=extras/python-sambacc.spec
9+
10+
.PHONY: srpm
11+
srpm: sys_deps
12+
mkdir -p $(outdir)
13+
git fetch --tags
14+
SAMBACC_SRPM_ONLY=yes \
15+
SAMBACC_BUILD_DIR=$(ROOT_DIR) \
16+
SAMBACC_DIST_PREFIX=$(outdir)/.dist \
17+
SAMBACC_DISTNAME=copr \
18+
SAMBACC_BUILD_TASKS="task_py_build task_rpm_build" \
19+
./tests/container/build.sh
20+
cp $(outdir)/.dist/copr/SRPMS/*.rpm $(outdir)
21+
22+
23+
.PHONY: sys_deps
24+
sys_deps:
25+
ifeq ($(SKIP_DEPS),yes)
26+
@echo "Skipping sys deps"
27+
else
28+
dnf install -y python3-pip git
29+
endif

0 commit comments

Comments
 (0)