-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (40 loc) · 1.33 KB
/
Copy pathMakefile
File metadata and controls
47 lines (40 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: help srpm rpm mock clean spectool
SPEC_FILE = python3-debugpy.spec
PACKAGE_NAME = python3-debugpy
DIST ?= fedora-rawhide-x86_64
help:
@echo "Available targets:"
@echo " spectool - Download source files"
@echo " srpm - Build source RPM"
@echo " rpm - Build binary RPM (requires sources)"
@echo " mock - Build using mock (DIST=<target>, default: fedora-rawhide-x86_64)"
@echo " clean - Clean build artifacts"
@echo ""
@echo "Mock build examples:"
@echo " make mock DIST=fedora-43-x86_64"
@echo " make mock DIST=fedora-44-x86_64"
@echo " make mock DIST=fedora-rawhide-x86_64"
@echo " make mock DIST=centos-stream-9-x86_64"
@echo " make mock DIST=centos-stream-10-x86_64"
@echo " make mock DIST=epel-9-x86_64"
@echo " make mock DIST=epel-10-x86_64"
spectool:
spectool -g -C . $(SPEC_FILE)
srpm: spectool
rm -f *.src.rpm
rpmbuild -bs $(SPEC_FILE) \
--define "_sourcedir $(PWD)" \
--define "_srcrpmdir $(PWD)"
rpm: spectool
rpmbuild -ba $(SPEC_FILE) \
--define "_sourcedir $(PWD)" \
--define "_rpmdir $(PWD)" \
--define "_srcrpmdir $(PWD)" \
--define "_builddir $(PWD)/BUILD" \
--define "_buildrootdir $(PWD)/BUILDROOT"
mock: srpm
mock -r $(DIST) --rebuild $(PACKAGE_NAME)-*.src.rpm
clean:
rm -rf BUILD BUILDROOT RPMS SRPMS
rm -f *.rpm *.tar.gz *.log
rm -rf results_*